cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="cn.stylefeng.guns.modular.bs.lineInfo.mapper.LineInfoMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.lineInfo.entity.LineInfo">
7         <id column="id" property="id" />
8         <result column="line_code" property="lineCode" />
9         <result column="line_name" property="lineName" />
10         <result column="workshop_code" property="workshopCode" />
11         <result column="work_calendar" property="workCalendar" />
12         <result column="spare_field_1" property="spareField1" />
13         <result column="spare_field_2" property="spareField2" />
14         <result column="remarks" property="remarks" />
15         <result column="create_user" property="createUser" />
16         <result column="create_time" property="createTime" />
17         <result column="update_user" property="updateUser" />
18         <result column="update_time" property="updateTime" />
19     </resultMap>
20
21     <!-- 通用查询结果列 -->
22     <sql id="Base_Column_List">
23         id AS "id", line_code AS "lineCode", line_name AS "lineName", workshop_code AS "workshopCode", work_calendar AS "workCalendar", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
24     </sql>
25
26
27     <select id="customList" resultType="cn.stylefeng.guns.modular.bs.lineInfo.model.result.LineInfoResult" parameterType="cn.stylefeng.guns.modular.bs.lineInfo.model.params.LineInfoParam">
28         select
29         <include refid="Base_Column_List"/>
30         from bs_line_info where 1 = 1
31     </select>
32
33     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.lineInfo.model.params.LineInfoParam">
34         select
35         <include refid="Base_Column_List"/>
36         from bs_line_info where 1 = 1
37     </select>
38
39     <select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.lineInfo.model.result.LineInfoResult" parameterType="cn.stylefeng.guns.modular.bs.lineInfo.model.params.LineInfoParam">
40         select
41         <include refid="Base_Column_List"/>
42         from bs_line_info where 1 = 1
43         <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
44             and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
45         </if>
46         <if test="paramCondition.lineName != null and paramCondition.lineName != ''">
47             and line_name like CONCAT('%',#{paramCondition.lineName},'%')
48         </if>
49         <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''">
50             and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%')
51         </if>
52         order by id desc
53     </select>
54
55     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.lineInfo.model.params.LineInfoParam">
56         select
57         <include refid="Base_Column_List"/>
58         from bs_line_info where 1 = 1
59     </select>
60
61 </mapper>