提交 | 用户 | 时间
|
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.materialInfo.mapper.MaterialInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.materialInfo.entity.MaterialInfo"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="material_code" property="materialCode" /> |
|
9 |
<result column="material_name" property="materialName" /> |
|
10 |
<result column="drawing_no" property="drawingNo" /> |
|
11 |
<result column="material_specs" property="materialSpecs" /> |
|
12 |
<result column="unit" property="unit" /> |
|
13 |
<result column="material_science" property="materialScience" /> |
|
14 |
<result column="material_type" property="materialType" /> |
|
15 |
<result column="material_attribute" property="materialAttribute" /> |
|
16 |
<result column="is_purchase" property="isPurchase" /> |
|
17 |
<result column="supplier" property="supplier" /> |
|
18 |
<result column="spare_field_1" property="spareField1" /> |
|
19 |
<result column="spare_field_2" property="spareField2" /> |
|
20 |
<result column="remarks" property="remarks" /> |
|
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 |
<result column="erp_spec" property="erpSpec" /> |
|
26 |
</resultMap> |
|
27 |
|
|
28 |
<!-- 通用查询结果列 --> |
|
29 |
<sql id="Base_Column_List"> |
|
30 |
material_type AS "materialType", id AS "id", material_code AS "materialCode", material_name AS "materialName", drawing_no AS "drawingNo", material_specs AS "materialSpecs", unit AS "unit", material_science AS "materialScience", material_attribute AS "materialAttribute", is_purchase AS "isPurchase", supplier AS "supplier", 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", erp_spec AS "erpSpec" |
|
31 |
</sql> |
|
32 |
|
|
33 |
|
|
34 |
<select id="customList" resultType="cn.stylefeng.guns.modular.bs.materialInfo.model.result.MaterialInfoResult" parameterType="cn.stylefeng.guns.modular.bs.materialInfo.model.params.MaterialInfoParam"> |
|
35 |
select |
|
36 |
<include refid="Base_Column_List"/> |
|
37 |
from bs_material_info where 1 = 1 |
|
38 |
</select> |
|
39 |
|
|
40 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.materialInfo.model.params.MaterialInfoParam"> |
|
41 |
select |
|
42 |
<include refid="Base_Column_List"/> |
|
43 |
from bs_material_info where 1 = 1 |
|
44 |
</select> |
|
45 |
|
|
46 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.materialInfo.model.result.MaterialInfoResult" parameterType="cn.stylefeng.guns.modular.bs.materialInfo.model.params.MaterialInfoParam"> |
|
47 |
select |
|
48 |
<include refid="Base_Column_List"/> |
|
49 |
from bs_material_info where 1 = 1 |
|
50 |
<if test="paramCondition.materialCode != null and paramCondition.materialCode != ''"> |
|
51 |
and material_code like CONCAT('%',#{paramCondition.materialCode},'%') |
|
52 |
</if> |
|
53 |
<if test="paramCondition.materialName != null and paramCondition.materialName != ''"> |
|
54 |
and material_name like CONCAT('%',#{paramCondition.materialName},'%') |
|
55 |
</if> |
|
56 |
<if test="paramCondition.materialSpecs != null and paramCondition.materialSpecs != ''"> |
|
57 |
and material_specs like CONCAT('%',#{paramCondition.materialSpecs},'%') |
|
58 |
</if> |
|
59 |
<if test="paramCondition.materialType != null and paramCondition.materialType != ''"> |
|
60 |
and material_type = #{paramCondition.materialType} |
|
61 |
</if> |
|
62 |
</select> |
|
63 |
|
|
64 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.materialInfo.model.params.MaterialInfoParam"> |
|
65 |
select |
|
66 |
<include refid="Base_Column_List"/> |
|
67 |
from bs_material_info where 1 = 1 |
|
68 |
</select> |
|
69 |
|
|
70 |
</mapper> |