|
@@ -296,7 +296,6 @@ public class NotificationController extends BaseController {
|
|
|
//@Scheduled(cron = "0 0/1 * * * ?")
|
|
|
public void nottime() {
|
|
|
logger.info("》》》》》》》》》》》开始检测商品资质证书和上架费是否过期");
|
|
|
-
|
|
|
//械字号资质证书3个月后过期
|
|
|
Integer count = 0;
|
|
|
String name = "";
|
|
@@ -309,26 +308,6 @@ public class NotificationController extends BaseController {
|
|
|
List<Product> pro1 = notificationDao.productTypeCount(1);
|
|
|
List<Product> pro2 = notificationDao.productTypeCount1(7);
|
|
|
List<Product> pro3 = notificationDao.productTypeCount1(1);
|
|
|
- //上架费
|
|
|
- List<Product> product = notificationDao.productTypeCount2(3);
|
|
|
- List<Product> product1 = notificationDao.productTypeCount2(1);
|
|
|
- List<Product> product2 = notificationDao.productTypeCount3(7);
|
|
|
- List<Product> product3 = notificationDao.productTypeCount3(1);
|
|
|
- Jedis jedis = null;
|
|
|
- String constraint = "";
|
|
|
- if (domain.contains("-b")) {
|
|
|
- jedis = new Jedis("47.119.112.46", 6379);
|
|
|
- jedis.auth("6#xsI%b4o@5c3RoE");
|
|
|
- } else if (domain.contains("localhost")) {
|
|
|
- jedis = new Jedis("192.168.2.100", 6379);
|
|
|
- } else {
|
|
|
- jedis = new Jedis("172.31.165.23", 6379);
|
|
|
- }
|
|
|
- if (!"1".equals(jedis.rpop("constraint"))) {
|
|
|
- jedis.lpush("constraint", "0");
|
|
|
- }
|
|
|
- constraint = jedis.rpop("constraint");
|
|
|
- System.out.println(jedis.rpop("constraint"));
|
|
|
for (int i = 0; i < pro.size(); i++) {
|
|
|
MessageCenter messageCenter = new MessageCenter();
|
|
|
messageCenter.setShopId(pro.get(i).getShopID());
|
|
@@ -440,77 +419,6 @@ public class NotificationController extends BaseController {
|
|
|
name = "";
|
|
|
productID = "";
|
|
|
}
|
|
|
- //上架费
|
|
|
- for (int i = 0; i < product.size(); i++) {
|
|
|
- if (i != 0) {
|
|
|
- name += ",";
|
|
|
- shopID += ",";
|
|
|
- }
|
|
|
- name += product.get(i).getName();
|
|
|
- shopID += product.get(i).getShopID();
|
|
|
- }
|
|
|
- if (!"".equals(name)) {
|
|
|
- Notification notification = new Notification();
|
|
|
- notification.setTheme("以下供应商的上架费将于3个月后到期,请及时提醒供应商续费。");
|
|
|
- notification.setShopContent(name);
|
|
|
- notification.setShopID(shopID);
|
|
|
- notificationDao.addNotification(notification);
|
|
|
- name = "";
|
|
|
- shopID = "";
|
|
|
- }
|
|
|
- //上架费1个月后过期
|
|
|
- for (int i = 0; i < product1.size(); i++) {
|
|
|
- if (i != 0) {
|
|
|
- name += ",";
|
|
|
- shopID += ",";
|
|
|
- }
|
|
|
- name += product1.get(i).getName();
|
|
|
- shopID += product1.get(i).getShopID();
|
|
|
- }
|
|
|
- if (!"".equals(name)) {
|
|
|
- Notification notification = new Notification();
|
|
|
- notification.setTheme("以下供应商的上架费将于1个月后到期,请及时提醒供应商续费。");
|
|
|
- notification.setShopContent(name);
|
|
|
- notification.setShopID(shopID);
|
|
|
- notificationDao.addNotification(notification);
|
|
|
- name = "";
|
|
|
- shopID = "";
|
|
|
- }
|
|
|
- //上架费7日后过期
|
|
|
- for (int i = 0; i < product2.size(); i++) {
|
|
|
- if (i != 0) {
|
|
|
- name += ",";
|
|
|
- shopID += ",";
|
|
|
- }
|
|
|
- name += product2.get(i).getName();
|
|
|
- shopID += product2.get(i).getShopID();
|
|
|
- }
|
|
|
- if (!"".equals(name)) {
|
|
|
- Notification notification = new Notification();
|
|
|
- notification.setTheme("以下供应商的上架费将于7天后到期,请及时提醒供应商续费。");
|
|
|
- notification.setShopContent(name);
|
|
|
- notification.setShopID(shopID);
|
|
|
- notificationDao.addNotification(notification);
|
|
|
- name = "";
|
|
|
- shopID = "";
|
|
|
- }
|
|
|
- //上架费今日后过期
|
|
|
- for (int i = 0; i < product3.size(); i++) {
|
|
|
- if (i != 0) {
|
|
|
- name += ",";
|
|
|
- shopID += ",";
|
|
|
- }
|
|
|
- name += product3.get(i).getName();
|
|
|
- shopID += product3.get(i).getShopID();
|
|
|
- }
|
|
|
- if (!"".equals(name)) {
|
|
|
- Notification notification = new Notification();
|
|
|
- notification.setTheme("以下供应商的上架费将于今天后到期,请及时提醒供应商续费。");
|
|
|
- notification.setShopContent(name);
|
|
|
- notification.setShopID(shopID);
|
|
|
- notificationDao.addNotification(notification);
|
|
|
- }
|
|
|
- jedis.lpush("constraint", "1");
|
|
|
}
|
|
|
}
|
|
|
|