mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
@@ -252,16 +252,29 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||
public int updatePileStationInfo(PileStationInfo pileStationInfo) {
|
||||
// 清缓存
|
||||
String redisKey = CacheConstants.SELECT_PILE_STATION_INFO_BY_ID + pileStationInfo.getId();
|
||||
redisCache.deleteObject(redisKey);
|
||||
|
||||
pileStationInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
pileStationInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
// 同步组织中的名称,联系人,电话
|
||||
// sysDeptService.updateDept()
|
||||
int i = pileStationInfoMapper.updatePileStationInfo(pileStationInfo);
|
||||
|
||||
return pileStationInfoMapper.updatePileStationInfo(pileStationInfo);
|
||||
// 同步组织中的名称,联系人,电话
|
||||
SysDept sysDept = sysDeptService.selectDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
||||
if (sysDept != null) {
|
||||
sysDept.setDeptName(pileStationInfo.getStationName());
|
||||
sysDept.setLeader(pileStationInfo.getStationAdminName());
|
||||
sysDept.setPhone(pileStationInfo.getStationTel());
|
||||
sysDept.setUpdateTime(DateUtils.getNowDate());
|
||||
sysDeptService.updateDept(sysDept);
|
||||
}
|
||||
|
||||
// 再次清缓存
|
||||
redisCache.deleteObject(redisKey);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user