|
@@ -216,7 +216,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
|
|
|
|
|
detailResult.setUserAccountDetailVo(userAccountDetailVo);
|
|
detailResult.setUserAccountDetailVo(userAccountDetailVo);
|
|
|
UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoNewDetail(userid);
|
|
UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoNewDetail(userid);
|
|
|
- userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
|
|
|
|
|
|
|
+ userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName() + userinfoDetailVo.getPathName());
|
|
|
detailResult.setUserinfoDetailVo(userinfoDetailVo);
|
|
detailResult.setUserinfoDetailVo(userinfoDetailVo);
|
|
|
return detailResult;
|
|
return detailResult;
|
|
|
}
|
|
}
|
|
@@ -226,7 +226,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
UserAccountDetailVo userAccountDetailVo = iUseraccountMapper.selectDetail(userid);
|
|
UserAccountDetailVo userAccountDetailVo = iUseraccountMapper.selectDetail(userid);
|
|
|
detailResult.setUserAccountDetailVo(userAccountDetailVo);
|
|
detailResult.setUserAccountDetailVo(userAccountDetailVo);
|
|
|
UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoDetail(userid);
|
|
UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoDetail(userid);
|
|
|
- userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName()+userinfoDetailVo.getPathName());
|
|
|
|
|
|
|
+ userinfoDetailVo.setPathName(userinfoDetailVo.getCountryName() + userinfoDetailVo.getPathName());
|
|
|
detailResult.setUserinfoDetailVo(userinfoDetailVo);
|
|
detailResult.setUserinfoDetailVo(userinfoDetailVo);
|
|
|
return detailResult;
|
|
return detailResult;
|
|
|
}
|
|
}
|
|
@@ -508,7 +508,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
if (dui.getBankcardfrontphotourl() != null && StringUtils.isNotBlank(dui.getBankcardfrontphotourl())) {
|
|
if (dui.getBankcardfrontphotourl() != null && StringUtils.isNotBlank(dui.getBankcardfrontphotourl())) {
|
|
|
ui.setBankcardfrontphotourl(dui.getBankcardfrontphotourl());
|
|
ui.setBankcardfrontphotourl(dui.getBankcardfrontphotourl());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ ui.setOtherurl(ui.getOtherurl() == null ? "" : ui.getOtherurl());
|
|
|
ui.setNeedinvoice(needinvoice);
|
|
ui.setNeedinvoice(needinvoice);
|
|
|
iUserinfoMapper.update(ui, new QueryWrapper<Userinfo>().eq("userid", ui.getUserid()));
|
|
iUserinfoMapper.update(ui, new QueryWrapper<Userinfo>().eq("userid", ui.getUserid()));
|
|
|
iDraftUserinfoMapper.delete(new QueryWrapper<DraftUserinfo>().eq("userid", dui.getUserid()));
|
|
iDraftUserinfoMapper.delete(new QueryWrapper<DraftUserinfo>().eq("userid", dui.getUserid()));
|
|
@@ -873,7 +873,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
.multiply(cNum).setScale(2, RoundingMode.HALF_UP));
|
|
.multiply(cNum).setScale(2, RoundingMode.HALF_UP));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(StringUtils.isNotBlank(riskRatioType.getCutmarginseq())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(riskRatioType.getCutmarginseq())) {
|
|
|
List<Market> marketList = iMarketMapper.selectList(new QueryWrapper<Market>().in("marketid",
|
|
List<Market> marketList = iMarketMapper.selectList(new QueryWrapper<Market>().in("marketid",
|
|
|
Arrays.stream(riskRatioType.getCutmarginseq().split(",")).filter(s -> !s.trim().isEmpty()).map(Long::valueOf).collect(Collectors.toList())));
|
|
Arrays.stream(riskRatioType.getCutmarginseq().split(",")).filter(s -> !s.trim().isEmpty()).map(Long::valueOf).collect(Collectors.toList())));
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
@@ -1661,11 +1661,11 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
public AjaxResult<Usercancelapply> cancelview(Long autoid, HttpServletRequest request) {
|
|
public AjaxResult<Usercancelapply> cancelview(Long autoid, HttpServletRequest request) {
|
|
|
Usercancelapply result = iUsercancelapplyMapper.selectOne(new QueryWrapper<Usercancelapply>().eq("autoid", autoid));
|
|
Usercancelapply result = iUsercancelapplyMapper.selectOne(new QueryWrapper<Usercancelapply>().eq("autoid", autoid));
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
- if(!iCommonService.checkUserAccountRole(systemmanager, result.getUserid())){
|
|
|
|
|
|
|
+ if (!iCommonService.checkUserAccountRole(systemmanager, result.getUserid())) {
|
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
- result.setAccountname(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",result.getUserid())).getAccountname());
|
|
|
|
|
- result.setAuditusername(iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("autoid",result.getAuditid())).getUsername());
|
|
|
|
|
|
|
+ result.setAccountname(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", result.getUserid())).getAccountname());
|
|
|
|
|
+ result.setAuditusername(iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("autoid", result.getAuditid())).getUsername());
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1673,48 +1673,48 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
public AjaxResult cancelaudit(Long autoid, Integer auditflag, String msg, HttpServletRequest request) {
|
|
public AjaxResult cancelaudit(Long autoid, Integer auditflag, String msg, HttpServletRequest request) {
|
|
|
Usercancelapply temp = iUsercancelapplyMapper.selectOne(new QueryWrapper<Usercancelapply>().eq("autoid", autoid));
|
|
Usercancelapply temp = iUsercancelapplyMapper.selectOne(new QueryWrapper<Usercancelapply>().eq("autoid", autoid));
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
- if(!iCommonService.checkUserAccountRole(systemmanager, temp.getUserid())){
|
|
|
|
|
|
|
+ if (!iCommonService.checkUserAccountRole(systemmanager, temp.getUserid())) {
|
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
- if(!Objects.equals(temp.getHandlestatus(), SysEnums.AccountOffStatusEnum.PENDING.getType())){
|
|
|
|
|
|
|
+ if (!Objects.equals(temp.getHandlestatus(), SysEnums.AccountOffStatusEnum.PENDING.getType())) {
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM022.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM022.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//判断资金账户
|
|
//判断资金账户
|
|
|
Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("userid", temp.getUserid()));
|
|
Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("userid", temp.getUserid()));
|
|
|
- if(ta == null){
|
|
|
|
|
|
|
+ if (ta == null) {
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM023.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM023.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", temp.getUserid()));
|
|
Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", temp.getUserid()));
|
|
|
|
|
|
|
|
//审核拒绝
|
|
//审核拒绝
|
|
|
- if(auditflag == 2){
|
|
|
|
|
|
|
+ if (auditflag == 2) {
|
|
|
temp.setHandlestatus(SysEnums.AccountOffStatusEnum.REFUSED.getType());
|
|
temp.setHandlestatus(SysEnums.AccountOffStatusEnum.REFUSED.getType());
|
|
|
temp.setApplystatus(SysEnums.AccountOffApplyEnum.FINISH.getType());
|
|
temp.setApplystatus(SysEnums.AccountOffApplyEnum.FINISH.getType());
|
|
|
temp.setAuditid(systemmanager.getAutoid());
|
|
temp.setAuditid(systemmanager.getAutoid());
|
|
|
temp.setAudittime(new Date());
|
|
temp.setAudittime(new Date());
|
|
|
temp.setAuditremark(msg);
|
|
temp.setAuditremark(msg);
|
|
|
- iUsercancelapplyMapper.update(temp,new QueryWrapper<Usercancelapply>().eq("autoid", temp.getAutoid()));
|
|
|
|
|
|
|
+ iUsercancelapplyMapper.update(temp, new QueryWrapper<Usercancelapply>().eq("autoid", temp.getAutoid()));
|
|
|
|
|
|
|
|
sendSMS(ua.getAccountname(), temp.getUserid());
|
|
sendSMS(ua.getAccountname(), temp.getUserid());
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM024.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM024.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//校验账户类型
|
|
//校验账户类型
|
|
|
- if(ua.getUsertype() != 5){
|
|
|
|
|
|
|
+ if (ua.getUsertype() != 5) {
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM025.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM025.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//判断资金账户签约信息
|
|
//判断资金账户签约信息
|
|
|
BankAccountsign sign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>().eq("accountcode", ta.getAccountid().toString()));
|
|
BankAccountsign sign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>().eq("accountcode", ta.getAccountid().toString()));
|
|
|
- if(sign != null && sign.getSignstatus() != 1 && sign.getSignstatus() != 7){
|
|
|
|
|
|
|
+ if (sign != null && sign.getSignstatus() != 1 && sign.getSignstatus() != 7) {
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM026.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM026.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//审核通过
|
|
//审核通过
|
|
|
//判断是否是干净账户
|
|
//判断是否是干净账户
|
|
|
- if(ta.getTradestatus() != 7){
|
|
|
|
|
|
|
+ if (ta.getTradestatus() != 7) {
|
|
|
Long accountuuid = SerialNumberUtils.getNewSerialNumber(SerialNumberUtils.prefix_account);
|
|
Long accountuuid = SerialNumberUtils.getNewSerialNumber(SerialNumberUtils.prefix_account);
|
|
|
AkernelMI1.AccountFundInfoReq.Builder accountbuilder = AkernelMI1.AccountFundInfoReq.newBuilder();
|
|
AkernelMI1.AccountFundInfoReq.Builder accountbuilder = AkernelMI1.AccountFundInfoReq.newBuilder();
|
|
|
Common.MessageHead.Builder accounthd = Common.MessageHead.newBuilder();
|
|
Common.MessageHead.Builder accounthd = Common.MessageHead.newBuilder();
|
|
@@ -1730,18 +1730,18 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
//卡住
|
|
//卡住
|
|
|
Calculator accountca = new Calculator(accountuuid);
|
|
Calculator accountca = new Calculator(accountuuid);
|
|
|
SerialNumberUtils.lockMap.put(accountuuid, accountca);
|
|
SerialNumberUtils.lockMap.put(accountuuid, accountca);
|
|
|
- rabbitTemplate.send(SysConstants.RabbitMoneyReqKey,new Message(accountbody, new MessageProperties()));
|
|
|
|
|
|
|
+ rabbitTemplate.send(SysConstants.RabbitMoneyReqKey, new Message(accountbody, new MessageProperties()));
|
|
|
|
|
|
|
|
- synchronized(accountca){
|
|
|
|
|
|
|
+ synchronized (accountca) {
|
|
|
try {
|
|
try {
|
|
|
accountca.wait(6000);
|
|
accountca.wait(6000);
|
|
|
Object o = accountca.obj;
|
|
Object o = accountca.obj;
|
|
|
- if(o != null){
|
|
|
|
|
- AkernelMI1.AccountFundInfoRsp accountrsp = (AkernelMI1.AccountFundInfoRsp)o;
|
|
|
|
|
- if(accountrsp.getRetCode() == 0){
|
|
|
|
|
- if(accountrsp.getIsCleanAccount() == 1){
|
|
|
|
|
|
|
+ if (o != null) {
|
|
|
|
|
+ AkernelMI1.AccountFundInfoRsp accountrsp = (AkernelMI1.AccountFundInfoRsp) o;
|
|
|
|
|
+ if (accountrsp.getRetCode() == 0) {
|
|
|
|
|
+ if (accountrsp.getIsCleanAccount() == 1) {
|
|
|
//干净账户
|
|
//干净账户
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -1752,14 +1752,14 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
}
|
|
}
|
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
|
log.error("mq接收出入金返回信息失败,失败信息:" + e);
|
|
log.error("mq接收出入金返回信息失败,失败信息:" + e);
|
|
|
- }finally {
|
|
|
|
|
|
|
+ } finally {
|
|
|
SerialNumberUtils.lockMap.remove(accountuuid);
|
|
SerialNumberUtils.lockMap.remove(accountuuid);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
temp.setApplystatus(SysEnums.AccountOffApplyEnum.HANDLING.getType());
|
|
temp.setApplystatus(SysEnums.AccountOffApplyEnum.HANDLING.getType());
|
|
|
temp.setAuditremark(msg);
|
|
temp.setAuditremark(msg);
|
|
|
- iUsercancelapplyMapper.update(temp,new QueryWrapper<Usercancelapply>().eq("autoid", temp.getAutoid()));
|
|
|
|
|
|
|
+ iUsercancelapplyMapper.update(temp, new QueryWrapper<Usercancelapply>().eq("autoid", temp.getAutoid()));
|
|
|
|
|
|
|
|
//判断并发送积分
|
|
//判断并发送积分
|
|
|
//result = sendClearScore(temp, ta, user);
|
|
//result = sendClearScore(temp, ta, user);
|
|
@@ -1790,9 +1790,9 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void sendSMS(String accountname, Long userid){
|
|
|
|
|
|
|
+ private void sendSMS(String accountname, Long userid) {
|
|
|
Userinfo info = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", userid));
|
|
Userinfo info = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", userid));
|
|
|
- if(info == null || info.getMobile() == null)
|
|
|
|
|
|
|
+ if (info == null || info.getMobile() == null)
|
|
|
return;
|
|
return;
|
|
|
ShortMessageMtp1.ShortMsgSendReq.Builder builder = ShortMessageMtp1.ShortMsgSendReq.newBuilder();
|
|
ShortMessageMtp1.ShortMsgSendReq.Builder builder = ShortMessageMtp1.ShortMsgSendReq.newBuilder();
|
|
|
builder.setMsgType(2);
|
|
builder.setMsgType(2);
|
|
@@ -1808,7 +1808,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
byte[] body = ProtoHelper.getNTAS(builder.build().toByteArray(), FunCodeConstants.FunCode_Trade_ShortMsgSendReq);
|
|
byte[] body = ProtoHelper.getNTAS(builder.build().toByteArray(), FunCodeConstants.FunCode_Trade_ShortMsgSendReq);
|
|
|
MessageProperties msgProperties = new MessageProperties();
|
|
MessageProperties msgProperties = new MessageProperties();
|
|
|
msgProperties.setHeader("messageType", "protoBuf");
|
|
msgProperties.setHeader("messageType", "protoBuf");
|
|
|
- rabbitTemplate.send(SysConstants.RabbitShortMessage,new Message(body, msgProperties));
|
|
|
|
|
|
|
+ rabbitTemplate.send(SysConstants.RabbitShortMessage, new Message(body, msgProperties));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|