xucaiqin 1 mēnesi atpakaļ
vecāks
revīzija
8c1b45caef

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsRoleDao.java

@@ -28,7 +28,7 @@ public interface KwsRoleDao extends BaseMapper<KwsRole> {
      * @param record
      * @return
      */
-    int update(KwsRole record);
+//    int update(KwsRole record);
 
     /**
      * 详情查询

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsRoleService.java

@@ -302,7 +302,7 @@ public class KwsRoleService {
         kwsRoleTable.setId(reqVo.getId());
         kwsRoleTable.setName(reqVo.getName());
         kwsRoleTable.setRemark(reqVo.getRemark());
-        if (kwsRoleDao.update(kwsRoleTable) <= 0) {
+        if (kwsRoleDao.updateById(kwsRoleTable) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
         if (StringUtils.isNotBlank(reqVo.getDeptIds())) {

+ 13 - 102
sckw-modules/sckw-system/src/main/resources/mapper/KwsRoleDao.xml

@@ -7,6 +7,7 @@
     <result column="ent_id" jdbcType="BIGINT" property="entId" />
     <result column="remark" jdbcType="VARCHAR" property="remark" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="admin_flag" jdbcType="INTEGER" property="adminFlag" />
     <result column="create_by" jdbcType="BIGINT" property="createBy" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_by" jdbcType="BIGINT" property="updateBy" />
@@ -15,8 +16,17 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id, name, ent_id, remark, status, create_by, create_time, update_by, update_time,
-    del_flag
+      id,
+      name,
+      ent_id,
+      remark,
+      status,
+      admin_flag,
+      create_by,
+      create_time,
+      update_by,
+      update_time,
+      del_flag
   </sql>
 
   <select id="selectByKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -26,107 +36,8 @@
     where id = #{id,jdbcType=BIGINT}
   </select>
 
-  <insert id="insert" parameterType="com.sckw.system.model.KwsRole">
-    insert into kws_role
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="name != null">
-        name,
-      </if>
-        <if test="entId != null">
-            ent_id,
-      </if>
-      <if test="remark != null">
-        remark,
-      </if>
-      <if test="status != null">
-        status,
-      </if>
-      <if test="createBy != null">
-        create_by,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateBy != null">
-        update_by,
-      </if>
-      <if test="updateTime != null">
-        update_time,
-      </if>
-      <if test="delFlag != null">
-        del_flag,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="entId != null">
-         #{entId,jdbcType=VARCHAR},
-      </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="createBy != null">
-        #{createBy,jdbcType=BIGINT},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateBy != null">
-        #{updateBy,jdbcType=BIGINT},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="delFlag != null">
-        #{delFlag,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
 
-  <update id="update" parameterType="com.sckw.system.model.KwsRole">
-      update kws_role
-      <set>
-          <if test="name != null">
-              name = #{name,jdbcType=VARCHAR},
-          </if>
-          <if test="entId != null">
-              ent_id = #{entId,jdbcType=VARCHAR},
-          </if>
-          <if test="remark != null">
-              remark = #{remark,jdbcType=VARCHAR},
-          </if>
-          <if test="status != null">
-              status = #{status,jdbcType=INTEGER},
-          </if>
-          <if test="createBy != null">
-              create_by = #{createBy,jdbcType=BIGINT},
-          </if>
-          <if test="createTime != null">
-              create_time = #{createTime,jdbcType=TIMESTAMP},
-          </if>
-          <if test="updateBy != null">
-              update_by = #{updateBy,jdbcType=BIGINT},
-          </if>
-          <if test="updateTime != null">
-              update_time = #{updateTime,jdbcType=TIMESTAMP},
-          </if>
-          <if test="delFlag != null">
-              del_flag = #{delFlag,jdbcType=INTEGER},
-          </if>
-      </set>
-      where id = #{id,jdbcType=BIGINT}
-  </update>
+
 
   <select id="findPage" resultType="com.sckw.system.model.vo.res.RoleResVo" parameterType="java.util.Map" >
       select sr.id,