“djh”
9 天以前 f84f28a824fde14acd2bd91cff054de44beafbb7
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
<?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.gkhy.exam.system.mapper.CompanyQualityPolicyMapper">
    <update id="updateQualityPolicyById">
 
        UPDATE company_quality_policy
        <set>
            <if test="companyId != null and companyId != ''" >
                company_id = #{companyId},
            </if>
            <if test="companyName != null and companyName != ''" >
                company_name = #{companyName},
            </if>
            <if test="policy != null and policy !=''" >
                policy = #{policy},
            </if>
            <if test="delFlag != null and delFlag != ''" >
                del_flag = #{delFlag},
            </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 = #{updateTime}
            </if>
        </set>
        where id = #{id}
    </update>
 
 
    <select id="selectCompanyQualityPolicyList" resultType="com.gkhy.exam.system.domain.CompanyQualityPolicy">
        SELECT
            cqp.`id`,
            cqp.`company_id`,
            sc.`name` as company_name,
            cqp.`policy`,
            cqp.`del_flag`,
            cqp.`create_by`,
            cqp.`create_time`,
            cqp.`update_by`,
            cqp.`update_time`
        FROM
            company_quality_policy cqp
        left join sys_company sc on cqp.company_id = sc.id
        WHERE
            cqp.del_flag = 1
        <if test="companyId!=null and companyId!=''">
            and cqp.company_id = #{companyId}
        </if>
        ORDER BY
            cqp.create_time DESC
    </select>
</mapper>