|
@@ -35,6 +35,9 @@ public class SchoolServiceImpl extends BaseServiceImpl<Integer, School> implemen
|
|
|
private String secretKey;
|
|
|
@Value("${common.properties.sms-host-dev}")
|
|
|
private String host;
|
|
|
+ @Value("${common.properties.sms-send-request-url}")
|
|
|
+ private String sendUrl;
|
|
|
+
|
|
|
// 加密算法
|
|
|
private String algorithm = "AES/ECB/PKCS5Padding";
|
|
|
// 编码
|
|
@@ -77,12 +80,13 @@ public class SchoolServiceImpl extends BaseServiceImpl<Integer, School> implemen
|
|
|
school.setUpdateTime(new Date());
|
|
|
school.setStatus(2);
|
|
|
schoolDao.update(school);
|
|
|
+ String url = sendUrl + "schoolId=" + school.getId() + "&classId=" + school.getId() + "&cityId=" + school.getCityId();
|
|
|
//发送短信
|
|
|
//获取所有用户手机号列表
|
|
|
List<String> userPhone = applyInfoDao.findUserByClass(classId,null);
|
|
|
String[] objects=userPhone.toArray(new String[userPhone.size()]);
|
|
|
SmsExample.setBatchOnlySms(appId,secretKey,host,algorithm,
|
|
|
- String.format(Constants.SMS_TEMPLATE, DateUtils.getDayForAfter(new Date(), 2), ShortUrlUtil.sinaShortUrl("http://pay.dayaedu.com/?schoolId=2&classId=10381&cityId=1302")),
|
|
|
+ String.format(Constants.SMS_TEMPLATE, DateUtils.getDayForAfter(new Date(), 2), ShortUrlUtil.sinaShortUrl(url)),
|
|
|
null,objects,isGizp,encode);
|
|
|
}
|
|
|
}
|