<?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.moral.mapper.ChannelMapper">
|
|
<resultMap id="BaseResultMap" type="com.moral.entity.Channel" >
|
<id column="id" property="id" jdbcType="INTEGER" />
|
<result column="channel_code" property="channelCode" jdbcType="VARCHAR" />
|
<result column="channel_name" property="channelName" jdbcType="VARCHAR" />
|
<result column="channel_remark" property="channelRemark" jdbcType="VARCHAR" />
|
<result column="channel_is_delete" property="channelIsDelete" jdbcType="CHAR" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="create_user" property="createUser" jdbcType="VARCHAR" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="update_user" property="updateUser" jdbcType="VARCHAR" />
|
<result column="ext_I" property="extI" jdbcType="VARCHAR" />
|
<result column="ext_II" property="extII" jdbcType="VARCHAR" />
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
id, channel_code, channel_name, channel_remark, channel_is_delete, create_time, create_user,
|
update_time, update_user, ext_I, ext_II
|
</sql>
|
|
<select id="getChannelList" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from channel
|
where channel_is_delete=1
|
<if test="channelName != 'null'">
|
and channel_name like concat('%',#{channelName},'%')
|
</if>
|
</select>
|
|
<select id="getChannelId" resultType="java.lang.Integer">
|
select
|
distinct
|
id
|
from channel
|
where channel_is_delete=1
|
</select>
|
</mapper>
|