Commit df786d27 by zhangdongwei-intern

feat-1002510: 阶段跳转方式为需求定制单跳转且有邮件提醒时,邮件内容里新增需求定制单中填写的内容

parent b59e244c
......@@ -47,7 +47,8 @@ public interface PcloudRobotService {
@ApiOperation("表单提交后进行用户阶段跳转")
@GetMapping("changePersonalStage")
void changePersonalStage(@RequestParam("robotId") String robotId, @RequestParam("wxUserId") String wxUserId, @RequestParam("paperId") Long paperId);
void changePersonalStage(@RequestParam("robotId") String robotId, @RequestParam("wxUserId") String wxUserId,
@RequestParam("paperId") Long paperId, @RequestParam("emailContent") String emailContent);
@ApiOperation(value = "处理小程序二维码", httpMethod = "GET")
@GetMapping("handleMiniAppQr")
......
......@@ -85,10 +85,11 @@ public class PcloudRobotServiceImpl implements PcloudRobotService {
@Override
@GetMapping("changePersonalStage")
public void changePersonalStage(@RequestParam("robotId") String robotId, @RequestParam("wxUserId") String wxUserId, @RequestParam("paperId") Long paperId) {
if (!personalStageJumpBiz.handlePersonalStagePaperJump(wxUserId, robotId, paperId)){
public void changePersonalStage(@RequestParam("robotId") String robotId, @RequestParam("wxUserId") String wxUserId,
@RequestParam("paperId") Long paperId, @RequestParam("emailContent") String emailContent) {
if (!personalStageJumpBiz.handlePersonalStagePaperJump(wxUserId, robotId, paperId, emailContent)){
//如果没有进行跳转,则发送需求单反馈邮件
personalStageJumpBiz.sendPaperEmail(wxUserId, robotId);
personalStageJumpBiz.sendPaperEmail(wxUserId, robotId, emailContent);
}
}
......
......@@ -50,9 +50,9 @@ public interface PersonalStageJumpBiz {
* @param paperId
* @return
*/
boolean handlePersonalStagePaperJump(String userWxId, String robotWxId, Long paperId);
boolean handlePersonalStagePaperJump(String userWxId, String robotWxId, Long paperId, String emailContent);
void sendPaperEmail(String userWxId, String robotWxId);
void sendPaperEmail(String userWxId, String robotWxId, String emailContent);
/**
* 获取阶段设置期间用户输入的需求单信息
......
......@@ -437,7 +437,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
}
@ParamLog("处理用户提交表单阶段跳转")
public boolean handlePersonalStagePaperJump(String userWxId, String robotWxId, Long paperId){
public boolean handlePersonalStagePaperJump(String userWxId, String robotWxId, Long paperId, String emailContent){
if (null == paperId){
return false;
}
......@@ -469,7 +469,10 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
GroupRobotDTO groupRobotDTO = wechatGroupConsr.getGroupRobotByWxId(robotWxId);
String ip = weixinQrcodeBiz.getRobotIpByGeneration(groupRobotDTO.getVersion());
// 发送邮件
String content = "读者提交了反馈意见,请到“个人号管理——需求定制单”中查看该读者的需求并出相应方案";
String content = "<br>";
if (!StringUtil.isEmpty(emailContent)){
content = content + emailContent;
}
PersonalStageJumpKeywordDto jumpKeywordDto = new PersonalStageJumpKeywordDto();
jumpKeywordDto.setAfterPersonalStageId(paperJump.getAfterPersonalStageId());
jumpKeywordDto.setPersonalStageJumpId(paperJump.getId());
......@@ -484,7 +487,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
}
@Override
public void sendPaperEmail(String userWxId, String robotWxId) {
public void sendPaperEmail(String userWxId, String robotWxId, String emailContent) {
GroupUserDTO wxUserInfo = wechatGroupConsr.getWxUserInfoByWxUserId(userWxId);
if(wxUserInfo==null){
LOGGER.info("未找到用户信息,无法发送阶段跳转邮件");
......@@ -513,6 +516,9 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
content.put("robotNumber", pcloudRobot.getUniqueNumber());
content.put("robotId", robotWxId);
content.put("time", DateNewUtils.getLongDateStr());
if (!StringUtil.isEmpty(emailContent)){
content.put("content", emailContent);
}
sendEmailDto.setContent(content);
for (String email: emailList){
sendEmailDto.setToEmail(email);
......@@ -646,7 +652,8 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
content.put("robotClassifyName", robotClassifyName);
content.put("robotNumber", robotNumber);
content.put("robotId", robotId);
content.put("afterStageName", afterStageName);
//跳转时间需要换行
content.put("afterStageName", afterStageName+"<br><br>");
content.put("time", DateNewUtils.getLongDateStr());
sendEmailDto.setContent(content);
messageBiz.sendEmail(sendEmailDto);
......
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