123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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="supplier_name" property="supplierName"/>
- <result column="channel_name" property="channelName"/>
- <result column="operator" property="operator"/>
- <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">
- aci.channel_id,
- aci.supplier_id,
- cs.supplier_name,
- aci.channel_name,
- aci.operator,
- aci.is_valid,
- aci.remark,
- aci.creator,
- aci.create_time,
- aci.updator,
- aci.update_time,
- aci.ip,
- aci.discount,
- aci.channel_type,
- aci.is_delete
- </sql>
- <select id="selectChannelInfoList" resultMap="channelInfoResultMap">
- SELECT
- <include refid="common_field"/>
- FROM access_channel_info AS aci LEFT JOIN channel_supplier AS cs
- ON aci.supplier_id = cs.supplier_id
- <where>
- <if test="channelId !=null">
- AND aci.channel_id = #{channelId}
- </if>
- <if test="supplierId !=null">
- AND aci.supplier_id = #{supplierId}
- </if>
- <if test="channelName !=null and channelName.trim()!=''">
- AND aci.channel_name LIKE CONCAT('%' #{channelName},'%')
- </if>
- AND aci.is_delete = 0
- </where>
- </select>
- <update id="delChannelById">
- UPDATE access_channel_info
- SET is_delete = 1
- WHERE channel_id = #{channelId}
- </update>
- </mapper>
|