提交 | 用户 | 时间
|
8286c6
|
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.locationInfo.mapper.LocationInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.locationInfo.entity.LocationInfo"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="location_code" property="locationCode" /> |
|
9 |
<result column="location_name" property="locationName" /> |
|
10 |
<result column="location_type" property="locationType" /> |
|
11 |
<result column="workshop_code" property="workshopCode" /> |
|
12 |
<result column="production_line_code" property="productionLineCode" /> |
|
13 |
<result column="spare_field_1" property="spareField1" /> |
|
14 |
<result column="spare_field_2" property="spareField2" /> |
|
15 |
<result column="remarks" property="remarks" /> |
|
16 |
<result column="create_user" property="createUser" /> |
|
17 |
<result column="create_time" property="createTime" /> |
|
18 |
<result column="update_user" property="updateUser" /> |
|
19 |
<result column="update_time" property="updateTime" /> |
|
20 |
</resultMap> |
|
21 |
|
|
22 |
<!-- 通用查询结果列 --> |
|
23 |
<sql id="Base_Column_List"> |
|
24 |
id AS "id", location_code AS "locationCode", location_name AS "locationName", location_type AS "locationType", workshop_code AS "workshopCode", production_line_code AS "productionLineCode", 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" |
|
25 |
</sql> |
|
26 |
|
|
27 |
|
|
28 |
<select id="customList" resultType="cn.stylefeng.guns.modular.bs.locationInfo.model.result.LocationInfoResult" parameterType="cn.stylefeng.guns.modular.bs.locationInfo.model.params.LocationInfoParam"> |
|
29 |
select |
|
30 |
<include refid="Base_Column_List"/> |
|
31 |
from bs_location_info where 1 = 1 |
|
32 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
33 |
and location_code = #{paramCondition.locationCode} |
|
34 |
</if> |
|
35 |
|
|
36 |
</select> |
|
37 |
|
|
38 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.locationInfo.model.params.LocationInfoParam"> |
|
39 |
select |
|
40 |
<include refid="Base_Column_List"/> |
|
41 |
from bs_location_info where 1 = 1 |
|
42 |
</select> |
|
43 |
|
|
44 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.locationInfo.model.result.LocationInfoResult" parameterType="cn.stylefeng.guns.modular.bs.locationInfo.model.params.LocationInfoParam"> |
|
45 |
select |
|
46 |
<include refid="Base_Column_List"/> |
|
47 |
from bs_location_info where 1 = 1 |
|
48 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
49 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
50 |
</if> |
|
51 |
<if test="paramCondition.locationName != null and paramCondition.locationName != ''"> |
|
52 |
and location_name like CONCAT('%',#{paramCondition.locationName},'%') |
|
53 |
</if> |
|
54 |
<!-- <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''">--> |
|
55 |
<!-- and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%')--> |
|
56 |
<!-- </if>--> |
|
57 |
<if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> |
|
58 |
and production_line_code = #{paramCondition.productionLineCode} |
|
59 |
</if> |
|
60 |
order by id desc |
|
61 |
</select> |
|
62 |
|
|
63 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.locationInfo.model.params.LocationInfoParam"> |
|
64 |
select |
|
65 |
<include refid="Base_Column_List"/> |
|
66 |
from bs_location_info where 1 = 1 |
|
67 |
</select> |
|
68 |
|
|
69 |
</mapper> |