Commit 68193f03 by duanhq

短信,二维码更新 by duanht 2019/1/28

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17591 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6825886e
......@@ -89,10 +89,11 @@ public class CommonController {
@AuthCheck
@RequestMapping(value = "/sendSms", method = {RequestMethod.GET, RequestMethod.POST})
public ResultObject sendSms(@RequestParam("phone") String phone) throws IOException {
public ResultObject sendSms(@RequestParam("phone") String phone ,@RequestParam("name") String name) throws IOException {
SmsUtil smsUtil = new SmsUtil();
try {
String msgContent = MessageFormat.format("您本次操作验证码为:{0},一分钟内有效。", phone);
// String msgContent = MessageFormat.format(name+",您的包活干技工注册申请已通过。请打开微信小程序登陆,默认密码为{0}", phone);
String msgContent = MessageFormat.format("您本次操作验证码为:{0},一分钟内有效。",phone);
smsUtil.send(phone, msgContent);
}catch (Exception e) {
logger.error(phone+"技工注册成功发送短信失败" + e.getMessage(), e);
......@@ -100,4 +101,6 @@ public class CommonController {
}
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
}
}
......@@ -96,9 +96,9 @@ public class QrCodeCreateUtil {
public static String getQrCodeURL(String content)throws IOException, WriterException{
// String QRUrl=PropertiesUtil.getProperty(FDFS_TRACKER_NGINX_DOMAIN)+SEPARATOR+IdUtils.uuid32()+content+".jpg";
String QRCodeUrl=PropertiesUtil.getProperty(FDFS_TRACKER_NGINX_DOMAIN)+SEPARATOR+IdUtils.uuid32()+content+".jpg";
//测试
String QRCodeUrl="D://"+IdUtils.uuid32()+content+".jpg";
// String QRCodeUrl="D://"+IdUtils.uuid32()+content+".jpg";
createQrCode(new FileOutputStream(new File(QRCodeUrl)),content,900,"JPEG");
return QRCodeUrl;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!