|
|
@@ -2,14 +2,15 @@ package com.goafanti.user.controller;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.junit.Test;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -675,29 +676,34 @@ public class UserApiController extends BaseApiController {
|
|
|
|
|
|
if (5 == userIdentity.getProcess()){
|
|
|
UserIdentity u = userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId());
|
|
|
- System.out.println((System.currentTimeMillis() - u.getPaymentDate().getTime()) > 432000000);
|
|
|
if ((System.currentTimeMillis() - u.getPaymentDate().getTime()) > 432000000){
|
|
|
- System.out.println(111);
|
|
|
- res.getError().add(buildError("","超过打款日期5日,无法提交确认"));
|
|
|
+ u.setAuditStatus(4);
|
|
|
+ userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
+ res.getError().add(buildError("","1"));//超过打款日期5日,无法提交确认
|
|
|
return res;
|
|
|
}
|
|
|
if (3 == u.getWrongCount()){
|
|
|
- res.getError().add(buildError("","输入错误金额次数过多"));
|
|
|
+ u.setAuditStatus(4);
|
|
|
+ u.setProcess(5);
|
|
|
+ userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
+ res.getError().add(buildError("","2"));//输入错误金额次数过多
|
|
|
return res;
|
|
|
- } else {
|
|
|
- if (u.getAmountMoney() != userIdentity.getAmountMoney()){
|
|
|
- int t = 3 - u.getWrongCount() - 1;
|
|
|
- u.setWrongCount(u.getWrongCount()+1);
|
|
|
- userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
- if (0 == t){
|
|
|
- res.getError().add(buildError("","输入错误金额次数过多"));
|
|
|
- } else {
|
|
|
- res.getError().add(buildError("","输入打款金额错误,您还有" + t + "次机会"));
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (0 != (u.getAmountMoney().compareTo(userIdentity.getAmountMoney()))){
|
|
|
+ int t = 3 - u.getWrongCount() - 1;
|
|
|
+ u.setWrongCount(u.getWrongCount()+1);
|
|
|
+ userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
+ if (0 == t){
|
|
|
+ u.setAuditStatus(4);
|
|
|
+ u.setProcess(5);
|
|
|
+ userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
+ res.getError().add(buildError("","2"));//输入错误金额次数过多
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError("","输入打款金额错误,您还有" + t + "次机会"));
|
|
|
+ }
|
|
|
return res;
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
+ userIdentity.setAuditStatus(5);
|
|
|
}
|
|
|
return dealUserProcess(res,userIdentity,TokenManager.getUserId());
|
|
|
}
|
|
|
@@ -718,43 +724,51 @@ public class UserApiController extends BaseApiController {
|
|
|
* 团体实名认证流程下一步
|
|
|
*/
|
|
|
@RequestMapping(value="/orgNextPro",method = RequestMethod.POST)
|
|
|
- public Result orgNextProcess(OrganizationIdentity o, String verificationCode){
|
|
|
+ public Result orgNextProcess(OrganizationIdentity orgIdentity, String verificationCode){
|
|
|
Result res = new Result();
|
|
|
- if (1 == o.getProcess()){
|
|
|
+ if (1 == orgIdentity.getProcess()){
|
|
|
if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)){
|
|
|
res.getError().add(buildError(ErrorConstants.VCODE_ERROR,"验证码错误"));
|
|
|
return res;
|
|
|
}
|
|
|
}
|
|
|
- if (3 == o.getProcess()){
|
|
|
- OrganizationIdentity orgIdentity = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
- orgIdentity.setAuditStatus(1);
|
|
|
- organizationIdentityService.updateByPrimaryKeySelective(orgIdentity);
|
|
|
+ if (3 == orgIdentity.getProcess()){
|
|
|
+ OrganizationIdentity o = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
+ o.setAuditStatus(1);
|
|
|
+ organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
}
|
|
|
- if (5 == o.getProcess()){
|
|
|
- OrganizationIdentity orgIdentity = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
- if (System.currentTimeMillis() - orgIdentity.getPaymentDate().getTime() > 43200000000L){
|
|
|
- res.getError().add(buildError("超过打款日期5日,无法提交确认"));
|
|
|
+ if (5 == orgIdentity.getProcess()){
|
|
|
+ OrganizationIdentity o = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
+ if (System.currentTimeMillis() - o.getPaymentDate().getTime() > 432000000){
|
|
|
+ o.setAuditStatus(4);
|
|
|
+ organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
+ res.getError().add(buildError("", "1"));//超过打款日期5日,无法提交确认
|
|
|
return res;
|
|
|
}
|
|
|
- if (3 == orgIdentity.getWrongCount()){
|
|
|
- res.getError().add(buildError("输入错误金额次数过多"));
|
|
|
+ if (3 == o.getWrongCount()){
|
|
|
+ o.setAuditStatus(4);
|
|
|
+ o.setProcess(5);
|
|
|
+ organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
+ res.getError().add(buildError("", "2"));//输入错误金额次数过多
|
|
|
return res;
|
|
|
}
|
|
|
- if (o.getValidationAmount() != orgIdentity.getValidationAmount()){
|
|
|
+ if (0 != (o.getValidationAmount().compareTo(orgIdentity.getValidationAmount()))){
|
|
|
int t = 3 - o.getWrongCount() - 1;
|
|
|
o.setWrongCount(o.getWrongCount() + 1);
|
|
|
organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
if (0 == t){
|
|
|
- res.getError().add(buildError("输入错误金额次数过多"));
|
|
|
+ o.setAuditStatus(4);
|
|
|
+ o.setProcess(5);
|
|
|
+ organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
+ res.getError().add(buildError("","2"));//输入错误金额次数过多
|
|
|
} else {
|
|
|
- res.getError().add(buildError("输入打款金额错误,您还有" + t + "次机会"));
|
|
|
- }
|
|
|
- return res;
|
|
|
+ res.getError().add(buildError("", "输入打款金额错误,您还有" + t + "次机会"));
|
|
|
}
|
|
|
-
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ orgIdentity.setAuditStatus(5);
|
|
|
}
|
|
|
- return dealOrgProcess(res, o ,TokenManager.getUserId());
|
|
|
+ return dealOrgProcess(res, orgIdentity ,TokenManager.getUserId());
|
|
|
}
|
|
|
|
|
|
/**
|