提交 | 用户 | 时间
|
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.opInfo.mapper.OpInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.opInfo.entity.OpInfo"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="op_code" property="opCode" /> |
|
9 |
<result column="op_name" property="opName" /> |
|
10 |
<result column="line_code" property="lineCode" /> |
|
11 |
<result column="op_type" property="opType" /> |
|
12 |
<result column="status" property="status" /> |
|
13 |
<result column="spare_field_1" property="spareField1" /> |
|
14 |
<result column="spare_field_2" property="spareField2" /> |
|
15 |
<result column="remark" property="remark" /> |
|
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", op_code AS "opCode", op_name AS "opName", line_code AS "lineCode", op_type AS "opType", 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" |
|
25 |
</sql> |
|
26 |
|
|
27 |
|
|
28 |
<select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.result.OpInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.params.OpInfoParam"> |
|
29 |
select |
|
30 |
<include refid="Base_Column_List"/> |
|
31 |
from bs_op_info where 1 = 1 |
|
32 |
<if test="paramCondition.opCode != null and paramCondition.opCode != ''"> |
|
33 |
and op_code like CONCAT('%',#{paramCondition.opCode},'%') |
|
34 |
</if> |
|
35 |
<if test="paramCondition.opName != null and paramCondition.opName != ''"> |
|
36 |
and op_name like CONCAT('%',#{paramCondition.opName},'%') |
|
37 |
</if> |
|
38 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
39 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
40 |
</if> |
|
41 |
<if test="paramCondition.opType != null and paramCondition.opType != ''"> |
|
42 |
and op_type like CONCAT('%',#{paramCondition.opType},'%') |
|
43 |
</if> |
|
44 |
<if test="paramCondition.status != null and paramCondition.status != ''"> |
|
45 |
and status like CONCAT('%',#{paramCondition.status},'%') |
|
46 |
</if> |
|
47 |
</select> |
|
48 |
|
|
49 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.params.OpInfoParam"> |
|
50 |
select |
|
51 |
<include refid="Base_Column_List"/> |
|
52 |
from bs_op_info where 1 = 1 |
|
53 |
<if test="paramCondition.opCode != null and paramCondition.opCode != ''"> |
|
54 |
and op_code like CONCAT('%',#{paramCondition.opCode},'%') |
|
55 |
</if> |
|
56 |
<if test="paramCondition.opName != null and paramCondition.opName != ''"> |
|
57 |
and op_name like CONCAT('%',#{paramCondition.opName},'%') |
|
58 |
</if> |
|
59 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
60 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
61 |
</if> |
|
62 |
<if test="paramCondition.opType != null and paramCondition.opType != ''"> |
|
63 |
and op_type like CONCAT('%',#{paramCondition.opType},'%') |
|
64 |
</if> |
|
65 |
<if test="paramCondition.status != null and paramCondition.status != ''"> |
|
66 |
and status like CONCAT('%',#{paramCondition.status},'%') |
|
67 |
</if> |
|
68 |
</select> |
|
69 |
|
|
70 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.result.OpInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.params.OpInfoParam"> |
|
71 |
select |
|
72 |
<include refid="Base_Column_List"/> |
|
73 |
from bs_op_info where 1 = 1 |
|
74 |
<if test="paramCondition.opCode != null and paramCondition.opCode != ''"> |
|
75 |
and op_code like CONCAT('%',#{paramCondition.opCode},'%') |
|
76 |
</if> |
|
77 |
<if test="paramCondition.opName != null and paramCondition.opName != ''"> |
|
78 |
and op_name like CONCAT('%',#{paramCondition.opName},'%') |
|
79 |
</if> |
|
80 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
81 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
82 |
</if> |
|
83 |
<if test="paramCondition.opType != null and paramCondition.opType != ''"> |
|
84 |
and op_type like CONCAT('%',#{paramCondition.opType},'%') |
|
85 |
</if> |
|
86 |
<if test="paramCondition.status != null and paramCondition.status != ''"> |
|
87 |
and status like CONCAT('%',#{paramCondition.status},'%') |
|
88 |
</if> |
|
89 |
</select> |
|
90 |
|
|
91 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.opInfo.model.params.OpInfoParam"> |
|
92 |
select |
|
93 |
<include refid="Base_Column_List"/> |
|
94 |
from bs_op_info where 1 = 1 |
|
95 |
<if test="paramCondition.opCode != null and paramCondition.opCode != ''"> |
|
96 |
and op_code like CONCAT('%',#{paramCondition.opCode},'%') |
|
97 |
</if> |
|
98 |
<if test="paramCondition.opName != null and paramCondition.opName != ''"> |
|
99 |
and op_name like CONCAT('%',#{paramCondition.opName},'%') |
|
100 |
</if> |
|
101 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
102 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
103 |
</if> |
|
104 |
<if test="paramCondition.opType != null and paramCondition.opType != ''"> |
|
105 |
and op_type like CONCAT('%',#{paramCondition.opType},'%') |
|
106 |
</if> |
|
107 |
<if test="paramCondition.status != null and paramCondition.status != ''"> |
|
108 |
and status like CONCAT('%',#{paramCondition.status},'%') |
|
109 |
</if> |
|
110 |
</select> |
|
111 |
|
|
112 |
</mapper> |