|
@@ -38,14 +38,28 @@ public class DeviceSimJob {
|
|
String now = DataTime.getSring();
|
|
String now = DataTime.getSring();
|
|
Map<String, SysDictRedis> stringSysDictRedisMap = SysDictUtils.get(EnumMercCostMsgConfig.Code.CODE.getCode());
|
|
Map<String, SysDictRedis> stringSysDictRedisMap = SysDictUtils.get(EnumMercCostMsgConfig.Code.CODE.getCode());
|
|
String tel = stringSysDictRedisMap.get(EnumMercCostMsgConfig.CUSTOM_TEL.getCode()).toString();
|
|
String tel = stringSysDictRedisMap.get(EnumMercCostMsgConfig.CUSTOM_TEL.getCode()).toString();
|
|
|
|
+ String mmiTime = DataTime.getStringAround(0, -1, 0, 0, 0, 0, now);
|
|
//即将过期
|
|
//即将过期
|
|
FunctionUtils.NoParamsNoResult timeout1 = () -> {
|
|
FunctionUtils.NoParamsNoResult timeout1 = () -> {
|
|
int day = SysDictUtils.getValue(EnumDeviceCharging.Code.CODE.getCode(), EnumDeviceCharging.N_200.getCode(), Integer.class);
|
|
int day = SysDictUtils.getValue(EnumDeviceCharging.Code.CODE.getCode(), EnumDeviceCharging.N_200.getCode(), Integer.class);
|
|
String end = DataTime.getStringAround(0, 0, day, 0, 0, 0);
|
|
String end = DataTime.getStringAround(0, 0, day, 0, 0, 0);
|
|
- deviceSimTimeout1(now, end, 1, 1000, tel);
|
|
|
|
|
|
+ JMap<String, Object> map = new JHashMap<String, Object>()
|
|
|
|
+ .set("mmiTime", mmiTime)
|
|
|
|
+ .set("workType", 1)
|
|
|
|
+ .set("begin", now)
|
|
|
|
+ .set("end", end);
|
|
|
|
+ deviceSimTimeout1(map, 1, 100, tel);
|
|
};
|
|
};
|
|
//欠费
|
|
//欠费
|
|
- FunctionUtils.NoParamsNoResult timeout2 = () -> deviceSimTimeout2(now, now, 1, 1000, tel);
|
|
|
|
|
|
+ FunctionUtils.NoParamsNoResult timeout2 = () -> {
|
|
|
|
+ int day = Integer.valueOf(stringSysDictRedisMap.get(EnumMercCostMsgConfig.ARREARAGE_DAY.getCode()).toString());
|
|
|
|
+ String time1 = DataTime.getStringAround(0, 0, day, 0, 0, 0, now);
|
|
|
|
+ JMap<String, Object> map = new JHashMap<String, Object>()
|
|
|
|
+ .set("mmiTime", mmiTime)
|
|
|
|
+ .set("workType", 2)
|
|
|
|
+ .set("end", now);
|
|
|
|
+ deviceSimTimeout2(map, now, time1, 1, 100, tel);
|
|
|
|
+ };
|
|
timeout1.run();
|
|
timeout1.run();
|
|
timeout2.run();
|
|
timeout2.run();
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
@@ -54,15 +68,14 @@ public class DeviceSimJob {
|
|
/**
|
|
/**
|
|
* 即将过期
|
|
* 即将过期
|
|
*
|
|
*
|
|
- * @param begin
|
|
|
|
- * @param end
|
|
|
|
|
|
+ * @param map
|
|
* @param current
|
|
* @param current
|
|
* @param size
|
|
* @param size
|
|
* @param tel
|
|
* @param tel
|
|
*/
|
|
*/
|
|
- private void deviceSimTimeout1(String begin, String end, long current, long size, String tel) {
|
|
|
|
|
|
+ private void deviceSimTimeout1(JMap<String, Object> map, long current, long size, String tel) {
|
|
//查询数据
|
|
//查询数据
|
|
- IPage<Long> longIPage = deviceSimMapper.deviceSimTimeout(Page.of(current, size), begin, end);
|
|
|
|
|
|
+ IPage<Long> longIPage = deviceSimMapper.deviceSimTimeout(Page.of(current, size), map);
|
|
List<Long> mercIds = longIPage.getRecords();
|
|
List<Long> mercIds = longIPage.getRecords();
|
|
if (!Emptys.check(mercIds)) {
|
|
if (!Emptys.check(mercIds)) {
|
|
return;
|
|
return;
|
|
@@ -77,21 +90,21 @@ public class DeviceSimJob {
|
|
.builder();
|
|
.builder();
|
|
//下一页
|
|
//下一页
|
|
current++;
|
|
current++;
|
|
- deviceSimTimeout1(begin, end, current, size, tel);
|
|
|
|
|
|
+ deviceSimTimeout1(map, current, size, tel);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 已欠费
|
|
* 已欠费
|
|
*
|
|
*
|
|
- * @param end
|
|
|
|
|
|
+ * @param map
|
|
* @param thisTime
|
|
* @param thisTime
|
|
* @param current
|
|
* @param current
|
|
* @param size
|
|
* @param size
|
|
* @param tel
|
|
* @param tel
|
|
*/
|
|
*/
|
|
- private void deviceSimTimeout2(String end, String thisTime, long current, long size, String tel) {
|
|
|
|
|
|
+ private void deviceSimTimeout2(JMap<String, Object> map, String thisTime, String time1, long current, long size, String tel) {
|
|
//查询数据
|
|
//查询数据
|
|
- IPage<Long> longIPage = deviceSimMapper.deviceSimTimeout(Page.of(current, size), null, end);
|
|
|
|
|
|
+ IPage<Long> longIPage = deviceSimMapper.deviceSimTimeout(Page.of(current, size), map);
|
|
List<Long> mercIds = longIPage.getRecords();
|
|
List<Long> mercIds = longIPage.getRecords();
|
|
if (!Emptys.check(mercIds)) {
|
|
if (!Emptys.check(mercIds)) {
|
|
return;
|
|
return;
|
|
@@ -100,7 +113,7 @@ public class DeviceSimJob {
|
|
JMap<String, Object> params = new JHashMap<String, Object>()
|
|
JMap<String, Object> params = new JHashMap<String, Object>()
|
|
.set("time0", thisTime)
|
|
.set("time0", thisTime)
|
|
.set("type", "设备流量卡")
|
|
.set("type", "设备流量卡")
|
|
- .set("time1", "")
|
|
|
|
|
|
+ .set("time1", time1)
|
|
.set("phone", tel);
|
|
.set("phone", tel);
|
|
MsgUtils.sendMsg(15L, mercIds)
|
|
MsgUtils.sendMsg(15L, mercIds)
|
|
.official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
|
|
.official(userInfo -> new MsgUtils.MsgInfo(userInfo.getMpOpenid(), params))
|
|
@@ -108,6 +121,6 @@ public class DeviceSimJob {
|
|
.builder();
|
|
.builder();
|
|
//下一页
|
|
//下一页
|
|
current++;
|
|
current++;
|
|
- deviceSimTimeout2(end, thisTime, current, size, tel);
|
|
|
|
|
|
+ deviceSimTimeout2(map, thisTime, time1, current, size, tel);
|
|
}
|
|
}
|
|
}
|
|
}
|