diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileBasicInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileBasicInfoService.java index b5353c21c..05d2a6d2b 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileBasicInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileBasicInfoService.java @@ -55,6 +55,14 @@ public interface IPileBasicInfoService { */ int updatePileBasicInfo(PileBasicInfo pileBasicInfo); + /** + * 修改设备sim卡信息 + * + * @param pileBasicInfo 设备管理 + * @return 结果 + */ + int updateSimInfo(PileBasicInfo pileBasicInfo); + /** * 批量删除设备管理 * diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java index e5510917f..9695abc77 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java @@ -173,6 +173,22 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService { return pileBasicInfoMapper.updatePileBasicInfo(pileBasicInfo); } + /** + * 修改设备sim卡信息 + * + * @param pileBasicInfo 设备管理 + * @return 结果 + */ + @Override + public int updateSimInfo(PileBasicInfo pileBasicInfo) { + Long stationId = pileBasicInfo.getStationId(); + // 清缓存 + cleanRedisCache(pileBasicInfo.getSn()); + pileBasicInfo.setUpdateTime(DateUtils.getNowDate()); + redisCache.deleteObject(CacheConstants.GET_PILE_LIST_BY_STATION_ID + stationId); + return pileBasicInfoMapper.updatePileBasicInfo(pileBasicInfo); + } + /** * 批量删除设备管理 * @@ -576,7 +592,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService { // sim信息已经存库了 然后更新充电桩的sim卡 basicInfo.setSimId(simInfo.getId()); } - updatePileBasicInfo(basicInfo); + updateSimInfo(basicInfo); } /**