Commit 4e38c012 by 284718418@qq.com

微信公众号消息模板添加

parent eab32fc0
......@@ -12,6 +12,7 @@ public class MessageTemplate {
/**
* 通知面试官
* 通知面试者
* 面试安排提醒
* {{first.DATA}}
* 面试职位:{{keyword1.DATA}}
......@@ -20,12 +21,13 @@ public class MessageTemplate {
*/
public static final String TEMPLATE_ID_TO_INTERVIEWER = "Uz6mVUYk9Tu7EO2V1pqiQ3x4EudDJTYWdaFtdf64h3M";
/**
* 通知面试者
* 面试提醒
* 应聘通知
* {{first.DATA}}
* 面试时间:{{keyword1.DATA}}
* 面试地点:{{keyword2.DATA}}
* 应聘职位:{{keyword1.DATA}}
* 通知内容:{{keyword2.DATA}}
* 通知人:{{keyword3.DATA}}
* 通知时间:{{keyword4.DATA}}
* {{remark.DATA}}
*/
public static final String TEMPLATE_ID_TO_INTERVIEWEE = "J5PkcWwJsti8ax0BBI9uhquPvV6NaqKrbHubavSvof0";
public static final String TEMPLATE_ID_TO_INTERVIEWE = "YChIP5ho7sT_dL5GMykjR4LCuR5aJ8E0tf73i4p_vvk";
}
......@@ -467,8 +467,8 @@ public class ZpglController {
return ResultUtil.error("导入简历失败,目前支持pdf,doc,docx,wps,txt,jpg,jpeg,png,bmp,tif格式~");
}
importCandidateDto.setSuffix(suffix);
// return zpglService.addResumeImportCandidate(userBean, file, importCandidateDto);
return zpglService.addCandidateByResumeSDK(userBean, file, importCandidateDto);
return zpglService.addResumeImportCandidate(userBean, file, importCandidateDto);
// return zpglService.addCandidateByResumeSDK(userBean, file, importCandidateDto);
} catch (CustomException e) {
e.printStackTrace();
throw e;
......@@ -595,6 +595,10 @@ public class ZpglController {
return ResultUtil.error("操作失败~");
}
InterviewNotice interviewNotice = new InterviewNotice();
ZpglZwxx zpglZwxx = ZpglZwxx.builder().id(zpglRcxx.getZpglZwxxId()).build().selectById();
if (!StringUtils.isEmpty(zpglZwxx)) {
interviewNotice.setZpglZwxxName(zpglZwxx.getName());
}
interviewNotice.setName(zpglRcxx.getName());
interviewNotice.setEmail(zpglRcxx.getMail());
//公众号类型 1:8小时企业管理 2:优领人才网
......@@ -606,16 +610,18 @@ public class ZpglController {
// 通知面试者
interviewNotice.setZpglRcxxId(zpglRcxx.getId());
interviewNotice.setMobile(zpglRcxx.getMobile());
interviewNotice.setRemark("点击填写");
interviewNotice.setNoticeName(userBean.getQyzxEmpLogin().getUsername());
interviewNotice.setRemark("请点击详情填写");
interviewNotice.setTemplateId(MessageTemplate.TEMPLATE_ID_TO_INTERVIEWE);
// 发送应聘登记表消息
if (APPLY_STATUS == status.intValue()) {
interviewNotice.setTemplateId(MessageTemplate.TEMPLATE_ID_TO_INTERVIEWER);
interviewNotice.setContentNotice(ZpglMessageTemplate.TO_APPLY);
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.THANKS, new String[]{zpglRcxx.getName(),interviewNotice.getZpglZwxxName()}));
interviewNotice.setUrl(h5Url + "?mobile=" + zpglRcxx.getMobile() + "&orgId=" + userBean.getOrgCode() + "#/basicInfo");
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.TO_APPLY, new String[]{zpglRcxx.getName()}));
// 发送FPA测评消息
} else {
interviewNotice.setTemplateId(MessageTemplate.TEMPLATE_ID_TO_INTERVIEWER);
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.TO_CEPIN, new String[]{zpglRcxx.getName()}));
interviewNotice.setContentNotice(ZpglMessageTemplate.TO_CEPIN);
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.THANKS, new String[]{zpglRcxx.getName(),interviewNotice.getZpglZwxxName()}));
interviewNotice.setUrl(h5Url + "/?zpglRcxxId=" + zpglRcxx.getId() + "#/cpxt");
}
log.info("TO_INTERVIEWEE sendApplyOrCePin MessageQueue info:{}", zpglWxgzptService.sendApplyOrCePin(interviewNotice));
......
......@@ -52,7 +52,7 @@ public class ZpglH5Controller {
if(!StringUtils.isEmpty(zpglRcxx.getWorkBeginYear())){
zpglRcxx.setWorkyears(DateFormatUtils.yearCompare(zpglRcxx.getWorkBeginYear(),new Date()));
}
if(!StringUtils.isEmpty(zpglRcxx.getId()) && zpglRcxx.getId() > 0){
if(StringUtils.isEmpty(zpglRcxx.getId())){
// 新增人才信息 初始化流程记录
ZpglMslcLog zpglMslcLog = new ZpglMslcLog();
zpglMslcLog.setZpglRcxxId(zpglRcxx.getId());
......
......@@ -247,7 +247,7 @@ public class ZpglServiceImpl implements ZpglService {
// 通知面试者
interviewNotice.setZpglRcxxId(zpglRcxxEntity.getId());
interviewNotice.setMobile(zpglRcxxEntity.getMobile());
interviewNotice.setRemark("如有疑问,请联系 HR");
interviewNotice.setRemark("请您提前做好准备,妥善安排接面试的时间~如有疑问,请联系 HR");
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.TO_INTERVIEWEE, new String[]{interviewNotice.getName(), interviewNotice.getZpglZwxxName()}));
log.info("TO_INTERVIEWEE addInterviewMessageQueue info:{}", zpglWxgzptService.addInterviewMessageQueue(interviewNotice));
}
......
......@@ -28,35 +28,13 @@ public class ZpglWxgzptServiceImpl implements ZpglWxgzptService {
@Value("${youling.serverUrl}")
private String serverUrl;
/**
* 添加消息队列
*
* @param map
* @return
*/
@Override
public String addMessageQueue(Map<String, Object> map) {
return HttpUtil.post(serverUrl + "/wxgzh/addMessageQueue", map);
}
/**
* 添加消息队列
*
* @param interviewNotice
* @return
*/
@Override
public String addInterviewMessageQueue(InterviewNotice interviewNotice) {
return HttpUtil.post(serverUrl + "/wxgzh/addMessageQueue", this.copyMessageQueueToMap(interviewNotice));
}
@Override
public String sendApplyOrCePin(InterviewNotice interviewNotice) {
return HttpUtil.post(serverUrl + "/wxgzh/addMessageQueue", this.copyMessageQueueToMap(interviewNotice));
}
private Map copyMessageQueueToMap(InterviewNotice interviewNotice){
//消息队列对象
MessageQueueDto mqd = new MessageQueueDto();
BeanUtils.copyProperties(interviewNotice, mqd);
......@@ -82,6 +60,42 @@ public class ZpglWxgzptServiceImpl implements ZpglWxgzptService {
/** 模板消息内容 end */
Map map = JSON.parseObject(JSON.toJSONString(mqd), Map.class);
return map;
return HttpUtil.post(serverUrl + "/wxgzh/addMessageQueue", map);
}
@Override
public String sendApplyOrCePin(InterviewNotice interviewNotice) {
//消息队列对象
MessageQueueDto mqd = new MessageQueueDto();
BeanUtils.copyProperties(interviewNotice, mqd);
/** 模板消息内容 start */
List<TemplateData> templateData = new ArrayList<>();
// 内容
TemplateData key = new TemplateData("first", interviewNotice.getContentStr(), "#000000");
templateData.add(key);
// 应聘职位
TemplateData key1 = new TemplateData("keyword1", interviewNotice.getZpglZwxxName(), "#000000");
templateData.add(key1);
// 通知内容
TemplateData key2 = new TemplateData("keyword2", interviewNotice.getContentNotice(), "#000000");
templateData.add(key2);
// 通知人
TemplateData key3 = new TemplateData("keyword3", interviewNotice.getNoticeName(), "#000000");
templateData.add(key3);
// 通知时间
TemplateData key4 = new TemplateData("keyword4", interviewNotice.getNowTime(), "#000000");
templateData.add(key4);
// 备注
TemplateData remark = new TemplateData("remark", interviewNotice.getRemark(), "#000000");
templateData.add(remark);
//数据处理成固定好的json格式
String content = mqd.getContentJson(templateData);
mqd.setContent(content);
/** 模板消息内容 end */
Map map = JSON.parseObject(JSON.toJSONString(mqd), Map.class);
return HttpUtil.post(serverUrl + "/wxgzh/addMessageQueue", map);
}
}
......@@ -18,6 +18,11 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
public class InterviewNotice extends MessageQueueDto {
/**
* 通知人,操作者
*/
private String NoticeName;
/**
* 面试者名字
*/
......@@ -39,6 +44,15 @@ public class InterviewNotice extends MessageQueueDto {
*/
private String contentStr;
/**
* 通知内容
*/
private String contentNotice;
/**
* 当前时间
*/
private String nowTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
public void setInterviewTime(Date interviewTime){
this.interviewTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(interviewTime);
}
......
......@@ -24,9 +24,10 @@ public class ZpglMessageTemplate {
public static final String SYS_ADD ="系统添加了候选人";
public static final String TO_INTERVIEWER ="您好,{0}{1}已安排由您面试";
public static final String TO_INTERVIEWEE ="候选人{0}你好!你所投递的 {1} 职位为你安排了面试";
public static final String TO_APPLY ="候选人{0}您好!请您认真填写应聘登记表";
public static final String TO_CEPIN ="候选人{0}您好!请您认真填写FPA测评试卷";
public static final String TO_INTERVIEWEE ="候选人{0}您好!您所投递的 {1} 职位为您安排了面试";
public static final String TO_APPLY ="请您认真填写应聘登记表";
public static final String TO_CEPIN ="请您认真填写FPA测评试卷";
public static final String THANKS ="候选人{0}您好!感谢您应聘{1}职位!";
public static final String OFFER_TEMPLATE = "<!DOCTYPE html><html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:th=\"http://www.thymeleaf.org\"><body><div><p style=\" line-height: 1.5;\">尊敬的<span>{0}</span></p>"+
"<p style=\" line-height: 1.5;\"><br></p>"+
......
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