mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-13 18:48:04 +08:00
添加程序版本字段
This commit is contained in:
@@ -65,6 +65,15 @@ public interface PileBasicInfoService {
|
||||
*/
|
||||
int updateSimInfo(PileBasicInfo pileBasicInfo);
|
||||
|
||||
/**
|
||||
* 更新充电桩程序版本
|
||||
*
|
||||
* @param pileSn 充电桩编号
|
||||
* @param programVersion 程序版本
|
||||
* @return 更新行数
|
||||
*/
|
||||
int updateProgramVersion(String pileSn, String programVersion);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
|
||||
@@ -220,6 +220,32 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
return pileBasicInfoMapper.updatePileBasicInfo(pileBasicInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新充电桩程序版本
|
||||
*
|
||||
* @param pileSn 充电桩编号
|
||||
* @param programVersion 程序版本
|
||||
* @return 更新行数
|
||||
*/
|
||||
@Override
|
||||
public int updateProgramVersion(String pileSn, String programVersion) {
|
||||
String normalizedProgramVersion = PileProgramVersionUtils.normalize(programVersion);
|
||||
if (StringUtils.isBlank(pileSn) || StringUtils.isBlank(normalizedProgramVersion)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PileBasicInfo basicInfo = selectPileBasicInfoBySN(pileSn);
|
||||
if (basicInfo == null || StringUtils.equals(normalizedProgramVersion, basicInfo.getProgramVersion())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int row = pileBasicInfoMapper.updateProgramVersion(pileSn, normalizedProgramVersion);
|
||||
if (row > 0) {
|
||||
cleanRedisCache(pileSn);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user