fix: 修正一些bug
This commit is contained in:
parent
199dc8c092
commit
188f1303e5
@ -37,6 +37,10 @@ public class TrafficCardService {
|
||||
// ICCID变更,关闭旧映射,创建新映射
|
||||
closeExistingMapping(activeMapping);
|
||||
createNewMapping(device.getDeviceid(), currentIccid);
|
||||
|
||||
// 重置MSISDN以强制更新SIM卡号
|
||||
// 换卡了必须重置这些内容,否则会显示旧卡号,后续的查询会出现问题
|
||||
resetCardMsisdn(currentIccid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -101,4 +105,12 @@ public class TrafficCardService {
|
||||
private void closeExistingMapping(TrafficDeviceMapping mapping) {
|
||||
mappingMapper.endMapping(mapping.getId());
|
||||
}
|
||||
|
||||
public void resetCardMsisdn(String iccid) {
|
||||
TrafficCard card = trafficCardMapper.findByIccid(iccid);
|
||||
if (card != null && card.getMsisdn() != null && !card.getMsisdn().isEmpty()) {
|
||||
card.setMsisdn("");
|
||||
trafficCardMapper.updateCardInfo(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user