Files
UniversalTestSoftware/server/libs/classes/mapper/manage/ChannelMapper.xml

36 lines
1.2 KiB
XML
Raw Normal View History

<?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.cbsd.universaltestsoftwareserver.module.manage.mapper.ChannelMapper">
<select id="getChannelAll" resultType="com.cbsd.universaltestsoftwareserver.module.manage.entity.Channel">
select
<include refid="query" />
<if test="ew != null">
${ew.customSqlSegment}
</if>
</select>
<select id="channelPage" resultType="com.cbsd.universaltestsoftwareserver.module.manage.entity.Channel">
select
<include refid="query" />
<if test="ew != null">
${ew.customSqlSegment}
</if>
</select>
<select id="channelDetailsById"
resultType="com.cbsd.universaltestsoftwareserver.module.manage.entity.Channel">
select
<include refid="query" />
where channels.channel_id = #{channelId}
</select>
<sql id="query" >
channels.*,
types.channel_type,
types.channel_type_name
from channel channels
left join channel_type types
on channels.channel_type_id = types.channel_type_id
</sql>
</mapper>