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.equipmentInfo.mapper.EquipmentInfoMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.equipmentInfo.entity.EquipmentInfo">
7         <id column="id" property="id" />
8         <result column="equipment_no" property="equipmentNo" />
9         <result column="equipment_name" property="equipmentName" />
10         <result column="equipment_type" property="equipmentType" />
11         <result column="equipment_model" property="equipmentModel" />
12         <result column="workshop_code" property="workshopCode" />
13         <result column="production_line_code" property="productionLineCode" />
14         <result column="location_code" property="locationCode" />
15         <result column="supplier_code" property="supplierCode" />
16         <result column="spare_field_1" property="spareField1" />
17         <result column="spare_field_2" property="spareField2" />
18         <result column="spare_field_3" property="spareField3" />
19         <result column="spare_field_4" property="spareField4" />
20         <result column="remark" property="remark" />
21         <result column="create_user" property="createUser" />
22         <result column="create_time" property="createTime" />
23         <result column="update_user" property="updateUser" />
24         <result column="update_time" property="updateTime" />
25     </resultMap>
26
27     <!-- 通用查询结果列 -->
28     <sql id="Base_Column_List">
29         id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", equipment_type AS "equipmentType", equipment_model AS "equipmentModel", workshop_code AS "workshopCode", production_line_code AS "productionLineCode", location_code AS "locationCode", supplier_code AS "supplierCode", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", spare_field_3 AS "spareField3", spare_field_4 AS "spareField4", remark AS "remark", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
30     </sql>
31
32
33     <select id="customList" resultType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.result.EquipmentInfoResult" parameterType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam">
34         select
35         <include refid="Base_Column_List"/>
36         from bs_equipment_info where 1 = 1
37         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
38             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
39         </if>
40         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
41             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
42         </if>
43     </select>
44
45     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam">
46         select
47         <include refid="Base_Column_List"/>
48         from bs_equipment_info where 1 = 1
49     </select>
50
51     <select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.result.EquipmentInfoResult" parameterType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam">
52         select
53         <include refid="Base_Column_List"/>
54         from bs_equipment_info where 1 = 1
55         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
56             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
57         </if>
58         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
59             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
60         </if>
61         order by id desc
62     </select>
63
64     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.equipmentInfo.model.params.EquipmentInfoParam">
65         select
66         <include refid="Base_Column_List"/>
67         from bs_equipment_info where 1 = 1
68     </select>
69
70 </mapper>