mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 修改运营商名称时,将对应的部门表中名称进行对应修改
This commit is contained in:
@@ -209,6 +209,17 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
@Override
|
||||
public int updatePileMerchantInfo(PileMerchantInfo pileMerchantInfo) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user