Prechádzať zdrojové kódy

设备流量卡过期消息

李进 1 rok pred
rodič
commit
91feb11903

+ 13 - 9
device-api-service/src/main/java/com/xy/job/DeviceChargingJob.java

@@ -80,12 +80,14 @@ public class DeviceChargingJob {
             return;
         }
         //发送消息
-        JMap<String, Object> params = new JHashMap<String, Object>()
-                .set("value", "您有设备管理费即将到期")
+        JMap<String, Object> officialParams = new JHashMap<String, Object>()
+                .set("content", String.format("尊敬的客户,您有设备管理费即将到期,为避免设备停机,请及时续费,客服电话%d", tel));
+        JMap<String, Object> miniParams = new JHashMap<String, Object>()
+                .set("content", "您有设备管理费即将到期")
                 .set("phone", tel);
-        MsgUtils.sendMsg(15L, mercIds)
-                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
-                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), params))
+        MsgUtils.sendMsg(17L, mercIds)
+                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), officialParams))
+                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), miniParams))
                 .builder();
         //下一页
         current++;
@@ -110,14 +112,16 @@ public class DeviceChargingJob {
             return;
         }
         //发送消息
-        JMap<String, Object> params = new JHashMap<String, Object>()
+        JMap<String, Object> officialParams = new JHashMap<String, Object>()
+                .set("content", String.format("尊敬的客户,截止%d您的%d已欠费,如您在%d前未完成续费,您的设备将停止交易,客服电话%d", thisTime, "设备管理费", time1, tel));
+        JMap<String, Object> miniParams = new JHashMap<String, Object>()
                 .set("time0", thisTime)
                 .set("type", "设备管理费")
                 .set("time1", time1)
                 .set("phone", tel);
-        MsgUtils.sendMsg(15L, mercIds)
-                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
-                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), params))
+        MsgUtils.sendMsg(17L, mercIds)
+                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), officialParams))
+                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), miniParams))
                 .builder();
         //下一页
         current++;

+ 13 - 9
device-api-service/src/main/java/com/xy/job/DeviceSimJob.java

@@ -81,12 +81,14 @@ public class DeviceSimJob {
             return;
         }
         //发送消息
-        JMap<String, Object> params = new JHashMap<String, Object>()
-                .set("value", "您有设备流量卡即将到期")
+        JMap<String, Object> officialParams = new JHashMap<String, Object>()
+                .set("content", String.format("尊敬的客户,您有设备流量卡即将到期,为避免设备停机,请及时续费,客服电话%d", tel));
+        JMap<String, Object> miniParams = new JHashMap<String, Object>()
+                .set("content", "您有设备流量卡即将到期")
                 .set("phone", tel);
-        MsgUtils.sendMsg(15L, mercIds)
-                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
-                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), params))
+        MsgUtils.sendMsg(17L, mercIds)
+                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), officialParams))
+                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), miniParams))
                 .builder();
         //下一页
         current++;
@@ -110,14 +112,16 @@ public class DeviceSimJob {
             return;
         }
         //发送消息
-        JMap<String, Object> params = new JHashMap<String, Object>()
+        JMap<String, Object> officialParams = new JHashMap<String, Object>()
+                .set("content", String.format("尊敬的客户,截止%d您的%d已欠费,如您在%d前未完成续费,您的设备将停止交易,客服电话%d", thisTime, "设备流量卡", time1, tel));
+        JMap<String, Object> miniParams = new JHashMap<String, Object>()
                 .set("time0", thisTime)
                 .set("type", "设备流量卡")
                 .set("time1", time1)
                 .set("phone", tel);
-        MsgUtils.sendMsg(15L, mercIds)
-                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
-                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), params))
+        MsgUtils.sendMsg(17L, mercIds)
+                .official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), officialParams))
+                .mini(userInfo -> new MsgUtils.MsgInfo(userInfo.getWechatOpenid(), miniParams))
                 .builder();
         //下一页
         current++;