|
|
@@ -106,7 +106,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
private PublicReleaseMapper publicReleaseMapper;
|
|
|
@Autowired
|
|
|
private SystemWebSocketHandler systemWebSocketHandler;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private AdminUserCountMapper adminUserCountMapper;
|
|
|
@Autowired
|
|
|
private AsyncUtils asyncUtils;
|
|
|
|
|
|
@@ -450,9 +451,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
}
|
|
|
addUserLock(uid, TokenManager.getAdminId(), now, uList);
|
|
|
addUserTransferLog(uid, TokenManager.getAdminId(), null,0, null, now, uList);
|
|
|
+ updateAdminUserCount(user);
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ private void updateAdminUserCount(User user) {
|
|
|
+ String startTime=DateUtils.formatDate(user.getCreateTime(),AFTConstants.YYYYMMDD);
|
|
|
+ String endTime=startTime+" 23:59:59";
|
|
|
+ //
|
|
|
+ Integer i = adminUserCountMapper.updateByaidAndDate(user.getAid(), startTime, endTime);
|
|
|
+ if (i==null||i==0){
|
|
|
+ AdminUserCount adminUserCount=new AdminUserCount();
|
|
|
+ adminUserCount.setDateTime(user.getCreateTime());
|
|
|
+ adminUserCount.setPrivateCount(1);
|
|
|
+ adminUserCount.setAid(user.getAid());
|
|
|
+ adminUserCountMapper.insertSelective(adminUserCount);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void checkUserName(InputAddCustomer in) {
|
|
|
if (userMapper.checkUser("", in.getName(), "", in.getType(), null, null).size() > 0)
|
|
|
throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, in.getName(), ""));
|