From e292ddceabe39bf9088c77932a1a57aa1ef8f08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E7=8B=BC=E8=93=9D=E5=A4=A9?= Date: Thu, 14 Nov 2024 14:32:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A4=B1=E8=B4=A5=E7=9A=84BUG=EF=BC=88?= =?UTF-8?q?=E5=9B=A0=E4=B8=BAtelephone=E5=AD=97=E6=AE=B5=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/guaiguailang/harmony/service/impl/UserServiceImpl.java | 3 +++ src/main/resources/mapper/UserMapper.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java b/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java index b8e12d6..82e74a7 100644 --- a/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java +++ b/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java @@ -185,6 +185,8 @@ public class UserServiceImpl implements UserService { userAddParam.setTelephone(userAddParam.getTelephone()==null?"":userAddParam.getTelephone()); userAddParam.setAvatar(userAddParam.getAvatar()==null?"":userAddParam.getAvatar()); userAddParam.setCode(userAddParam.getCode()==null?"":userAddParam.getCode()); + log.info("开始创建新用户"); + log.info(userAddParam.toString()); int result = userMapper.addUser(userAddParam); if (result == 1) { return ResponseResult.success(userAddParam); @@ -246,6 +248,7 @@ public class UserServiceImpl implements UserService { // 设置不需要更新的字段为 null userInfo.setPassword(null); userInfo.setCreateTime(null); + userInfo.setStatus(String.valueOf(userAddParam.getStatus())); // 使用 LambdaUpdateWrapper 构建更新条件 LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index 837c548..3b47e49 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -75,7 +75,7 @@ INSERT INTO user_info ( id, name, username, password, avatar, status, telephone, email, create_time, merchant_code, deleted, role_id, creator_id ) VALUES ( - #{id}, #{name}, #{username}, #{password}, #{avatar}, #{status}, #{telphone}, #{email}, #{createTime}, + #{id}, #{name}, #{username}, #{password}, #{avatar}, #{status}, #{telephone}, #{email}, #{createTime}, #{merchantCode}, 0, #{roleId}, #{creatorId} )