提交 | 用户 | 时间
|
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.sc.scannerConfig.mapper.ScannerConfigMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.sc.scannerConfig.entity.ScannerConfig"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="location_code" property="locationCode" /> |
|
9 |
<result column="ip_address" property="ipAddress" /> |
|
10 |
<result column="create_user" property="createUser" /> |
|
11 |
<result column="create_time" property="createTime" /> |
|
12 |
</resultMap> |
|
13 |
|
|
14 |
<!-- 通用查询结果列 --> |
|
15 |
<sql id="Base_Column_List"> |
|
16 |
id AS "id", location_code AS "locationCode", ip_address AS "ipAddress", create_user AS "createUser", create_time AS "createTime" |
|
17 |
</sql> |
|
18 |
|
|
19 |
|
|
20 |
<select id="customList" resultType="cn.stylefeng.guns.modular.sc.scannerConfig.model.result.ScannerConfigResult" parameterType="cn.stylefeng.guns.modular.sc.scannerConfig.model.params.ScannerConfigParam"> |
|
21 |
select |
|
22 |
<include refid="Base_Column_List"/> |
|
23 |
from sc_scanner_config where 1 = 1 |
|
24 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
25 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
26 |
</if> |
|
27 |
<if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
|
28 |
and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
|
29 |
</if> |
|
30 |
</select> |
|
31 |
|
|
32 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.scannerConfig.model.params.ScannerConfigParam"> |
|
33 |
select |
|
34 |
<include refid="Base_Column_List"/> |
|
35 |
from sc_scanner_config where 1 = 1 |
|
36 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
37 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
38 |
</if> |
|
39 |
<if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
|
40 |
and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
|
41 |
</if> |
|
42 |
</select> |
|
43 |
|
|
44 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.sc.scannerConfig.model.result.ScannerConfigResult" parameterType="cn.stylefeng.guns.modular.sc.scannerConfig.model.params.ScannerConfigParam"> |
|
45 |
select |
|
46 |
<include refid="Base_Column_List"/> |
|
47 |
from sc_scanner_config 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.ipAddress != null and paramCondition.ipAddress != ''"> |
|
52 |
and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
|
53 |
</if> |
|
54 |
</select> |
|
55 |
|
|
56 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.scannerConfig.model.params.ScannerConfigParam"> |
|
57 |
select |
|
58 |
<include refid="Base_Column_List"/> |
|
59 |
from sc_scanner_config where 1 = 1 |
|
60 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
61 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
62 |
</if> |
|
63 |
<if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
|
64 |
and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
|
65 |
</if> |
|
66 |
</select> |
|
67 |
|
|
68 |
</mapper> |