刘光辉
14 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
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
<?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="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_id" property="xiudingShenqingId"/>
        <result column="biangeng_fangshi" property="biangengFangshi"/>
        <result column="shengxiao_banben_xuhao" property="shengxiaoBanbenXuhao"/>
        <result column="shengxiao_banbenhao" property="shengxiaoBanbenhao"/>
        <result column="shengxiao_biangeng_xuhao" property="shengxiaoBiangengXuhao"/>
        <result column="banben_shengxiao_shijian" property="banbenShengxiaoShijian"/>
    </resultMap>
 
    <select id="selectByFlowForUpdate" resultMap="BaseResultMap">
        SELECT f_id, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state,
               f_delete_mark, xiuding_shenqing_id, biangeng_fangshi,
               shengxiao_banben_xuhao, shengxiao_banbenhao,
               shengxiao_biangeng_xuhao, 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 OR f_delete_mark &lt;&gt; 1)
        FOR UPDATE
    </select>
 
    <update id="updateEffectiveVersion">
        UPDATE dms_wenjian_xiuding_shenhe
        SET shengxiao_banben_xuhao = #{shengxiaoBanbenXuhao},
            shengxiao_banbenhao = #{shengxiaoBanbenhao},
            shengxiao_biangeng_xuhao = #{shengxiaoBiangengXuhao},
            banben_shengxiao_shijian = #{banbenShengxiaoShijian}
        WHERE f_id = #{id}
          AND f_tenant_id = #{tenantId}
          AND shengxiao_banben_xuhao IS NULL
          AND shengxiao_banbenhao IS NULL
          AND shengxiao_biangeng_xuhao IS NULL
          AND banben_shengxiao_shijian IS NULL
          AND (f_delete_mark IS NULL OR f_delete_mark &lt;&gt; 1)
    </update>
 
</mapper>