Files
wx-cashier-service/src/main/resources/mapper/TbShopVideoMapper.xml
wangw d7dfeee159 更新用户信息 头像/昵称
视频号/小程序/公众号mapper  暂未投入使用
2024-04-15 10:07:53 +08:00

79 lines
2.9 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.chaozhanggui.system.cashierservice.dao.TbShopVideoMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbShopVideo" id="TbShopVideoMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="type" column="type" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="channelId" column="channel_id" jdbcType="INTEGER"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="sourceId" column="source_id" jdbcType="INTEGER"/>
<result property="sourceUrl" column="source_url" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id
, shop_id, type, name, channel_id, source_id, source_url, status ,created_time, update_time</sql>
<!--查询单个-->
<select id="queryById" resultMap="TbShopVideoMap">
select
<include refid="Base_Column_List"/>
from tb_shop_video
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAll" resultMap="TbShopVideoMap">
select
<include refid="Base_Column_List"/>
from tb_shop_video
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="shopId != null">
and shop_id = #{shopId}
</if>
<if test="type != null">
and type = #{type}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="channelId != null">
and channel_id = #{channelId}
</if>
<if test="createdTime != null">
and created_time = #{createdTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="sourceId != null">
and source_id = #{sourceId}
</if>
<if test="sourceUrl != null and sourceUrl != ''">
and source_url = #{sourceUrl}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="videoId != null">
and video_id = #{videoId}
</if>
<if test="videoUrl != null and videoUrl != ''">
and video_url = #{videoUrl}
</if>
</where>
</select>
</mapper>