This commit is contained in:
hejinbo
2023-10-18 09:54:43 +08:00
8 changed files with 87 additions and 9 deletions
@@ -11,7 +11,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
public interface WeChatUserService {
String sendCode(WeChatUserVO userVO);
AjaxResult sendCode(WeChatUserVO userVO);
AjaxResult registerUser(IdentityAuthentication ientityAuthentication);
@@ -420,7 +420,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
if (insertUserRow > 0) {
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
// 发送短信 todo
// 发送短信 1955400 普通短信 导入后通知申请人认证注册 尊敬的{1},您的申请的仲裁案件已导入,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信 已生效
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1955400");
request.setPhone(agentUser.getPhonenumber());
request.setTemplateParamSet(new String[]{agentUser.getNickName()});
SmsUtils.sendSms(request);
}
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
return "申请机构与申请代理人不匹配";
@@ -1541,6 +1546,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCompLegalperPost(caseApplication.getCompLegalperPost());
caseAffiliate.setCompLegalPerson(caseApplication.getCompLegalPerson());
caseAffiliate.setResidenAffili(caseApplication.getResidenAffiliAppli());
caseAffiliate.setAppliAgentTitle(caseApplication.getAppliAgentTitle());
return caseAffiliate;
@@ -1603,6 +1610,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
debtorCaseAffiliate.setContactAddressAgent(caseApplication.getDebtorContactAddressAgent());
debtorCaseAffiliate.setResponSex(caseApplication.getResponSex());
debtorCaseAffiliate.setResponBirth(caseApplication.getResponBirth());
debtorCaseAffiliate.setResidenAffili(caseApplication.getResidenAffiliRespon());
return debtorCaseAffiliate;
}
@@ -53,7 +53,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
private IdentityAuthenticationMapper identityAuthenticationMapper;
@Override
public String sendCode(WeChatUserVO userVO) {
public AjaxResult sendCode(WeChatUserVO userVO) {
Random random = new Random();
String code = "";
@@ -69,9 +69,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
Boolean flag = SmsUtils.sendSms(request);
if(flag){
setCodeCache(userVO.getPhone(),code);
return "短信发送成功";
return AjaxResult.success("短信发送成功");
}else {
return AjaxResult.warn("短信发送失败");
}
return "短信发送失败";
}
/**
* 设置验证码缓存