jiaosong
2023-08-14 b6c8cfb873fdb34e2a78acf8ce189f77d50c4be9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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="doumeemes.dao.business.SalaryParamMapper">
 
 
    <select id="selectPage" resultType="doumeemes.dao.business.model.SalaryParam">
        SELECT
            sp.*,
            m.`NAME` as materialName,
            p.`NAME` as proceduresName
        from
            salary_param sp
                LEFT JOIN procedures p on p.ID = sp.PROCEDURE_ID
                LEFT JOIN material m on m.ID = bom.MATERIAL_ID
        <where>
            <if test="keyWord != null and keyWord != ''">
            p`NAME` like concat('%',#{keyWord},'%')
            or p.`CODE` = #{keyWord}</if>
            <if test="procedureName != null and procedureName = ''"> and p.`NAME` like concat('%',#{procedureName},'%')</if>
            <if test="type != null"> and sp.`TYPE` = #{type}</if>
        </where>
    </select>
</mapper>