|
@@ -96,6 +96,9 @@ public class TaUserServiceImpl extends ServiceImpl<TaUserMapper, TaUser> impleme
|
96
|
96
|
@Autowired
|
97
|
97
|
private TaChannelAppRelationMapper taChannelAppRelationMapper;
|
98
|
98
|
|
|
99
|
+ @Autowired
|
|
100
|
+ private TaChannelProxyMapper taChannelProxyMapper;
|
|
101
|
+
|
99
|
102
|
@Override
|
100
|
103
|
public IPage<Map<String,Object>> getPageList(IPage pg, Integer channelId) {
|
101
|
104
|
List<Map<String,Object>> taUserList = taUserMapper.getPageList(pg, channelId);
|
|
@@ -138,6 +141,18 @@ public class TaUserServiceImpl extends ServiceImpl<TaUserMapper, TaUser> impleme
|
138
|
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
|
156
|
// 先插入 org
|
142
|
157
|
TaOrg taOrg = new TaOrg();
|
143
|
158
|
taOrg.setName(taUser.getOrgName());
|