Commit e89514ee by 裴大威

Merge branch 'feat-zdw-1002510' into 'master'

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

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