支付宝次数问题
This commit is contained in:
parent
409365b9db
commit
328298971c
|
|
@ -13,6 +13,7 @@ import com.sqx.modules.app.annotation.LoginUser;
|
|||
import com.sqx.modules.app.entity.UserEntity;
|
||||
import com.sqx.modules.app.service.AppService;
|
||||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
|
@ -33,6 +34,8 @@ public class AppController {
|
|||
private UserService userService;
|
||||
@Autowired
|
||||
private AppService appService;
|
||||
@Autowired
|
||||
private CommonInfoService commonRepository;
|
||||
|
||||
@PostMapping("/authenticationRegister")
|
||||
@ApiOperation("认证创建账号")
|
||||
|
|
@ -80,8 +83,8 @@ public class AppController {
|
|||
if (StrUtil.isEmpty(zhiFuBao) || StrUtil.isEmpty(zhiFuBaoName)) {
|
||||
return Result.error("支付宝账户及姓名不能为空!");
|
||||
}
|
||||
if (!DataLimitUtil.isAccessAllowed(zhiFuBao+zhiFuBaoName, 1, "month")) {
|
||||
return Result.error("修改失败,相同支付宝账号每月仅可绑定一次");
|
||||
if (!DataLimitUtil.isAccessAllowed(zhiFuBao+zhiFuBaoName, Integer.parseInt(commonRepository.findOne(924).getValue()), "month")) {
|
||||
return Result.error("修改失败,相同支付宝账号每月可绑定次数已用完");
|
||||
}
|
||||
int count = userService.count(new QueryWrapper<UserEntity>()
|
||||
.ne("user_id", userId)
|
||||
|
|
@ -91,8 +94,8 @@ public class AppController {
|
|||
if (count > 0) {
|
||||
return Result.error("一个支付宝账号仅可绑定一个用户");
|
||||
}
|
||||
if (!ApiAccessLimitUtil.isAccessAllowed(userId.toString(), "updateZFB", 3, "month")) {
|
||||
return Result.error("每月仅支持修改三次,请联系管理员");
|
||||
if (!ApiAccessLimitUtil.isAccessAllowed(userId.toString(), "updateZFB", Integer.parseInt(commonRepository.findOne(925).getValue()), "month")) {
|
||||
return Result.error("每月可修改次数已用完,请联系管理员");
|
||||
}
|
||||
UserEntity old = userService.getById(userId);
|
||||
String accountNo = old.getZhiFuBao();
|
||||
|
|
|
|||
Loading…
Reference in New Issue