| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jcdm.main.da.opcuaconfig.mapper.DaOpcuaConfigMapper"> |
| | | |
| | | <resultMap type="DaOpcuaConfig" id="DaOpcuaConfigResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="module" column="module" /> |
| | | <result property="node" column="node" /> |
| | | <result property="length" column="length" /> |
| | | <result property="sysTypes" column="sys_types" /> |
| | | <result property="functionality" column="functionality" /> |
| | | <result property="subscribe" column="subscribe" /> |
| | | <result property="rModule" column="r_module" /> |
| | | <result property="rFunction" column="r_function" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="processName" column="process_name" /> |
| | | <result property="process" column="process" /> |
| | | <result property="state" column="state" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaOpcuaConfigVo"> |
| | | select id, module, node, length, sys_types, functionality, subscribe, r_module, r_function, remarks from da_opcua_config |
| | | select id, node, sys_types, subscribe, r_function, remarks, process_name, process, state from da_opcua_config |
| | | </sql> |
| | | |
| | | <select id="selectDaOpcuaConfigList" parameterType="DaOpcuaConfig" resultMap="DaOpcuaConfigResult"> |
| | | <include refid="selectDaOpcuaConfigVo"/> |
| | | <where> |
| | | <if test="module != null and module != ''"> and module like concat('%', #{module}, '%')</if> |
| | | <if test="node != null and node != ''"> and node like concat('%', #{node}, '%')</if> |
| | | <if test="length != null "> and length = #{length}</if> |
| | | <if test="sysTypes != null and sysTypes != ''"> and sys_types = #{sysTypes}</if> |
| | | <if test="functionality != null and functionality != ''"> and functionality like concat('%', #{functionality}, '%')</if> |
| | | <if test="subscribe != null "> and subscribe = #{subscribe}</if> |
| | | <if test="rModule != null and rModule != ''"> and r_module like concat('%', #{rModule}, '%')</if> |
| | | <if test="rFunction != null and rFunction != ''"> and r_function like concat('%', #{rFunction}, '%')</if> |
| | | <if test="node != null and node != ''"> and node = #{node}</if> |
| | | <if test="rFunction != null and rFunction != ''"> and r_function = #{rFunction}</if> |
| | | <if test="process != null and process != ''"> and process = #{process}</if> |
| | | <if test="state != null "> and state = #{state}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
| | | <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into da_opcua_config |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="module != null">module,</if> |
| | | <if test="node != null">node,</if> |
| | | <if test="length != null">length,</if> |
| | | <if test="sysTypes != null">sys_types,</if> |
| | | <if test="functionality != null">functionality,</if> |
| | | <if test="subscribe != null">subscribe,</if> |
| | | <if test="rModule != null">r_module,</if> |
| | | <if test="rFunction != null">r_function,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="processName != null">process_name,</if> |
| | | <if test="process != null">process,</if> |
| | | <if test="state != null">state,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="module != null">#{module},</if> |
| | | <if test="node != null">#{node},</if> |
| | | <if test="length != null">#{length},</if> |
| | | <if test="sysTypes != null">#{sysTypes},</if> |
| | | <if test="functionality != null">#{functionality},</if> |
| | | <if test="subscribe != null">#{subscribe},</if> |
| | | <if test="rModule != null">#{rModule},</if> |
| | | <if test="rFunction != null">#{rFunction},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="processName != null">#{processName},</if> |
| | | <if test="process != null">#{process},</if> |
| | | <if test="state != null">#{state},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
| | | update da_opcua_config |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="module != null">module = #{module},</if> |
| | | <if test="node != null">node = #{node},</if> |
| | | <if test="length != null">length = #{length},</if> |
| | | <if test="sysTypes != null">sys_types = #{sysTypes},</if> |
| | | <if test="functionality != null">functionality = #{functionality},</if> |
| | | <if test="subscribe != null">subscribe = #{subscribe},</if> |
| | | <if test="rModule != null">r_module = #{rModule},</if> |
| | | <if test="rFunction != null">r_function = #{rFunction},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="processName != null">process_name = #{processName},</if> |
| | | <if test="process != null">process = #{process},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |