Commit 794ec86c by zhengxj

finish 调整短信内容 on 20191118 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24911 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 8565e7cc
......@@ -31,6 +31,8 @@ import com.glsx.publicservice.service.CommonService;
import com.glsx.publicservice.util.SmsUtil;
import com.glsx.publicservice.util.fastdfs.FastDFSClientWrapper;
import feign.Client.Default;
/**
* @author zhanghj
* @version 1.0.0
......@@ -128,14 +130,20 @@ public class CommonController {
@RequestMapping(value = "/sendSms", method = {RequestMethod.GET, RequestMethod.POST})
public ResultObject sendSms(@RequestParam("phone") String phone, @RequestParam("name") String name) throws IOException {
public ResultObject sendSms(@RequestParam("phone") String phone, @RequestParam("name") String name,
@RequestParam("smsType") String smsType) throws IOException {
SmsUtil smsUtil = new SmsUtil();
String msgContent = null;
try {
String msgContent = MessageFormat.format("{0},您的包活干技工注册申请已通过。请打开微信小程序登陆,登录账号为{1},默认密码为{2}", name, phone,
if ("pass".equalsIgnoreCase(smsType)) {
msgContent = MessageFormat.format("【包活干汽车服务共享平台】 {0},你已认证成功。", name);
} else if ("register".equalsIgnoreCase(smsType)) {
msgContent = MessageFormat.format("【包活干汽车服务共享平台】 {0},你已注册成包活干的技工,账号:{1},密码:{2}", name, phone,
com.glsx.common.constants.Constants.DEFAULT_PASSWORD);
}
smsUtil.send(phone, msgContent, PropertiesUtil.getProperty(Constants.SMS_REGISTER_SOURCE));
} catch (Exception e) {
logger.error(phone + "技工注册成功发送短信失败" + e.getMessage(), e);
logger.error(phone + "发送短信失败" + e.getMessage(), e);
return new ResultObject(ResultCodeEnum.SMS_SEND_FAIL.getCode(), ResultCodeEnum.SMS_SEND_FAIL.getMsg());
}
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!