yantian yue
2023-10-20 6b317a19dd1c584538f3810fe66587a1aa86dbb4
提交 | 用户 | 时间
487b2f 1 <?xml version="1.0" encoding="UTF-8"?>
YY 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.opcua.mapper.OpcuaConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.opcua.entity.OpcuaConf">
7         <id column="id" property="id" />
8         <result column="module" property="module" />
9         <result column="node" property="node" />
10         <result column="length" property="length" />
11         <result column="sys_types" property="sys_types" />
12         <result column="functionality" property="functionality" />
13         <result column="subscribe" property="subscribe" />
14         <result column="r_module" property="rModule" />
15         <result column="r_function" property="rFunction" />
16         <result column="remarks" property="remarks" />
17     </resultMap>
18
19     <!-- 通用查询结果列 -->
20     <sql id="Base_Column_List">
21         id AS "id", module AS "module", node AS "node", length AS "length",sys_types AS "sys_types",functionality AS "functionality", subscribe AS "subscribe", r_module AS "rModule", r_function AS "rFunction", remarks AS "remarks"
22     </sql>
23
24
25     <select id="customList" resultType="cn.stylefeng.guns.opcua.model.result.OpcuaConfResult" parameterType="cn.stylefeng.guns.opcua.model.params.OpcuaConfParam">
26         select
27         <include refid="Base_Column_List"/>
28         from sys_opcua_conf where 1 = 1
465d5c 29         <if test="paramCondition.node != null and paramCondition.node != ''">
YY 30             and node like CONCAT('%',#{paramCondition.node},'%')
31         </if>
a7c91f 32         <if test="paramCondition.subscribe != null and paramCondition.subscribe != ''">
YY 33             and subscribe like CONCAT('%',#{paramCondition.subscribe},'%')
34         </if>
487b2f 35     </select>
YY 36
37     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.opcua.model.params.OpcuaConfParam">
38         select
39         <include refid="Base_Column_List"/>
40         from sys_opcua_conf where 1 = 1
465d5c 41         <if test="paramCondition.node != null and paramCondition.node != ''">
YY 42             and node like CONCAT('%',#{paramCondition.node},'%')
43         </if>
487b2f 44     </select>
YY 45
46     <select id="customPageList" resultType="cn.stylefeng.guns.opcua.model.result.OpcuaConfResult" parameterType="cn.stylefeng.guns.opcua.model.params.OpcuaConfParam">
47         select
48         <include refid="Base_Column_List"/>
49         from sys_opcua_conf where 1 = 1
465d5c 50         <if test="paramCondition.node != null and paramCondition.node != ''">
YY 51             and node like CONCAT('%',#{paramCondition.node},'%')
52         </if>
487b2f 53     </select>
YY 54
55     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.opcua.model.params.OpcuaConfParam">
56         select
57         <include refid="Base_Column_List"/>
58         from sys_opcua_conf where 1 = 1
465d5c 59         <if test="paramCondition.node != null and paramCondition.node != ''">
YY 60             and node like CONCAT('%',#{paramCondition.node},'%')
61         </if>
487b2f 62     </select>
YY 63
64 </mapper>