|
@@ -0,0 +1,68 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.fire.admin.mapper.ChannelInfoMapper">
|
|
|
+
|
|
|
+ <resultMap id="channelInfoResultMap" type="com.fire.dto.ChannelInfo">
|
|
|
+ <id column="channel_id" property="channelId"/>
|
|
|
+ <result column="supplier_id" property="supplierId"/>
|
|
|
+ <result column="channel_name" property="channelName"/>
|
|
|
+ <result column="operator_code" property="operatorCode"/>
|
|
|
+ <result column="is_valid" property="isValid"/>
|
|
|
+ <result column="remark" property="remark"/>
|
|
|
+ <result column="creator" property="creator"/>
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
+ <result column="updator" property="updator"/>
|
|
|
+ <result column="update_time" property="updateTime"/>
|
|
|
+ <result column="ip" property="ip"/>
|
|
|
+ <result column="discount" property="discount"/>
|
|
|
+ <result column="channel_type" property="channelType"/>
|
|
|
+ <result column="is_delete" property="isDelete"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="common_field">
|
|
|
+ channel_id,
|
|
|
+ supplier_id,
|
|
|
+ channel_name,
|
|
|
+ operator_code,
|
|
|
+ is_valid,
|
|
|
+ remark,
|
|
|
+ creator,
|
|
|
+ create_time,
|
|
|
+ updator,
|
|
|
+ update_time,
|
|
|
+ ip,
|
|
|
+ discount,
|
|
|
+ channel_type,
|
|
|
+ is_delete
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectChannelInfoList" resultMap="channelInfoResultMap">
|
|
|
+ SELECT <include refid="common_field"/>
|
|
|
+ FROM access_channel_info
|
|
|
+ <where>
|
|
|
+ <if test="channelId !=null">
|
|
|
+ AND channel_id = #{selectList.channelId}
|
|
|
+ </if>
|
|
|
+ <if test="supplierId !=null">
|
|
|
+ AND supplier_id = #{selectList.supplierId}
|
|
|
+ </if>
|
|
|
+ <if test="supplierName !=null and supplierName.trim()!=''">
|
|
|
+ AND supplier_name = #{selectList.supplierName}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--<insert id="">
|
|
|
+ INSERT INTO access_channel_info
|
|
|
+ (, , , , , ,,,)
|
|
|
+ VALUES
|
|
|
+
|
|
|
+ </insert>-->
|
|
|
+
|
|
|
+ <update id="delChannelById">
|
|
|
+ UPDATE access_channel_info
|
|
|
+ SET is_delete = 1
|
|
|
+ WHERE channel_id = #{channelId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|