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.em.equipmentMaintainContentPlan.mapper.EquipmentMaintainContentPlanMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.entity.EquipmentMaintainContentPlan">
7         <id column="id" property="id" />
8         <result column="maintain_content_code" property="maintainContentCode" />
9         <result column="maintain_content_name" property="maintainContentName" />
10         <result column="maintain_content_type" property="maintainContentType" />
11         <result column="maintain_content" property="maintainContent" />
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="plan_no" property="planNo" />
16     </resultMap>
17
18     <!-- 通用查询结果列 -->
19     <sql id="Base_Column_List">
20         id AS "id", maintain_content_code AS "maintainContentCode", maintain_content_name AS "maintainContentName", maintain_content_type AS "maintainContentType", maintain_content AS "maintainContent", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", plan_no AS "planNo"
21     </sql>
22
23
24     <select id="customList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.result.EquipmentMaintainContentPlanResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam">
25         select
26         <include refid="Base_Column_List"/>
27         from em_equipment_maintain_content_plan where 1 = 1
28             <if test="paramCondition.maintainContentCode != null and paramCondition.maintainContentCode != ''">
29                 and maintain_content_code like CONCAT('%',#{paramCondition.maintainContentCode},'%')
30             </if>
31             <if test="paramCondition.maintainContentName != null and paramCondition.maintainContentName != ''">
32                 and maintain_content_name like CONCAT('%',#{paramCondition.maintainContentName},'%')
33             </if>
34             <if test="paramCondition.maintainContentType != null and paramCondition.maintainContentType != ''">
35                 and maintain_content_type like CONCAT('%',#{paramCondition.maintainContentType},'%')
36             </if>
37     </select>
38
39     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam">
40         select
41         <include refid="Base_Column_List"/>
42         from em_equipment_maintain_content_plan where 1 = 1
43             <if test="paramCondition.maintainContentCode != null and paramCondition.maintainContentCode != ''">
44                 and maintain_content_code like CONCAT('%',#{paramCondition.maintainContentCode},'%')
45             </if>
46             <if test="paramCondition.maintainContentName != null and paramCondition.maintainContentName != ''">
47                 and maintain_content_name like CONCAT('%',#{paramCondition.maintainContentName},'%')
48             </if>
49             <if test="paramCondition.maintainContentType != null and paramCondition.maintainContentType != ''">
50                 and maintain_content_type like CONCAT('%',#{paramCondition.maintainContentType},'%')
51             </if>
52     </select>
53
54     <select id="customPageList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.result.EquipmentMaintainContentPlanResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam">
55         select
56         <include refid="Base_Column_List"/>
57         from em_equipment_maintain_content_plan where 1 = 1
58             <if test="paramCondition.maintainContentCode != null and paramCondition.maintainContentCode != ''">
59                 and maintain_content_code like CONCAT('%',#{paramCondition.maintainContentCode},'%')
60             </if>
61             <if test="paramCondition.maintainContentName != null and paramCondition.maintainContentName != ''">
62                 and maintain_content_name like CONCAT('%',#{paramCondition.maintainContentName},'%')
63             </if>
64             <if test="paramCondition.maintainContentType != null and paramCondition.maintainContentType != ''">
65                 and maintain_content_type like CONCAT('%',#{paramCondition.maintainContentType},'%')
66             </if>
67     </select>
68
69     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam">
70         select
71         <include refid="Base_Column_List"/>
72         from em_equipment_maintain_content_plan where 1 = 1
73             <if test="paramCondition.maintainContentCode != null and paramCondition.maintainContentCode != ''">
74                 and maintain_content_code like CONCAT('%',#{paramCondition.maintainContentCode},'%')
75             </if>
76             <if test="paramCondition.maintainContentName != null and paramCondition.maintainContentName != ''">
77                 and maintain_content_name like CONCAT('%',#{paramCondition.maintainContentName},'%')
78             </if>
79             <if test="paramCondition.maintainContentType != null and paramCondition.maintainContentType != ''">
80                 and maintain_content_type like CONCAT('%',#{paramCondition.maintainContentType},'%')
81             </if>
82     </select>
83
84 </mapper>