|
@@ -127,6 +127,12 @@ public class AccountServiceImpl extends ServiceImpl<IAccountMapper, Account> imp
|
|
|| param.getState() != CommonStatus.YES.code().intValue()){
|
|
|| param.getState() != CommonStatus.YES.code().intValue()){
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR);
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR);
|
|
}
|
|
}
|
|
|
|
+ Integer count = param.getCount();
|
|
|
|
+ if(CountType.NO_LIMIT.code() != param.getCountType() && Objects.isNull(count)){
|
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_10004);
|
|
|
|
+ }else{
|
|
|
|
+ count = -1;
|
|
|
|
+ }
|
|
account = new Account();
|
|
account = new Account();
|
|
account.setUserId(user.getId());
|
|
account.setUserId(user.getId());
|
|
account.setUserName(user.getUserName());
|
|
account.setUserName(user.getUserName());
|
|
@@ -139,7 +145,8 @@ public class AccountServiceImpl extends ServiceImpl<IAccountMapper, Account> imp
|
|
userAuthInfo.setAccountId(account.getId());
|
|
userAuthInfo.setAccountId(account.getId());
|
|
userAuthInfo.setUserId(user.getId());
|
|
userAuthInfo.setUserId(user.getId());
|
|
userAuthInfo.setAppKey(TokenUtil.createToken());
|
|
userAuthInfo.setAppKey(TokenUtil.createToken());
|
|
- userAuthInfo.setTotalCount(CountType.NO_LIMIT.code() == param.getCountType() ? -1 : param.getCount());
|
|
|
|
|
|
+ userAuthInfo.setTotalCount(count);
|
|
|
|
+ userAuthInfo.setCallCount(0);
|
|
userAuthInfo.setState(userAuthInfo.getState());
|
|
userAuthInfo.setState(userAuthInfo.getState());
|
|
userAuthInfo.setEffectTime(param.getEffectTime());
|
|
userAuthInfo.setEffectTime(param.getEffectTime());
|
|
userAuthInfo.setCreaterId(param.getCreaterId());
|
|
userAuthInfo.setCreaterId(param.getCreaterId());
|