|
|
@ -37,6 +37,21 @@ public class MessageServiceImpl implements MessageService { |
|
|
|
@Autowired |
|
|
|
private WxMaService wxMaService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 注册审核失败服务消息模版 |
|
|
|
*/ |
|
|
|
private static String FAILURE_TEMPLATE_ID = "jL6UPR2ZBcZT8Qu2UijcApvUI2xa3K68paDl8ZZV7as"; |
|
|
|
|
|
|
|
/** |
|
|
|
* 注册审核成功服务消息模版 |
|
|
|
*/ |
|
|
|
private static String SUCCESS_TEMPLATE_ID = "jL6UPR2ZBcZT8Qu2UijcAoGddYg70BGAyFZXyr4XBSY"; |
|
|
|
|
|
|
|
/** |
|
|
|
* 服务消息跳转小程序页面 |
|
|
|
*/ |
|
|
|
private static String MA_PAGE = "pages/index/index"; |
|
|
|
|
|
|
|
/** |
|
|
|
* 发送六位短信验证码 |
|
|
|
* |
|
|
@ -69,18 +84,13 @@ public class MessageServiceImpl implements MessageService { |
|
|
|
return new Result().error("没有可用的wxFormId"); |
|
|
|
} |
|
|
|
|
|
|
|
switch (userAuditStateEnum) { |
|
|
|
case AUDIT_FAILURE: |
|
|
|
this.sendRegisterFailureMaMsg(registerAuditResultDto); |
|
|
|
this.deleteWxFormId(registerAuditResultDto.getWxFormIdId()); |
|
|
|
break; |
|
|
|
case AUDIT_SUCCESS: |
|
|
|
this.sendRegisterSuccessMaMsg(registerAuditResultDto); |
|
|
|
this.deleteWxFormId(registerAuditResultDto.getWxFormIdId()); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
if (state.equals(AppUserAuditStateEnum.AUDIT_SUCCESS.value())) { |
|
|
|
this.sendRegisterSuccessMaMsg(registerAuditResultDto); |
|
|
|
} else { |
|
|
|
this.sendRegisterFailureMaMsg(registerAuditResultDto); |
|
|
|
} |
|
|
|
this.deleteWxFormId(registerAuditResultDto.getWxFormIdId()); |
|
|
|
|
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
@ -126,8 +136,8 @@ public class MessageServiceImpl implements MessageService { |
|
|
|
.isMpTemplateMsg(false) |
|
|
|
.toUser(registerAuditResultDto.getWxOpenId()) |
|
|
|
.formId(registerAuditResultDto.getWxFormId()) |
|
|
|
.templateId("jL6UPR2ZBcZT8Qu2UijcApvUI2xa3K68paDl8ZZV7as") |
|
|
|
.page("/pages/index/index") |
|
|
|
.templateId(FAILURE_TEMPLATE_ID) |
|
|
|
.page(MA_PAGE) |
|
|
|
.data(dataList) |
|
|
|
.emphasisKeyword("keyword6.DATA") |
|
|
|
.build(); |
|
|
@ -161,8 +171,8 @@ public class MessageServiceImpl implements MessageService { |
|
|
|
.isMpTemplateMsg(false) |
|
|
|
.toUser(registerAuditResultDto.getWxOpenId()) |
|
|
|
.formId(registerAuditResultDto.getWxFormId()) |
|
|
|
.templateId("jL6UPR2ZBcZT8Qu2UijcAoGddYg70BGAyFZXyr4XBSY") |
|
|
|
.page("/pages/index/index") |
|
|
|
.templateId(SUCCESS_TEMPLATE_ID) |
|
|
|
.page(MA_PAGE) |
|
|
|
.data(dataList) |
|
|
|
.emphasisKeyword("keyword5.DATA") |
|
|
|
.build(); |
|
|
|