Commit 017b24e1 by yao.xiao

修改-申请专家支持发邮件模板

parent 4a51433a
......@@ -3008,6 +3008,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
@Override
public ApplyForExpertSupportResponseVO applyForExpertSupport(ApplyForExpertSupportRequestVO requestVO) {
ApplyForExpertSupportResponseVO resp = new ApplyForExpertSupportResponseVO();
//判断此商机专家支持是否已经申请
MktLeadsExpertRequest isExpertRequest = mktLeadsExpertRequestDALService.findByLeadsAssignedId(requestVO.getLeadsAssignedId());
if (isExpertRequest != null){
resp.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("830019")));
return resp;
}
//申请专家支持
//保存ag_mkt_leads_expert_request
MktLeadsExpertRequest mktLeadsExpertRequest = new MktLeadsExpertRequest();
......@@ -3019,6 +3025,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsExpertRequest.setUpdatedBy(requestVO.getPractitionerId());
mktLeadsExpertRequestDALService.save(mktLeadsExpertRequest);
//查询商机所属经纪人的信息
AclPractitioner aclPractitioner = aclPractitionerDALService.findPractitionerByLeadsAssignedId(requestVO.getLeadsAssignedId());
//发邮件
//发送邮件给客服,同步跟进
String toAddress = systemConfigService.getSingleConfigValue("ApplyForExpertSupportToAddress");
......@@ -3031,7 +3039,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
ccList.toArray(ccAddresses);
String subject = "申请专家支持";
String messageText = "尊敬的管理员,您好!";
messageText += "申请专家支持";
messageText += "寿险经纪人【"+aclPractitioner.getName()+"】,电话{"+aclPractitioner.getMobileNo()+"}申请了专家支持,请在AGMS及时处理并分配专家进行支持。谢谢!";
mailService.sysNotify(toAddress,ccAddresses,subject,messageText);
......
......@@ -62,4 +62,6 @@ public interface AclPractitionerMapper {
PayScaleBasicInfo findFilePathByMonShId(@Param("monShId")Integer monShId);
PractitionerBasicInfo findByIdEG(@Param("practitionerIdEG")String practitionerIdEG);
AclPractitioner findPractitionerByLeadsAssignedId(Long leadsAssignedId);
}
\ No newline at end of file
......@@ -162,4 +162,11 @@ public interface AclPractitionerDALService {
* @return 返回
*/
PractitionerBasicInfo findByIdEG(String practitionerIdEG);
/**
* 通过指派经纪人id,查询经纪人详情
* @param leadsAssignedId
* @return
*/
AclPractitioner findPractitionerByLeadsAssignedId(Long leadsAssignedId);
}
......@@ -155,4 +155,9 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public PractitionerBasicInfo findByIdEG(String practitionerIdEG) {
return aclPractitionerMapper.findByIdEG(practitionerIdEG);
}
@Override
public AclPractitioner findPractitionerByLeadsAssignedId(Long leadsAssignedId) {
return aclPractitionerMapper.findPractitionerByLeadsAssignedId(leadsAssignedId);
}
}
......@@ -31,4 +31,5 @@
830016=您不是团队长,无法进行编辑保存
830017=您不是团队长,无法进行查看
830018=您暂无团队,无法设置
830019=已申请过专家支持!请等待
900003=保险公司响应报文为空!
\ No newline at end of file
......@@ -912,4 +912,11 @@
FROM sal001 p
where p.SAL_MST_ID = #{practitionerIdEG,jdbcType=VARCHAR} limit 1
</select>
<select id="findPractitionerByLeadsAssignedId" resultMap="BaseResultMap">
select p.*
from ag_acl_practitioner p
left join ag_mkt_leads_assigneds a on a.assigned_practitioner_id = p.id
where a.id = #{leadsAssignedId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment