修正一些 bug
This commit is contained in:
parent
5519b14824
commit
fb77e8376d
@ -22,18 +22,19 @@ public interface SimCardsMapper extends MPJBaseMapper<SimCard>{
|
|||||||
"WHERE deviceid = #{deviceid}")
|
"WHERE deviceid = #{deviceid}")
|
||||||
int updateSimCardInfo(SimCard simCard);
|
int updateSimCardInfo(SimCard simCard);
|
||||||
|
|
||||||
|
@Update("UPDATE simcards SET " +
|
||||||
|
"updatetime = #{updatetime}, " +
|
||||||
|
"msisdn = #{msisdn}, " +
|
||||||
|
"status = #{status} " +
|
||||||
|
"WHERE deviceid = #{deviceid}")
|
||||||
|
int updateCardStatusInfo(SimCard simCard);
|
||||||
|
|
||||||
@Update("UPDATE simcards SET " +
|
@Update("UPDATE simcards SET " +
|
||||||
"updatetime = #{updatetime}, " +
|
"updatetime = #{updatetime}, " +
|
||||||
"remaining = #{remaining}, " +
|
"remaining = #{remaining}, " +
|
||||||
"total = #{total}, " +
|
"total = #{total}, " +
|
||||||
"used = #{used} " +
|
"used = #{used} " +
|
||||||
"WHERE deviceid = #{deviceid}")
|
"WHERE deviceid = #{deviceid}")
|
||||||
int updateFlowInfo(SimCard simCard);
|
int updateCardTrafficInfo(SimCard simCard);
|
||||||
|
|
||||||
@Update("UPDATE simcards SET " +
|
|
||||||
"updatetime = #{updatetime}, " +
|
|
||||||
"status = #{status} " +
|
|
||||||
"WHERE deviceid = #{deviceid}")
|
|
||||||
int updateStatus(SimCard simCard);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ public class SimStatusChecker {
|
|||||||
CardStatusData status = response.getData();
|
CardStatusData status = response.getData();
|
||||||
simCard.setUpdatetime(new Date());
|
simCard.setUpdatetime(new Date());
|
||||||
simCard.setStatus(status.getStatusCode());
|
simCard.setStatus(status.getStatusCode());
|
||||||
simCardsMapper.updateSimCardInfo(simCard);
|
simCardsMapper.updateCardStatusInfo(simCard);
|
||||||
|
|
||||||
warningService.checkSimCardStatus(device, simCard);
|
warningService.checkSimCardStatus(device, simCard);
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ public class SimStatusChecker {
|
|||||||
status.getStatusCode(), status.getStatusDesc());
|
status.getStatusCode(), status.getStatusDesc());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("更新设备{}的SIM卡状态失败: ", device.getDeviceId(), e);
|
logger.error("更新设备{}的SIM卡状态失败: ", device.getDeviceId(), e);
|
||||||
throw e;
|
// throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ public class SimStatusChecker {
|
|||||||
simCard.setRemaining(BigDecimal.valueOf(usage.getLeft()));
|
simCard.setRemaining(BigDecimal.valueOf(usage.getLeft()));
|
||||||
simCard.setUsed(BigDecimal.valueOf(usage.getUsed()));
|
simCard.setUsed(BigDecimal.valueOf(usage.getUsed()));
|
||||||
simCard.setTotal(BigDecimal.valueOf(usage.getTotal()));
|
simCard.setTotal(BigDecimal.valueOf(usage.getTotal()));
|
||||||
simCardsMapper.updateSimCardInfo(simCard);
|
simCardsMapper.updateCardTrafficInfo(simCard);
|
||||||
|
|
||||||
warningService.checkSimCardTraffic(device, simCard);
|
warningService.checkSimCardTraffic(device, simCard);
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ public class SimStatusChecker {
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("设备{}更新SIM卡流量失败: ", device.getDeviceId(), e);
|
logger.error("设备{}更新SIM卡流量失败: ", device.getDeviceId(), e);
|
||||||
throw e;
|
//throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -191,7 +191,7 @@
|
|||||||
{field: 'deviceid', title: '设备号'},
|
{field: 'deviceid', title: '设备号'},
|
||||||
{field: 'iccid', title: 'ICCID'},
|
{field: 'iccid', title: 'ICCID'},
|
||||||
{field: 'msisdn', title: 'SIM 卡号'},
|
{field: 'msisdn', title: 'SIM 卡号'},
|
||||||
{field: 'updatetime', title: '更新时间'},
|
{field: 'updatetime', title: '更新时间',templet: "<div>{{layui.util.toDateString(d.updatetime, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
|
||||||
{field: 'status', title: '状态',templet: '#statusTpl'},
|
{field: 'status', title: '状态',templet: '#statusTpl'},
|
||||||
{field: 'remaining', title: '剩余流量(MB)'},
|
{field: 'remaining', title: '剩余流量(MB)'},
|
||||||
{field: 'used', title: '已使用流量(MB)'},
|
{field: 'used', title: '已使用流量(MB)'},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user