|
@@ -58,7 +58,6 @@ public class SubUserCustomController {
|
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
|
|
|
Integer num=null;
|
|
|
- Object result=null;
|
|
|
for(int i=0;i<userCustomList.size();i++){
|
|
|
if(subUserCustom.getUserCustomId().equals(userCustomList.get(i).getId())){
|
|
|
num=i;
|
|
@@ -66,6 +65,7 @@ public class SubUserCustomController {
|
|
|
}
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
for(User user:userList) {
|
|
|
+ Object result=null;
|
|
|
switch (num){
|
|
|
case 0:
|
|
|
result=user.getPlate1();
|
|
@@ -83,10 +83,10 @@ public class SubUserCustomController {
|
|
|
result=user.getPlate5();
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
- if(result!=null){
|
|
|
- httpRespMsg.setError("当前配置下已存在数据");
|
|
|
- return httpRespMsg;
|
|
|
+ if(result!=null && !result.equals("") &&result.equals(subUserCustom.getName())){
|
|
|
+ httpRespMsg.setError("当前配置["+subUserCustom.getName()+"]已使用");
|
|
|
+ return httpRespMsg;
|
|
|
+ }
|
|
|
}
|
|
|
subUserCustomService.removeById(id);
|
|
|
return new HttpRespMsg();
|