shiqian 3 роки тому
батько
коміт
4e7875097b

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/CzrkJzdzMapper.java

@@ -67,4 +67,6 @@ import java.util.List;
     List<Long> listCzrkIdByTypeAreaIdUserName(@Param("type") int type, @Param("areaId") Long areaId, @Param("userName") String userName);
 
     int updateByIdCard(CzrkJzdz czrkJzdz);
+
+    int updateByCzrkId(CzrkJzdz czrkJzdz);
 }

+ 8 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkJzdzServiceImpl.java

@@ -111,4 +111,12 @@ public class CzrkJzdzServiceImpl implements ICzrkJzdzService {
     public int updateByIdCard(CzrkJzdz czrkJzdz) {
         return czrkJzdzMapper.updateByIdCard(czrkJzdz);
     }
+
+
+    @Override
+    public int updateByCzrkId(CzrkJzdz czrkJzdz) {
+        return czrkJzdzMapper.updateByCzrkId(czrkJzdz);
+    }
+
+
 }

+ 1 - 1
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -293,7 +293,7 @@ public class CzrkServiceImpl implements ICzrkService {
         CzrkJzdz czrkJzdz = new CzrkJzdz();
         czrkJzdz.setCzrkId(czrkId);
         czrkJzdz.setStatus("N");
-        int update = czrkJzdzService.updateByIdCard(czrkJzdz);
+        int update = czrkJzdzService.updateByCzrkId(czrkJzdz);
         return 1;
     }
 

+ 1 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/ICzrkJzdzService.java

@@ -66,4 +66,5 @@ public interface ICzrkJzdzService {
     List<Long> listCzrkIdByTypeAreaIdUserName(int type, Long areaId, String userName);
 
     int updateByIdCard(CzrkJzdz czrkJzdz);
+    int updateByCzrkId(CzrkJzdz czrkJzdz);
 }

+ 28 - 0
boman-web-core/src/main/resources/mapper/CzrkJzdzMapper.xml

@@ -175,6 +175,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id_card = #{idCard}
     </update>
 
+    <update id="updateByCzrkId" >
+        update czrk_jzdz
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="czrkId != null">czrk_id = #{czrkId},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="provinceId != null">province_id = #{provinceId},</if>
+            <if test="province != null">province = #{province},</if>
+            <if test="cityId != null">city_id = #{cityId},</if>
+            <if test="city != null">city = #{city},</if>
+            <if test="regionId != null">region_id = #{regionId},</if>
+            <if test="region != null">region = #{region},</if>
+            <if test="townId != null">town_id = #{townId},</if>
+            <if test="town != null">town = #{town},</if>
+            <if test="villageId != null">village_id = #{villageId},</if>
+            <if test="village != null">village = #{village},</if>
+            <if test="nowIn != null">now_in = #{nowIn},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = sysdate(),</if>
+            <if test="status != null">status = #{status},</if>
+        </trim>
+        where czrk_id = #{czrkId}
+    </update>
+
     <delete id="deleteCzrkJzdzById" parameterType="Long">
         delete from czrk_jzdz where id = #{id}
     </delete>