94 lines
4.5 KiB
XML
94 lines
4.5 KiB
XML
|
|
<?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.ruoyi.system.mapper.ChannelMapper">
|
||
|
|
|
||
|
|
<!-- <resultMap type="ChannelVO" id="SmChannelResult" autoMapping="true">-->
|
||
|
|
<!-- <result property="serviceRate" column="service_rate" typeHandler="com.ruoyi.system.mapper.typehandler.NonNullDecimalTypeHandler"/>-->
|
||
|
|
<!-- <result property="costRate" column="cost_rate" typeHandler="com.ruoyi.system.mapper.typehandler.NonNullDecimalTypeHandler"/>-->
|
||
|
|
<!-- </resultMap>-->
|
||
|
|
|
||
|
|
<!-- <sql id="selectSmChannelVo">-->
|
||
|
|
<!-- select-->
|
||
|
|
<!-- sc.channel_id,-->
|
||
|
|
<!-- sc.name,-->
|
||
|
|
<!-- sc.enabled,-->
|
||
|
|
<!-- sc.service_rate,-->
|
||
|
|
<!-- sc.cost_rate,-->
|
||
|
|
<!-- sc.service_type,-->
|
||
|
|
<!-- sc.picture-->
|
||
|
|
<!-- from sm_channel sc-->
|
||
|
|
<!-- </sql>-->
|
||
|
|
|
||
|
|
<!-- <sql id="searchCondition">-->
|
||
|
|
<!-- <if test="query.name != null and query.name != ''"> and sc.name like concat('%', #{query.name}, '%')</if>-->
|
||
|
|
<!-- <if test="query.enabled != null "> and sc.enabled = #{query.enabled}</if>-->
|
||
|
|
<!-- <if test="query.serviceType != null and query.serviceType != ''"> and sc.service_type = #{query.serviceType}</if>-->
|
||
|
|
<!-- <if test="query.channelIds != null and query.channelIds.size() > 0 ">-->
|
||
|
|
<!-- and sc.channel_id in-->
|
||
|
|
<!-- <foreach item="item" collection="query.channelIds" open="(" separator="," close=")">-->
|
||
|
|
<!-- #{item}-->
|
||
|
|
<!-- </foreach>-->
|
||
|
|
<!-- </if>-->
|
||
|
|
<!-- </sql>-->
|
||
|
|
|
||
|
|
<!-- <select id="selectSmChannelList" parameterType="ChannelQuery" resultMap="SmChannelResult">-->
|
||
|
|
<!-- <include refid="selectSmChannelVo"/>-->
|
||
|
|
<!-- <where>-->
|
||
|
|
<!-- <include refid="searchCondition"/>-->
|
||
|
|
<!-- </where>-->
|
||
|
|
<!-- </select>-->
|
||
|
|
|
||
|
|
<!-- <select id="selectSmChannelByChannelId" parameterType="Long" resultMap="SmChannelResult">-->
|
||
|
|
<!-- <include refid="selectSmChannelVo"/>-->
|
||
|
|
<!-- where sc.channel_id = #{channelId}-->
|
||
|
|
<!-- </select>-->
|
||
|
|
|
||
|
|
<!-- <insert id="insertSmChannel" parameterType="Channel">-->
|
||
|
|
<!-- insert into sm_channel-->
|
||
|
|
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
||
|
|
<!-- <if test="channelId != null">channel_id,</if>-->
|
||
|
|
<!-- <if test="name != null">`name`,</if>-->
|
||
|
|
<!-- <if test="enabled != null">enabled,</if>-->
|
||
|
|
<!-- <if test="serviceRate != null">service_rate,</if>-->
|
||
|
|
<!-- <if test="costRate != null">cost_rate,</if>-->
|
||
|
|
<!-- <if test="serviceType != null">service_type,</if>-->
|
||
|
|
<!-- <if test="picture != null">picture,</if>-->
|
||
|
|
<!-- </trim>-->
|
||
|
|
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
|
||
|
|
<!-- <if test="channelId != null">#{channelId},</if>-->
|
||
|
|
<!-- <if test="name != null">#{name},</if>-->
|
||
|
|
<!-- <if test="enabled != null">#{enabled},</if>-->
|
||
|
|
<!-- <if test="serviceRate != null">#{serviceRate},</if>-->
|
||
|
|
<!-- <if test="costRate != null">#{costRate},</if>-->
|
||
|
|
<!-- <if test="serviceType != null">#{serviceType},</if>-->
|
||
|
|
<!-- <if test="picture != null">#{picture},</if>-->
|
||
|
|
<!-- </trim>-->
|
||
|
|
<!-- </insert>-->
|
||
|
|
|
||
|
|
<!-- <update id="updateSmChannel" parameterType="Channel">-->
|
||
|
|
<!-- update sm_channel-->
|
||
|
|
<!-- <trim prefix="SET" suffixOverrides=",">-->
|
||
|
|
<!-- <if test="data.name != null">name = #{data.name},</if>-->
|
||
|
|
<!-- <if test="data.enabled != null">enabled = #{data.enabled},</if>-->
|
||
|
|
<!-- <if test="data.serviceRate != null">service_rate = #{data.serviceRate},</if>-->
|
||
|
|
<!-- <if test="data.costRate != null">cost_rate = #{data.costRate},</if>-->
|
||
|
|
<!-- <if test="data.serviceType != null">service_type = #{data.serviceType},</if>-->
|
||
|
|
<!-- <if test="data.picture != null">picture = #{data.picture},</if>-->
|
||
|
|
<!-- </trim>-->
|
||
|
|
<!-- where channel_id = #{data.channelId}-->
|
||
|
|
<!-- </update>-->
|
||
|
|
|
||
|
|
<!-- <delete id="deleteSmChannelByChannelId" parameterType="Long">-->
|
||
|
|
<!-- delete from sm_channel where channel_id = #{channelId}-->
|
||
|
|
<!-- </delete>-->
|
||
|
|
|
||
|
|
<!-- <delete id="deleteSmChannelByChannelIds" parameterType="String">-->
|
||
|
|
<!-- delete from sm_channel where channel_id in-->
|
||
|
|
<!-- <foreach item="channelId" collection="array" open="(" separator="," close=")">-->
|
||
|
|
<!-- #{channelId}-->
|
||
|
|
<!-- </foreach>-->
|
||
|
|
<!-- </delete>-->
|
||
|
|
</mapper>
|