k94314517
2024-07-15 4a8eafb3abe0b818ff002a2be3d3bde1452517d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.doumee.service.business.impl;
 
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomZhongTaiService;
import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest;
import com.doumee.biz.zbom.model.zhongtai.ZTConstants;
import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest;
import com.doumee.biz.zbom.model.zhongtai.response.*;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.dao.business.IamInterfaceLogMapper;
import com.doumee.dao.business.MemberMapper;
import com.doumee.service.business.GetZhongTaiDataService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Objects;
 
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2024/7/15 14:12
 */
@Service
public class GetZhongTaiDataServiceImpl implements GetZhongTaiDataService {
 
    @Autowired
    private ZbomZhongTaiService zbomZhongTaiService;
 
    @Autowired
    private MemberMapper memberMapper;
 
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
 
 
 
    @Override
    public List<ZTCatalogInfoResponse> getCatalogList(ZTCatalogListRequest ztCatalogListRequest){
        if(Objects.isNull(ztCatalogListRequest)
        || StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
            ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.CHANPING)
            ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZIXUN)
            ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.QW_CASE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"分类信息错误");
        }
        return zbomZhongTaiService.getCatalogList(ztCatalogListRequest);
    }
 
 
    @Override
    public List<ZTTagInfoResponse> getCataLogTagList(ZTCatalogListRequest ztCatalogListRequest){
        if(Objects.isNull(ztCatalogListRequest)
                || StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZHISHUO_ZHUANGXIU)
                ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.CHANPING)
                ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.ZIXUN)
                ||ztCatalogListRequest.getCatalogCode().equals(ZTConstants.CatalogCode.QW_CASE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"分类信息错误");
        }
        return zbomZhongTaiService.getTagList(ztCatalogListRequest);
    }
 
 
 
 
 
 
}