刘光辉
3 小时以前 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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.DmsWenjianXiudingShenheMapper">
 
    <resultMap id="BaseResultMap" type="jnpf.dmsEntity.DmsWenjianXiudingShenheEntity">
        <id column="f_id" property="id"/>
        <result column="shenhe_ren_id" property="shenheRenId"/>
        <result column="yushe_shengxiao_riqi" property="yusheShengxiaoRiqi"/>
        <result column="shengxiao_riqi" property="shengxiaoRiqi"/>
        <result column="youxiao_qi_zhi" property="youxiaoQiZhi"/>
        <result column="tiyi_ren_id" property="creatorUserId"/>
        <result column="tiyi_riqi" property="creatorTime"/>
        <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="f_delete_mark" property="deleteMark"/>
        <result column="xiuding_shenqing_zixiang_id" property="xiudingShenqingZixiangId"/>
        <result column="biangeng_fangshi" property="biangengFangshi"/>
        <result column="wenjian_mingcheng" property="wenjianMingcheng"/>
        <result column="wenjian" property="wenjian"/>
        <result column="chayue_shouquan_fanwei_id" property="chayueShouquanFanweiId"/>
        <result column="guishu_bumen_id" property="guishuBumenId"/>
        <result column="shifou_peixun" property="shifouPeixun"/>
        <result column="peixun_wancheng_riqi" property="peixunWanchengRiqi"/>
        <result column="wenjian_id" property="wenjianId"/>
        <result column="yuan_wenjian_banben_id" property="yuanWenjianBanbenId"/>
        <result column="shengxiao_wenjian_banben_id" property="shengxiaoWenjianBanbenId"/>
        <result column="banben_shengxiao_shijian" property="banbenShengxiaoShijian"/>
        <result column="wenjian_mulu_id" property="wenjianMuluId"/>
    </resultMap>
 
    <select id="selectByFlowForUpdate" resultMap="BaseResultMap">
        SELECT chayue_shouquan_fanwei_id, shenhe_ren_id, yushe_shengxiao_riqi, shengxiao_riqi, youxiao_qi_zhi, tiyi_ren_id, tiyi_riqi, wenjian_mulu_id, f_id, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state,
               f_delete_mark, xiuding_shenqing_zixiang_id, biangeng_fangshi,
               wenjian_mingcheng, wenjian, guishu_bumen_id,
               shifou_peixun, peixun_wancheng_riqi,
               wenjian_id, yuan_wenjian_banben_id, shengxiao_wenjian_banben_id,
               banben_shengxiao_shijian
        FROM dms_wenjian_xiuding_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 dms_wenjian_xiuding_shenhe
        SET banben_shengxiao_shijian = #{banbenShengxiaoShijian},
            wenjian_id = #{wenjianId},
            yuan_wenjian_banben_id = #{yuanWenjianBanbenId},
            shengxiao_wenjian_banben_id = #{shengxiaoWenjianBanbenId}
        WHERE f_id = #{id}
          AND f_tenant_id = #{tenantId}
          AND banben_shengxiao_shijian IS NULL
          AND shengxiao_wenjian_banben_id IS NULL
          AND f_delete_mark IS NULL
    </update>
 
</mapper>