|
@@ -9,6 +9,7 @@ import com.caimei.modules.product.entity.Product;
|
|
|
import com.caimei.modules.sys.dao.NotificationDao;
|
|
|
import com.caimei.modules.sys.entity.Notification;
|
|
|
import com.caimei.modules.sys.service.NotificationService;
|
|
|
+import com.caimei.modules.sys.utils.SMSUtils;
|
|
|
import com.caimei.modules.user.dao.MessageCenterDao;
|
|
|
import com.caimei.modules.user.entity.MessageCenter;
|
|
|
import com.caimei.utils.StringUtils;
|
|
@@ -301,6 +302,7 @@ public class NotificationController extends BaseController {
|
|
|
return "modules/sys/Notification";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
*constraint加入缓存
|
|
|
*/
|
|
@@ -312,8 +314,8 @@ public class NotificationController extends BaseController {
|
|
|
jedis.lpush("constraint","0");
|
|
|
}
|
|
|
|
|
|
-// @Scheduled(cron = "0 0 11 * * ?")
|
|
|
-@Scheduled(cron = "0 0/3 * * * ?")
|
|
|
+ @Scheduled(cron = "0 0 11 * * ?")
|
|
|
+//@Scheduled(cron = "0 0/10 * * * ?")
|
|
|
public void mess() throws Exception {
|
|
|
Date date=new Date();
|
|
|
String name="";
|
|
@@ -349,7 +351,7 @@ public class NotificationController extends BaseController {
|
|
|
if(count<=0) {
|
|
|
String bindMobile = messageCenterDao.Mobile(pro.get(i).getShopID());
|
|
|
String content = "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“" + name + "”资质证书将于3个月后失效,请及时登录采美网站上传新证书。";
|
|
|
- boolean sendSms = newOrderService.getSendSms(9, bindMobile, content);
|
|
|
+ boolean sendSms = SMSUtils.sendSms(1,bindMobile, content);
|
|
|
if (sendSms) {
|
|
|
logger.info(">>>>>>>资质证书将于3个月后失效短信推送成功");
|
|
|
}
|
|
@@ -383,7 +385,7 @@ public class NotificationController extends BaseController {
|
|
|
if(count<=0) {
|
|
|
String bindMobile = messageCenterDao.Mobile(pro1.get(i).getShopID());
|
|
|
String content = "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“" + name + "”资质证书将于1个月后失效,请及时登录采美网站上传新证书。";
|
|
|
- boolean sendSms = newOrderService.getSendSms(9, bindMobile, content);
|
|
|
+ boolean sendSms = SMSUtils.sendSms(1,bindMobile, content);
|
|
|
if (sendSms) {
|
|
|
logger.info(">>>>>>>资质证书将于1个月后失效短信推送成功");
|
|
|
}
|
|
@@ -417,7 +419,7 @@ public class NotificationController extends BaseController {
|
|
|
if(count<=0) {
|
|
|
String bindMobile = messageCenterDao.Mobile(pro2.get(i).getShopID());
|
|
|
String content = "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“" + name + "”资质证书将于7天后失效,请及时登录采美网站上传新证书。";
|
|
|
- boolean sendSms = newOrderService.getSendSms(9, bindMobile, content);
|
|
|
+ boolean sendSms = SMSUtils.sendSms(1,bindMobile, content);
|
|
|
if (sendSms) {
|
|
|
logger.info(">>>>>>>资质证书将于7天后失效短信推送成功");
|
|
|
}
|
|
@@ -451,7 +453,7 @@ public class NotificationController extends BaseController {
|
|
|
if(count<=0){
|
|
|
String bindMobile= messageCenterDao.Mobile(pro3.get(i).getShopID());
|
|
|
String content = "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“"+name+"”资质证书将于今天后失效,请及时登录采美网站上传新证书。";
|
|
|
- boolean sendSms = newOrderService.getSendSms(9, bindMobile, content);
|
|
|
+ boolean sendSms = SMSUtils.sendSms(1,bindMobile, content);
|
|
|
if(sendSms){
|
|
|
logger.info(">>>>>>>资质证书将于今天后后失效短信推送成功");
|
|
|
}
|
|
@@ -498,8 +500,8 @@ if(count<=0){
|
|
|
notificationDao.hides();
|
|
|
return "redirect:"+Global.getAdminPath()+"/sys/Notification/list";
|
|
|
}
|
|
|
-// @Scheduled(cron = "0 0/15 * * * ?")
|
|
|
-@Scheduled(cron = "0 0/3 * * * ?")
|
|
|
+ @Scheduled(cron = "0 0/15 * * * ?")
|
|
|
+//@Scheduled(cron = "0 0/3 * * * ?")
|
|
|
public void time(){
|
|
|
logger.info("》》》》》》》》》》》开始检测商品资质证书和上架费是否过期");
|
|
|
//械字号资质证书3个月后过期
|