From c7691993c7afba22730e7c86fb510adbcd74be25 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 25 Sep 2023 15:59:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E4=BF=AE=E6=94=B9=E8=BF=90?= =?UTF-8?q?=E8=90=A5=E5=95=86=E5=90=8D=E7=A7=B0=E6=97=B6=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E9=83=A8=E9=97=A8=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E8=BF=9B=E8=A1=8C=E5=AF=B9=E5=BA=94=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PileMerchantInfoServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java index a1a5e5085..08bd38786 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java @@ -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); }