Merge branch 'refs/heads/dev' into test
This commit is contained in:
commit
5f8f2c5f87
|
|
@ -113,15 +113,15 @@ public class AppController {
|
|||
if (count > 0) {
|
||||
errMsg = "支付宝信息修改失败: 一个支付宝账号仅可绑定一个用户";
|
||||
}
|
||||
if (StrUtil.isNotBlank(userInfo.getCertName()) && !certName.equals(userInfo.getCertName())) {
|
||||
if (errMsg == null && StrUtil.isNotBlank(userInfo.getCertName()) && !certName.equals(userInfo.getCertName())) {
|
||||
errMsg = "支付宝信息修改失败: 姓名与实名认证信息不相符";
|
||||
}
|
||||
|
||||
if (!DataLimitUtil.isAccessAllowed(zhiFuBao+certName, Integer.parseInt(commonRepository.findOne(924).getValue()), "month")) {
|
||||
if (errMsg == null && !DataLimitUtil.isAccessAllowed(zhiFuBao+certName, Integer.parseInt(commonRepository.findOne(924).getValue()), "month")) {
|
||||
errMsg = "支付宝信息修改失败: 相同支付宝账号每月可绑定次数已用完";
|
||||
}
|
||||
|
||||
if (!ApiAccessLimitUtil.isAccessAllowed(userId.toString(), "updateZFB", Integer.parseInt(commonRepository.findOne(925).getValue()), "month")) {
|
||||
if (errMsg == null && !ApiAccessLimitUtil.isAccessAllowed(userId.toString(), "updateZFB", Integer.parseInt(commonRepository.findOne(925).getValue()), "month")) {
|
||||
errMsg = "支付宝信息修改失败: 每月可修改次数已用完,请联系管理员";
|
||||
}
|
||||
|
||||
|
|
@ -133,42 +133,48 @@ public class AppController {
|
|||
}
|
||||
|
||||
|
||||
String authErrMsg = null;
|
||||
if (StrUtil.isNotBlank(certNum) && !certNum.equals(userInfo.getCertNo())) {
|
||||
if (StrUtil.isNotBlank(userEntity.getZhiFuBaoName()) && !certName.equals(userEntity.getZhiFuBaoName())) {
|
||||
errMsg = "实名修改失败: 姓名与绑定支付宝信息不相符";
|
||||
authErrMsg = "实名修改失败: 姓名与绑定支付宝信息不相符";
|
||||
}
|
||||
if (!IdcardUtil.isValidCard(certNum)) {
|
||||
errMsg = "实名修改失败: 身份证号码有误";
|
||||
if (authErrMsg == null && !IdcardUtil.isValidCard(certNum)) {
|
||||
authErrMsg = "实名修改失败: 身份证号码有误";
|
||||
}
|
||||
|
||||
Integer idCount = userInfoService.countCertCount(certName, certNum);
|
||||
if (idCount > 1) {
|
||||
errMsg = "实名修改失败: 此实名信息已存在";
|
||||
if (authErrMsg == null) {
|
||||
Integer idCount = userInfoService.countCertCount(certName, certNum);
|
||||
if (idCount > 1) {
|
||||
authErrMsg = "实名修改失败: 此实名信息已存在";
|
||||
}
|
||||
}
|
||||
|
||||
if (!ApiAccessLimitUtil.isAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 1, "month")) {
|
||||
errMsg = "实名修改失败: 每月可修改次数已用完,请联系管理员";
|
||||
if (authErrMsg == null && !ApiAccessLimitUtil.isAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 1, "month")) {
|
||||
authErrMsg = "实名修改失败: 账号每月可修改次数已用完,请联系管理员";
|
||||
}
|
||||
|
||||
try {
|
||||
aliService.authCertNo(certName, certNum);
|
||||
}catch (Exception e) {
|
||||
ApiAccessLimitUtil.removeKey(String.valueOf(userId), "updateAuthCertInfo");
|
||||
errMsg = "实名修改失败: 身份证信息不匹配";
|
||||
if (authErrMsg == null && !ApiAccessLimitUtil.isAccessAllowed(certName, "updateAuthCertInfoByIdCard", 1, "month")) {
|
||||
authErrMsg = "实名修改失败: 此身份证信息次月已绑定过,请联系管理员";
|
||||
}
|
||||
|
||||
if (errMsg != null && errMsg.contains("实名修改失败")) {
|
||||
return Result.error(errMsg);
|
||||
if (authErrMsg == null) {
|
||||
try {
|
||||
aliService.authCertNo(certName, certNum);
|
||||
userInfo.setCertName(certName);
|
||||
userInfo.setCertNo(certNum);
|
||||
userInfo.setUpdateTime(DateUtil.date());
|
||||
userInfoService.update(userInfo, new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
|
||||
}catch (Exception e) {
|
||||
ApiAccessLimitUtil.removeKey(String.valueOf(userId), "updateAuthCertInfo");
|
||||
ApiAccessLimitUtil.removeKey(certName, "updateAuthCertInfoByIdCard");
|
||||
authErrMsg = "实名修改失败: 身份证信息不匹配";
|
||||
}
|
||||
}
|
||||
|
||||
userInfo.setCertName(certName);
|
||||
userInfo.setCertNo(certNum);
|
||||
userInfo.setUpdateTime(DateUtil.date());
|
||||
userInfoService.update(userInfo, new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
|
||||
}
|
||||
|
||||
if (errMsg != null) {
|
||||
return Result.error(errMsg);
|
||||
if (errMsg != null || authErrMsg != null) {
|
||||
authErrMsg = authErrMsg == null ? "" : authErrMsg;
|
||||
return Result.error(errMsg == null ? authErrMsg : errMsg + " " + authErrMsg);
|
||||
}
|
||||
return Result.success();
|
||||
// 去除首绑支付宝奖励
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
} else {
|
||||
course.setViewCounts(course.getViewCounts() + 1);
|
||||
}
|
||||
if (ApiAccessLimitUtil.isAccessAllowed("setCourseView:" + course.getCourseId(), "updateAuthCertInfo", 1, 600)) {
|
||||
if (ApiAccessLimitUtil.isAccessAllowed(course.getCourseId().toString(), "updateWeekCourseView", 1, 600)) {
|
||||
int courseViewCount = redisServiceImpl.getCourseWeekViewCount(course.getCourseId());
|
||||
course.setWeekView(courseViewCount);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
// 金币
|
||||
int money = Integer.parseInt(commonInfoService.findOne(911).getValue());
|
||||
if (money > 0 && userEntity.getUserId() != 1) {
|
||||
userMoneyService.updateMoney(1, userEntity.getUserId(), money);
|
||||
// userMoneyService.updateMoney(1, userEntity.getUserId(), money);
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userEntity.getUserId());
|
||||
userMoneyDetails.setType(1);
|
||||
|
|
@ -220,8 +220,9 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
// 更新邀请人钱包
|
||||
|
||||
UserMoney userMoney = userMoneyService.selectUserMoneyByUserId(userEntity.getUserId());
|
||||
userMoney.setMoney(userMoney.getMoney() == null ? BigDecimal.valueOf(money) : userMoney.getMoney().add(BigDecimal.valueOf(money)));
|
||||
userMoney.setInviteIncomeCoin(userMoney.getInviteIncomeCoin() == null ? new BigDecimal(money) : userMoney.getInviteIncomeCoin().add(new BigDecimal(money)));
|
||||
userMoneyService.update(userMoney, new LambdaQueryWrapper<UserMoney>().eq(UserMoney::getUserId, userMoney.getUserId()).eq(UserMoney::getId, userMoney.getId()));
|
||||
userMoneyService.update(null, new LambdaQueryWrapper<UserMoney>().eq(UserMoney::getUserId, userMoney.getUserId()).eq(UserMoney::getId, userMoney.getId()));
|
||||
}
|
||||
|
||||
//助力活动
|
||||
|
|
|
|||
Loading…
Reference in New Issue