From 2e14783eff5ef42e5c2e2d19ab92e118b4de2565 Mon Sep 17 00:00:00 2001 From: terrfly Date: Mon, 27 May 2024 10:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=EF=BC=8C=20=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=95=B0=E6=8D=AE=E5=BA=93=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jeequan/jeepay/service/impl/SysUserService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java index d97051f..63c87b0 100644 --- a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java @@ -137,6 +137,13 @@ public class SysUserService extends ServiceImpl { sysUserAuthService.resetAuthInfo(sysUserId, sysUser.getLoginUsername(), null, null, dbRecord.getSysType()); } + //修改了编号 + if(StringUtils.isNotEmpty(sysUser.getUserNo()) && dbRecord.getUserNo() != null && !dbRecord.getUserNo().equals(sysUser.getUserNo())){ + if(count(SysUser.gw().eq(SysUser::getSysType, dbRecord.getSysType()).eq(SysUser::getUserNo, sysUser.getUserNo())) > 0){ + throw new BizException("该员工编号已关联其他用户!"); + } + } + //修改用户主表 baseMapper.updateById(sysUser); }