MerchantChannelMapper.xml 1.74 KB
<?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="cn.com.glsx.merchants.mapper.MerchantChannelMapper">
  <resultMap id="BaseResultMap" type="cn.com.glsx.merchants.entity.MerchantChannel">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="channel_name" jdbcType="VARCHAR" property="channelName" />
    <result column="created_by" jdbcType="INTEGER" property="createdBy" />
    <result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
    <result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
    <result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
    <result column="channel_type" jdbcType="TINYINT" property="channelType" />
    <result column="channel_code" jdbcType="VARCHAR" property="channelCode" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, channel_name, created_by, created_time, updated_by, updated_time, del_flag, channel_code
  </sql>
  <select id="findByChannelType" resultType="java.lang.Integer">
        SELECT id FROM  platform_merchant_channel where channel_type=#{channelType}
  </select>
  <select id="findById" resultMap="BaseResultMap">

    SELECT * FROM  platform_merchant_channel where id=#{id}
  </select>
    <select id="findByIds" resultMap="BaseResultMap">
      SELECT * FROM  platform_merchant_channel where id in
      <foreach close=")" collection="channelIdSet" index="index" item="item" open="(" separator=",">
      #{item}
    </foreach>
    </select>
</mapper>