魏超 5 年之前
父節點
當前提交
0ee4989eba

+ 15
- 0
src/main/java/com/huiju/estateagents/center/taUser/service/impl/TaUserServiceImpl.java 查看文件

96
 	@Autowired
96
 	@Autowired
97
 	private TaChannelAppRelationMapper taChannelAppRelationMapper;
97
 	private TaChannelAppRelationMapper taChannelAppRelationMapper;
98
 
98
 
99
+	@Autowired
100
+	private TaChannelProxyMapper taChannelProxyMapper;
101
+
99
 	@Override
102
 	@Override
100
 	public IPage<Map<String,Object>> getPageList(IPage pg, Integer channelId) {
103
 	public IPage<Map<String,Object>> getPageList(IPage pg, Integer channelId) {
101
 		List<Map<String,Object>> taUserList = taUserMapper.getPageList(pg, channelId);
104
 		List<Map<String,Object>> taUserList = taUserMapper.getPageList(pg, channelId);
138
 			throw new Exception("电话号码或登录名重复");
141
 			throw new Exception("电话号码或登录名重复");
139
 		}
142
 		}
140
 
143
 
144
+		//判断渠道端新增小程序最大数
145
+		QueryWrapper<TaChannelProxy> taChannelProxyQueryWrapper = new QueryWrapper<>();
146
+		taChannelProxyQueryWrapper.eq("channel_id", channelId);
147
+		TaChannelProxy taChannelProxy = taChannelProxyMapper.selectOne(taChannelProxyQueryWrapper);
148
+
149
+		QueryWrapper<TaChannelAppRelation> relationQueryWrapper = new QueryWrapper<>();
150
+		relationQueryWrapper.eq("channel_id", channelId);
151
+		Integer miniAppCount = taChannelAppRelationMapper.selectCount(relationQueryWrapper);
152
+		if (miniAppCount >= taChannelProxy.getAppMaxNum()){
153
+			throw new Exception("当前系统仅供维护"+ taChannelProxy.getAppMaxNum() +"个小程序,需要维护更多项目,请联系相关管理人员");
154
+		}
155
+
141
 		// 先插入 org
156
 		// 先插入 org
142
 		TaOrg taOrg = new TaOrg();
157
 		TaOrg taOrg = new TaOrg();
143
 		taOrg.setName(taUser.getOrgName());
158
 		taOrg.setName(taUser.getOrgName());

+ 1
- 1
src/main/java/com/huiju/estateagents/channel/sysChannel/controller/SysUserChannelController.java 查看文件

216
     public ResponseBean taNewsTypeUpdate(@PathVariable Integer id,
216
     public ResponseBean taNewsTypeUpdate(@PathVariable Integer id,
217
                                          @RequestBody TaChannelProxy taChannelProxy, HttpServletRequest request){
217
                                          @RequestBody TaChannelProxy taChannelProxy, HttpServletRequest request){
218
         ResponseBean responseBean = new ResponseBean();
218
         ResponseBean responseBean = new ResponseBean();
219
-        if (taChannelProxy.getAppMaxNum() != null && taChannelProxy.getAppMaxNum() < 0){
219
+        if (taChannelProxy.getAppMaxNum() != null && taChannelProxy.getAppMaxNum() <= 0){
220
             responseBean.addError("维护小程序数量不得小于0");
220
             responseBean.addError("维护小程序数量不得小于0");
221
             return responseBean;
221
             return responseBean;
222
         }
222
         }

+ 0
- 12
src/main/java/com/huiju/estateagents/service/impl/TaMiniappServiceImpl.java 查看文件

63
             throw new Exception("未知的小程序所属对象");
63
             throw new Exception("未知的小程序所属对象");
64
         }
64
         }
65
 
65
 
66
-        //判断渠道端新增小程序最大数
67
-        QueryWrapper<TaChannelProxy> taChannelProxyQueryWrapper = new QueryWrapper<>();
68
-        taChannelProxyQueryWrapper.eq("channel_id", channelId);
69
-        TaChannelProxy taChannelProxy = taChannelProxyMapper.selectOne(taChannelProxyQueryWrapper);
70
-
71
-        QueryWrapper<TaChannelAppRelation> relationQueryWrapper = new QueryWrapper<>();
72
-        relationQueryWrapper.eq("channel_id", channelId);
73
-        Integer miniAppCount = taChannelAppRelationMapper.selectCount(relationQueryWrapper);
74
-        if (miniAppCount >= taChannelProxy.getAppMaxNum()){
75
-            throw new Exception("当前系统仅供维护"+ taChannelProxy.getAppMaxNum() +"个小程序,需要维护更多项目,请联系相关管理人员");
76
-        }
77
-
78
         TaMiniapp orign = this.getById(taMiniapp.getMiniappId());
66
         TaMiniapp orign = this.getById(taMiniapp.getMiniappId());
79
         if (null != orign) {
67
         if (null != orign) {
80
             if (!this.updateById(taMiniapp)) {
68
             if (!this.updateById(taMiniapp)) {