Commit 8d0301b8 by YG8999

保洁任务中断短信提醒

parent fa0bfc30
......@@ -13,6 +13,7 @@ public enum SmsTypeEnum {
SMS_CLEAN_RECORDS_TEMP_15(3,"sms.clean.records.template.15","即将保洁任务短信提醒"),
SMS_ORDER_START_TEMP(4,"sms.order.start.template","订单即将开始提示短信"),
SMS_ORDER_END_TEMP(5,"sms.order.end.template","订单即结束始提示短信"),
SMS_CLEAN_RECORDS_STOP_TEMP(6,"sms.clean.records.stop.template","保洁任务中断短信提醒"),
;
private Integer code;
......
......@@ -46,7 +46,12 @@ public interface SmsService {
*/
boolean sendSmsOrderEndRemind(String phone, SStore store, SRoom room);
/**
* 发送保洁任务中断提示短信(用户续单成功提示保洁任务中断,已经发送过保洁提醒短信)
* @param phone
* @return
*/
boolean sendSmsCleanRecordsStopRemind(String phone, SStore store, SRoom room);
}
......@@ -145,6 +145,18 @@ public class SmsServiceImpl implements SmsService {
}
}
@Override
public boolean sendSmsCleanRecordsStopRemind(String phone, SStore store, SRoom room) {
// 通过配置获取短信模版
SysConfig config = sysConfigMapper.checkConfigKeyUnique(SmsTypeEnum.SMS_CLEAN_RECORDS_STOP_TEMP.getValue());
if (config != null) {
String content = MessageFormat.format(config.getConfigValue(), store.getName(), room.getName(), store.getAddress());
return sendSms(phone, SmsTypeEnum.SMS_CLEAN_RECORDS_STOP_TEMP.getCode(), content);
} else {
return Boolean.FALSE;
}
}
private String getSmsContent(String phone, Integer tag) {
// 验证码 特殊处理 code
if (tag.equals(SmsTypeEnum.SMS_CODE_TEMP.getCode())) {
......
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