|
@@ -1,5 +1,13 @@
|
|
|
package com.ym.mec.collectfee.service.impl;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
import com.ym.mec.collectfee.common.dao.BaseDAO;
|
|
|
import com.ym.mec.collectfee.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.collectfee.common.sms.SmsExample;
|
|
@@ -9,13 +17,8 @@ import com.ym.mec.collectfee.entity.Course;
|
|
|
import com.ym.mec.collectfee.entity.ResponseCourseEntity;
|
|
|
import com.ym.mec.collectfee.entity.School;
|
|
|
import com.ym.mec.collectfee.service.SchoolService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import com.ym.mec.collectfee.utils.Constants;
|
|
|
+import com.ym.mec.collectfee.utils.yqpay.DateUtils;
|
|
|
|
|
|
@Service
|
|
|
public class SchoolServiceImpl extends BaseServiceImpl<Integer, School> implements SchoolService {
|
|
@@ -77,7 +80,11 @@ public class SchoolServiceImpl extends BaseServiceImpl<Integer, School> implemen
|
|
|
//获取所有用户手机号列表
|
|
|
List<String> userPhone = applyInfoDao.findUserByClass(classId,null);
|
|
|
String[] objects = (String[]) userPhone.toArray();
|
|
|
-// SmsExample.setBatchOnlySms(appId,secretKey,host,algorithm,"开团了",null,objects,isGizp,encode);
|
|
|
+ SmsExample.setBatchOnlySms(appId,secretKey,host,algorithm,String.format(Constants.SMS_TEMPLATE, DateUtils.getDayForAfter(new Date(), 2)),null,objects,isGizp,encode);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// public static void main(String[] args) {
|
|
|
+// System.out.println(String.format(Constants.SMS_TEMPLATE, DateUtils.getDayForAfter(new Date(), 2)));
|
|
|
+// }
|
|
|
}
|