提交 | 用户 | 时间
|
1ac2bc
|
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.zsx.bs.productBomInfo.mapper.ProductBomInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.entity.ProductBomInfo"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="bom_code" property="bomCode" /> |
|
9 |
<result column="bom_name" property="bomName" /> |
|
10 |
<result column="product_code" property="productCode" /> |
|
11 |
<result column="product_name" property="productName" /> |
|
12 |
<result column="version" property="version" /> |
|
13 |
<result column="status" property="status" /> |
|
14 |
<result column="spare_field_1" property="spareField1" /> |
|
15 |
<result column="spare_field_2" property="spareField2" /> |
|
16 |
<result column="remark" property="remark" /> |
|
17 |
<result column="create_user" property="createUser" /> |
|
18 |
<result column="create_time" property="createTime" /> |
|
19 |
<result column="update_user" property="updateUser" /> |
|
20 |
<result column="update_time" property="updateTime" /> |
|
21 |
</resultMap> |
|
22 |
|
|
23 |
<!-- 通用查询结果列 --> |
|
24 |
<sql id="Base_Column_List"> |
|
25 |
id AS "id", bom_code AS "bomCode", bom_name AS "bomName", product_code AS "productCode", product_name AS "productName", version AS "version", status AS "status", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remark AS "remark", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime" |
|
26 |
</sql> |
|
27 |
|
|
28 |
|
|
29 |
<select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.result.ProductBomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.params.ProductBomInfoParam"> |
|
30 |
select |
|
31 |
<include refid="Base_Column_List"/> |
|
32 |
from bs_product_bom_info where 1 = 1 |
|
33 |
<if test="paramCondition.bomCode != null and paramCondition.bomCode != ''"> |
|
34 |
and bom_code like CONCAT('%',#{paramCondition.bomCode},'%') |
|
35 |
</if> |
|
36 |
<if test="paramCondition.bomName != null and paramCondition.bomName != ''"> |
|
37 |
and bom_name like CONCAT('%',#{paramCondition.bomName},'%') |
|
38 |
</if> |
|
39 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
40 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
41 |
</if> |
|
42 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
43 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
44 |
</if> |
|
45 |
</select> |
|
46 |
|
|
47 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.params.ProductBomInfoParam"> |
|
48 |
select |
|
49 |
<include refid="Base_Column_List"/> |
|
50 |
from bs_product_bom_info where 1 = 1 |
|
51 |
<if test="paramCondition.bomCode != null and paramCondition.bomCode != ''"> |
|
52 |
and bom_code like CONCAT('%',#{paramCondition.bomCode},'%') |
|
53 |
</if> |
|
54 |
<if test="paramCondition.bomName != null and paramCondition.bomName != ''"> |
|
55 |
and bom_name like CONCAT('%',#{paramCondition.bomName},'%') |
|
56 |
</if> |
|
57 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
58 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
59 |
</if> |
|
60 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
61 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
62 |
</if> |
|
63 |
</select> |
|
64 |
|
|
65 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.result.ProductBomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.params.ProductBomInfoParam"> |
|
66 |
select |
|
67 |
<include refid="Base_Column_List"/> |
|
68 |
from bs_product_bom_info where 1 = 1 |
|
69 |
<if test="paramCondition.bomCode != null and paramCondition.bomCode != ''"> |
|
70 |
and bom_code like CONCAT('%',#{paramCondition.bomCode},'%') |
|
71 |
</if> |
|
72 |
<if test="paramCondition.bomName != null and paramCondition.bomName != ''"> |
|
73 |
and bom_name like CONCAT('%',#{paramCondition.bomName},'%') |
|
74 |
</if> |
|
75 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
76 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
77 |
</if> |
|
78 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
79 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
80 |
</if> |
|
81 |
</select> |
|
82 |
|
|
83 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.productBomInfo.model.params.ProductBomInfoParam"> |
|
84 |
select |
|
85 |
<include refid="Base_Column_List"/> |
|
86 |
from bs_product_bom_info where 1 = 1 |
|
87 |
<if test="paramCondition.bomCode != null and paramCondition.bomCode != ''"> |
|
88 |
and bom_code like CONCAT('%',#{paramCondition.bomCode},'%') |
|
89 |
</if> |
|
90 |
<if test="paramCondition.bomName != null and paramCondition.bomName != ''"> |
|
91 |
and bom_name like CONCAT('%',#{paramCondition.bomName},'%') |
|
92 |
</if> |
|
93 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
94 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
95 |
</if> |
|
96 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
97 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
98 |
</if> |
|
99 |
</select> |
|
100 |
|
|
101 |
</mapper> |