|
@@ -56,6 +56,8 @@ import java.util.*; |
|
|
import java.util.function.Function; |
|
|
import java.util.function.Function; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
import static com.ningdatech.pmapi.expert.model.constant.ExpertAuditMsgTemplate.EXPERT_AUDIT_FAIL; |
|
|
|
|
|
import static com.ningdatech.pmapi.expert.model.constant.ExpertAuditMsgTemplate.EXPERT_AUDIT_PASS; |
|
|
import static com.ningdatech.yxt.model.cmd.SendSmsCmd.SendSmsContext; |
|
|
import static com.ningdatech.yxt.model.cmd.SendSmsCmd.SendSmsContext; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -402,7 +404,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
Long expertUserId = cmd.getExpertUserId(); |
|
|
Long expertUserId = cmd.getExpertUserId(); |
|
|
ExpertUserFullInfo expertInfo = iExpertUserFullInfoService.getByUserId(expertUserId); |
|
|
ExpertUserFullInfo expertInfo = iExpertUserFullInfoService.getByUserId(expertUserId); |
|
|
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); |
|
|
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail(); |
|
|
String smsContent; |
|
|
|
|
|
|
|
|
String content; |
|
|
if (cmd.getApplyResult()) { |
|
|
if (cmd.getApplyResult()) { |
|
|
// 修改专家状态为可用 |
|
|
// 修改专家状态为可用 |
|
|
expertInfo.setExpertAccountStatus(ExpertAccountStatusEnum.AVAILABLE.getKey()); |
|
|
expertInfo.setExpertAccountStatus(ExpertAccountStatusEnum.AVAILABLE.getKey()); |
|
@@ -436,15 +438,15 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { |
|
|
userRoleService.save(saveUserRole); |
|
|
userRoleService.save(saveUserRole); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
smsContent = String.format(ExpertAuditMsgTemplate.EXPERT_AUDIT_PASS_MSG, expertInfo.getExpertName(), userDetail.getRealName(), userDetail.getMobile()); |
|
|
|
|
|
|
|
|
content = String.format(EXPERT_AUDIT_PASS, expertInfo.getExpertName(), loginUrl, userDetail.getRealName(), userDetail.getMobile()); |
|
|
} else { |
|
|
} else { |
|
|
expertInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); |
|
|
expertInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); |
|
|
smsContent = String.format(ExpertAuditMsgTemplate.EXPERT_AUDIT_FAIL_MSG, expertInfo.getExpertName(), loginUrl, userDetail.getRealName(), userDetail.getMobile()); |
|
|
|
|
|
|
|
|
content = String.format(EXPERT_AUDIT_FAIL, expertInfo.getExpertName(), userDetail.getRealName(), userDetail.getMobile()); |
|
|
} |
|
|
} |
|
|
iExpertUserFullInfoService.saveOrUpdate(expertInfo); |
|
|
iExpertUserFullInfoService.saveOrUpdate(expertInfo); |
|
|
if (PhoneUtil.isMobile(expertInfo.getPhoneNo())) { |
|
|
if (PhoneUtil.isMobile(expertInfo.getPhoneNo())) { |
|
|
SendSmsContext smsCtx = new SendSmsContext(); |
|
|
SendSmsContext smsCtx = new SendSmsContext(); |
|
|
smsCtx.setContent(smsContent); |
|
|
|
|
|
|
|
|
smsCtx.setContent(content); |
|
|
smsCtx.setReceiveNumber(expertInfo.getPhoneNo()); |
|
|
smsCtx.setReceiveNumber(expertInfo.getPhoneNo()); |
|
|
yxtCallOrSmsHelper.sendSms(smsCtx); |
|
|
yxtCallOrSmsHelper.sendSms(smsCtx); |
|
|
} |
|
|
} |
|
|