|
@@ -163,10 +163,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
|
|
|
vciInfoVOList.add(vciInfoVO);
|
|
|
}
|
|
|
- if (defaultCount>1){
|
|
|
- return Result.fail("设备已是默认状态").result(ResultCode.VCI_DEFAULTED);
|
|
|
- }
|
|
|
-
|
|
|
userLoginVO.setVciInfoList(vciInfoVOList);
|
|
|
}
|
|
|
|
|
@@ -201,7 +197,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
throw new BadReqException("该维修厂不存在");
|
|
|
}
|
|
|
addUser.setDistributorName(distributor.getCompany());
|
|
|
-
|
|
|
this.save(addUser);
|
|
|
|
|
|
return Result.ok();
|
|
@@ -319,7 +314,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
Integer userId = user.getId();
|
|
|
|
|
|
User userById = getById(userId);
|
|
|
+ String password = user.getPassword();
|
|
|
BeanUtil.copyProperties(user, userById);
|
|
|
+ //密码加密
|
|
|
+ try {
|
|
|
+ password = AesUtil.Encrypt(password);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new BizException("密码加密出错",ResultCode.PASSWORD_ENCRYPT_ERROR);
|
|
|
+ }
|
|
|
+ if (!password.equals(userById.getPassword())){
|
|
|
+ userById.setPassword(password);
|
|
|
+ }
|
|
|
+
|
|
|
Integer distributorId = userById.getDistributorId();
|
|
|
//根据id查询维修厂
|
|
|
Distributor distributor = distributorService.getById(distributorId);
|
|
@@ -454,8 +460,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
if (BeanUtil.isEmpty(bindVO)){
|
|
|
return Result.error().message("参数为空").result(ResultCode.NO_DATA);
|
|
|
}
|
|
|
- Integer userId = bindVO.getAppUserId();
|
|
|
- String vciNum = bindVO.getSn();
|
|
|
+ Integer userId = bindVO.getUserId();
|
|
|
+ String vciNum = bindVO.getVciSn();
|
|
|
|
|
|
LambdaQueryWrapper<VciInfo> vciInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
vciInfoLambdaQueryWrapper.eq(VciInfo::getVciNum, vciNum);
|