This commit is contained in:
2023-09-25 16:11:16 +08:00

View File

@@ -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);
}