刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.dmsMapper.DmsWailaiWenjianXinzengShenheMapper">
    <resultMap id="Audit" type="jnpf.dmsEntity.DmsWailaiWenjianXinzengShenheEntity">
        <id column="f_id" property="id"/>
        <result column="f_tenant_id" property="tenantId"/>
        <result column="f_flow_id" property="flowId"/>
        <result column="f_flow_task_id" property="flowTaskId"/>
        <result column="f_flow_state" property="flowState"/>
        <result column="wailai_wenjian_bianhao" property="wailaiWenjianBianhao"/>
        <result column="wenjian_mingcheng" property="wenjianMingcheng"/>
        <result column="banbenhao" property="banbenhao"/>
        <result column="biz_files" property="bizFiles"/>
        <result column="wenjian_mulu_id" property="wenjianMuluId"/>
        <result column="bumen_id" property="bumenId"/>
        <result column="shenqing_ren" property="shenqingRen"/>
        <result column="shenqing_riqi" property="shenqingRiqi"/>
        <result column="wenjian_id" property="wenjianId"/>
        <result column="shengxiao_wenjian_banben_id" property="shengxiaoWenjianBanbenId"/>
        <result column="banben_shengxiao_shijian" property="banbenShengxiaoShijian"/>
    </resultMap>
 
    <select id="selectByFlowForUpdate" resultMap="Audit">
        SELECT f_id, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state,
               wailai_wenjian_bianhao, wenjian_mingcheng, banbenhao, biz_files,
               wenjian_mulu_id, bumen_id, shenqing_ren, shenqing_riqi,
               wenjian_id, shengxiao_wenjian_banben_id, banben_shengxiao_shijian
        FROM public.dms_wailai_wenjian_xinzeng_shenhe
        WHERE f_tenant_id = #{tenantId} AND f_flow_id = #{flowId}
          AND f_flow_task_id = #{taskId} AND f_delete_mark IS NULL
        FOR UPDATE
    </select>
 
    <update id="updateEffectiveVersion">
        UPDATE public.dms_wailai_wenjian_xinzeng_shenhe
        SET wenjian_id = #{wenjianId},
            shengxiao_wenjian_banben_id = #{shengxiaoWenjianBanbenId},
            banben_shengxiao_shijian = #{banbenShengxiaoShijian}
        WHERE f_tenant_id = #{tenantId} AND f_id = #{id}
          AND f_flow_state = 2 AND f_delete_mark IS NULL
          AND wenjian_id IS NULL AND shengxiao_wenjian_banben_id IS NULL
          AND banben_shengxiao_shijian IS NULL
    </update>
</mapper>