2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package com.landtool.lanbase.modules.res.service.impl;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import com.landtool.lanbase.modules.res.dao.Res_CatalogMapper;
import com.landtool.lanbase.modules.res.entity.Res_Catalog;
import com.landtool.lanbase.modules.res.entity.Res_MainInfo;
import com.landtool.lanbase.modules.res.entity.UserDefined.CatlogJoinActionrecord;
import com.landtool.lanbase.modules.res.redis.ResCatalogRedis;
import com.landtool.lanbase.modules.res.service.ResCatalogService;
 
@Service("resCatalogService")
public class ResCatalogServiceImpl implements ResCatalogService {
    
    @Autowired
    private Res_CatalogMapper resCatalogMapper;
 
    @Autowired
    private ResCatalogRedis resCatalogRedis;
    
    @Override
    public Res_Catalog selectByPrimaryKey(Integer catlogid) {
        Res_Catalog catalog=resCatalogRedis.get(catlogid);
        if(catalog==null){
            catalog = resCatalogMapper.selectByPrimaryKey(catlogid);
            resCatalogRedis.saveOrUpdate(catalog);
        }
        return catalog; 
    }
    
    @Override
    public List<Res_Catalog> selectResCatalogToParentid(int parentid) {
        return resCatalogMapper.selectResCatalogToParentid(parentid);
    }
    
    @Override
    public List<Res_Catalog> selectFilterResCatalogToParentid(Res_MainInfo info) {
        return resCatalogMapper.selectFilterResCatalogToParentid(info);
    }
    
    @Override
    public List<Res_Catalog> getYWJCMuLuTree(int id) {
        return resCatalogMapper.getYWJCMuLuTree(id);
    }
    
    @Override
    public Res_MainInfo selectResMainInfoToCatlogid(int catlogid) {
        return resCatalogMapper.selectResMainInfoToCatlogid(catlogid);
    }
    
    @Override
    public int selectResCatalogIsExistsSon(int parentId,String spcStatus) {
        return resCatalogMapper.selectResCatalogIsExistsSon(parentId,spcStatus);
    }
    @Override
    public int selectResCatalogIsExistsSon(int parentId) {
        return resCatalogMapper.selectResCatalogIsExistsSon(parentId,null);
    }
    @Override
    public Res_Catalog getResCatalogInfoById(int catlogId) {
        return selectByPrimaryKey(catlogId);
    }
    
    @Override
    public String getMaxOrderId(int id) {
        return resCatalogMapper.getMaxOrderId(id);
    }
    
    @Override
    public int insertSelective(Res_Catalog record) {
        int result=resCatalogMapper.insertSelective(record);
        if(result>0)         resCatalogRedis.saveOrUpdate(record);
        return result;
    }
    
    @Override
    public String getMaxId() {
        return resCatalogMapper.getMaxId();
    }
    
    @Override
    public String getMaxCATLOGCODE(int id) {
        return resCatalogMapper.getMaxCATLOGCODE(id);
    }
    
    @Override
    public int updateByPrimaryKeySelective(Res_Catalog record) {
        resCatalogRedis.saveOrUpdate(record);
        return resCatalogMapper.updateByPrimaryKeySelective(record);
    }
    
    @Override
    public int deleteByPrimaryKey(int id) {
        resCatalogRedis.delete(id);
        return resCatalogMapper.deleteByPrimaryKey(id);
    }
    
    @Override
    public String getMinOrderId(int id) {return resCatalogMapper.getMinOrderId(id);}
    
    @Override
    public String getMinCATLOGCODE(int id) {return resCatalogMapper.getMinCATLOGCODE(id);}
    
    @Override
    public String getMaxOrderIdFromMainIndex(int id) {return resCatalogMapper.getMaxOrderIdFromMainIndex(id);}
    
    @Override
    public String getMinOrderIdFromMainIndex(int id) {return resCatalogMapper.getMinOrderIdFromMainIndex(id);}
    
    @Override
    public String getMaxCATLOGCODEFromMainIndex(int id) {return resCatalogMapper.getMaxCATLOGCODEFromMainIndex(id);}
    
    @Override
    public String getMinCATLOGCODEFromMainIndex(int id) {return resCatalogMapper.getMinCATLOGCODEFromMainIndex(id);}
    
    @Override
    public List<CatlogJoinActionrecord> SelectMuLuCount(String isDiTuFuwu) {
        Map<String,Object> paramMap = new HashMap<String,Object>();
        paramMap.put("isDiTuFuwu", isDiTuFuwu);
        return resCatalogMapper.SelectMuLuCount(paramMap);
    }
 
    /**
     * 资源目录--左侧面板--资源目录树
     * @param map
     * @return
     */
    @Override
    public List<Res_Catalog> getMuLuTreeData(Map<String, Object> map) {
        return resCatalogMapper.getMuLuTreeData(map);
    }
 
    /**
     * 资源目录--左侧面板--资源类型目录树
     * @param map
     * @return
     */
    @Override
    public List<Res_MainInfo> getResourceClassTreeData(Map<String, Object> map) {
        return resCatalogMapper.getResourceClassTreeData(map);
    }
 
    @Override
    public List<Res_Catalog> getParentCatalogsById(int id){
        return resCatalogMapper.getParentCatalogsById(id);
    }
 
    @Override
    public List<Res_MainInfo> selectMuLuZiYuanList(int parentId) {
        return resCatalogMapper.selectMuLuZiYuanList(parentId);
    }
 
    @Override
    public int selectMuLuZiYuanCount(int parentId) {
        return resCatalogMapper.selectMuLuZiYuanCount(parentId);
    }
 
    @Override
    public List<Res_Catalog> getMuLuTreeDataByResourceType(Map<String, Object> map) {
        return resCatalogMapper.getMuLuTreeDataByResourceType(map);
    }
 
    @Override
    public List<Integer> selectResCatalogExistsSon() {
        return resCatalogMapper.selectResCatalogExistsSon();
    }
}