From d4fabb188a2426c3e0a0d13074c81c7b9f54ca97 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期六, 20 一月 2024 11:00:04 +0800
Subject: [PATCH] 2024-01-20 朱宝民 用户实体类id改为userId

---
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java |    8 ++++----
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java            |    4 ++--
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml                      |   18 +++++++++---------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java
index f7f99ee..1cfbd29 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java
@@ -51,9 +51,9 @@
     ASSIGN_UUID(4), //鍏ㄥ眬鍞竴鐨� uuid
     */
     @JSONField(serializeUsing= ObjectWriterImplToString.class)
-    @TableId(type = IdType.INPUT)
+    @TableId(value = "id", type = IdType.INPUT)
     @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    public Long id;
+    public Long userId;
 
 
     @Schema(description = "鎵�灞炵墖鍖篒D", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
index 9cc43ba..d0a9b56 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
@@ -6,7 +6,7 @@
     <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaUser">
         <!--@mbg.generated-->
         <!--@Table ba_user-->
-        <id property="id" column="id" />
+        <id property="userId" column="id" />
         <result property="blockId" column="blockId"/>
         <result property="userName" column="name"/>
         <result property="phone" column="phone"/>
@@ -20,7 +20,7 @@
     <resultMap id="partResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaUser">
         <!--@mbg.generated-->
         <!--@Table ba_user-->
-        <id property="id" column="id" />
+        <id property="userId" column="id" />
         <result property="userName" column="name"/>
         <result property="phone" column="phone"/>
         <result property="orgTag" column="orgTag"/>
@@ -29,7 +29,7 @@
     </resultMap>
 
     <resultMap id="loginResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaUser">
-        <id property="id" column="id" />
+        <id property="userId" column="id" />
         <result property="blockId" column="blockId"/>
         <result property="userName" column="name"/>
         <result property="phone" column="phone"/>
@@ -100,7 +100,7 @@
     </select>
     <insert id="putin" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUser">
         insert into ba_user (<include refid="Base_Column_List" />)
-        values (#{id,jdbcType=BIGINT},
+        values (#{userId,jdbcType=BIGINT},
         #{blockId,jdbcType=BIGINT},
         #{userName,jdbcType=VARCHAR},
         #{phone,jdbcType=VARCHAR},
@@ -114,7 +114,7 @@
     <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUser">
         insert into ba_user
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">
+            <if test="userId != null">
                 id,
             </if>
             <if test="blockId != null">
@@ -143,8 +143,8 @@
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                #{id,jdbcType=BIGINT},
+            <if test="userId != null">
+                #{userId,jdbcType=BIGINT},
             </if>
             <if test="blockId != null">
                 #{blockId,jdbcType=BIGINT},
@@ -195,7 +195,7 @@
                 deleted = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
             </if>
         </set>
-        where id = #{id,jdbcType=BIGINT}
+        where id = #{userId, jdbcType=BIGINT}
     </update>
     <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaUser">
         update ba_user
@@ -205,7 +205,7 @@
         password = #{password,jdbcType=VARCHAR},
         disabled = #{disabled,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
         deleted = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}
-        where id = #{id,jdbcType=BIGINT}
+        where id = #{userId,jdbcType=BIGINT}
     </update>
     <update id="changePassword" >
         update ba_user
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
index 2a1b61d..e552d73 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
@@ -142,7 +142,7 @@
         if (bindingResult != null && bindingResult.hasErrors()) {
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
         }
-        po.id = null;
+        po.userId = null;
         int count;
         try {
             po.supperAdmin = Constant.no.byteValue() ;
@@ -159,7 +159,7 @@
                 po.password = MD5.encrypt(defaultPassword);
             }
             count = this.sv.save(po);
-            this.sv.setRoles(po.id, po.roleIds);
+            this.sv.setRoles(po.userId, po.roleIds);
         } catch (Exception e) {
             log.error("淇濆瓨鐢ㄦ埛寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage());
@@ -192,7 +192,7 @@
         if (bindingResult != null && bindingResult.hasErrors()) {
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
         }
-        if (po.id == null) {
+        if (po.userId == null) {
             return BaseResponseUtils.buildFail("鏃犳暟鎹疄浣揑D");
         }
         int count;
@@ -201,7 +201,7 @@
             po.deleted = null;//璁剧疆涓簄ull锛屼笉鍋氭洿鏂�
             po.orgTag = null;//璁剧疆涓簄ull锛屼笉鍋氭洿鏂�
             count = this.sv.update(po);
-            this.sv.setRoles(po.id, po.roleIds);
+            this.sv.setRoles(po.userId, po.roleIds);
         } catch (Exception e) {
             log.error("淇濆瓨鐢ㄦ埛寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage());

--
Gitblit v1.8.0