mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update 修改运营商名称时,将对应的部门表中名称进行对应修改
This commit is contained in:
@@ -209,6 +209,17 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public int updatePileMerchantInfo(PileMerchantInfo pileMerchantInfo) {
|
public int updatePileMerchantInfo(PileMerchantInfo pileMerchantInfo) {
|
||||||
pileMerchantInfo.setUpdateTime(DateUtils.getNowDate());
|
pileMerchantInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// 如果修改运营商名称,需将 sys_menu 表中的 dept_name 字段对应修改
|
||||||
|
String deptId = pileMerchantInfo.getDeptId();
|
||||||
|
SysDept sysDept = sysDeptService.selectDeptById(Long.parseLong(deptId));
|
||||||
|
if (sysDept == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!StringUtils.equals(pileMerchantInfo.getMerchantName(), sysDept.getDeptName())) {
|
||||||
|
// 不一致,进行修改
|
||||||
|
sysDept.setDeptName(pileMerchantInfo.getMerchantName());
|
||||||
|
sysDeptService.updateDept(sysDept);
|
||||||
|
}
|
||||||
return pileMerchantInfoMapper.updatePileMerchantInfo(pileMerchantInfo);
|
return pileMerchantInfoMapper.updatePileMerchantInfo(pileMerchantInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user