双重预防项目-国泰新华二开定制版
16639036659
2024-07-02 91eeb185de1e8ccc632d4fc1efeb0f9abf315050
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
<?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="com.ruoyi.project.tr.specialCheck.mapper.TbBaseCheckItemMapper">
 
    <resultMap id="BaseResultMap" type="com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckItem">
        <id property="id" column="id"/>
 
        <result property="taskId" column="task_id"/>
        <result property="checkName" column="check_name"/>
        <result property="checkContent" column="check_content"/>
        <result property="checkWay" column="check_way"/>
        <result property="checkBasis" column="check_basis"/>
        <result property="applicablePlace" column="applicable_place"/>
 
        <result property="deleted" column="deleted"/>
        <result property="createBy" column="create_by"/>
        <result property="createDate" column="create_date"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateDate" column="update_date"/>
        <result property="status" column="status"/>
    </resultMap>
 
<!--    List<TbBaseCheckItem> selectTbBaseCheckItemPage(TbBaseCheckItemBO tbBaseCheckItemBO);-->
    <select id="selectTbBaseCheckItemPage" resultMap="BaseResultMap">
        select * from tb_base_check_item
        <where>
            deleted = 0
            <if test="checkName != null">
                and task_name check_name concat('%',#{checkName},'%')
            </if>
            <if test="checkContent != null">
                and check_content like concat('%',#{checkContent},'%')
            </if>
            <if test="checkWay != null">
                and check_way like concat('%',#{checkWay},'%')
            </if>
            order by  create_date desc
        </where>
    </select>
<!--    TbBaseCheckItem getBaseCheckItemByItemId(String checkItemId);-->
    <select id="getBaseCheckItemByItemId" resultMap="BaseResultMap">
        select * from tb_base_check_item
        where id = #{checkItemId}
    </select>
 
<!--    TbBaseCheckItem getBaseItemByStatus(Date date);-->
    <select id="getBaseItemByStatus" resultMap="BaseResultMap">
        select * from tb_base_check_item
        where deleted = 0 and status = 1
        limit 1
    </select>
<!--    int updateStatusById(String id);-->
    <update id="updateStatusById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckItem">
        update tb_base_check_item set
            status =  2
        where id = #{id}
    </update>
</mapper>