|
@@ -342,12 +342,21 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 可配置的定时任务
|
|
|
|
|
+ */
|
|
|
|
|
+ public List<InquiryRemind> testMessage(Date startTime, Date endTime, Long useruu, Long enuu){
|
|
|
|
|
+ logger.log("公共询价","9点定时统计询价单总数服务开启");
|
|
|
|
|
+ List<InquiryRemind> list = inquiryRemindDao.findTestInfo(startTime,endTime,useruu,enuu);
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 每早9点发送询价通知短信
|
|
* 每早9点发送询价通知短信
|
|
|
*/
|
|
*/
|
|
|
@Scheduled(cron = "0 0 9 * * ?" )
|
|
@Scheduled(cron = "0 0 9 * * ?" )
|
|
|
private void sendMessage() throws Exception {
|
|
private void sendMessage() throws Exception {
|
|
|
-
|
|
|
|
|
|
|
+ logger.log("公共询价","9点定时统计询价单总数服务开启");
|
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
|
//找到询价推荐表中的所有公司
|
|
//找到询价推荐表中的所有公司
|
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
@@ -360,6 +369,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ logger.log("公共询价","9点定时统计询价单总数服务结束");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -367,7 +377,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
* 发送消息推送
|
|
* 发送消息推送
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
- private void sendMessage(final Integer count, final List<InquiryRemind> reminds) {
|
|
|
|
|
|
|
+ public void sendMessage(final Integer count, final List<InquiryRemind> reminds) {
|
|
|
ThreadUtils.task(new Runnable() {
|
|
ThreadUtils.task(new Runnable() {
|
|
|
@Override
|
|
@Override
|
|
|
public void run() {
|
|
public void run() {
|
|
@@ -397,7 +407,9 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
model.setSmTemplate(SMS_TEMP_ID);
|
|
model.setSmTemplate(SMS_TEMP_ID);
|
|
|
models.add(model);
|
|
models.add(model);
|
|
|
String res = HttpUtil.doPost(PS_MESSAGE_URL + "/messages", FlexJsonUtils.toJsonDeep(models));
|
|
String res = HttpUtil.doPost(PS_MESSAGE_URL + "/messages", FlexJsonUtils.toJsonDeep(models));
|
|
|
|
|
+ System.out.println(FlexJsonUtils.toJsonDeep(models));
|
|
|
System.out.println(res);
|
|
System.out.println(res);
|
|
|
|
|
+ logger.log("公共询价","此次"+company+"公司新增"+count+"张公共询价");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -411,7 +423,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
*/
|
|
*/
|
|
|
@Scheduled(cron = "0 0 14 * * ?" )
|
|
@Scheduled(cron = "0 0 14 * * ?" )
|
|
|
private void sendMessage2(){
|
|
private void sendMessage2(){
|
|
|
-
|
|
|
|
|
|
|
+ logger.log("公共询价","14点定时统计询价单总数服务开始");
|
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
|
//找到询价推荐表中的所有公司
|
|
//找到询价推荐表中的所有公司
|
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
@@ -424,6 +436,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ logger.log("公共询价","14点定时统计询价单总数服务结束");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -431,7 +444,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
*/
|
|
*/
|
|
|
@Scheduled(cron = "0 0 17 * * ?" )
|
|
@Scheduled(cron = "0 0 17 * * ?" )
|
|
|
private void sendMessage3(){
|
|
private void sendMessage3(){
|
|
|
-
|
|
|
|
|
|
|
+ logger.log("公共询价","17点定时统计询价单总数服务结束");
|
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
List<BigInteger> list1 = inquiryRemindDao.findvenduseruu();
|
|
|
//找到询价推荐表中的所有公司
|
|
//找到询价推荐表中的所有公司
|
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
List<BigInteger> list2 = inquiryRemindDao.findvenduu();
|
|
@@ -444,6 +457,7 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ logger.log("公共询价","17点定时统计询价单总数服务结束");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|