Files
wx-cashier-service/src/main/resources/mapper/TbPlatformDictMapper.xml
wangw 6f6d1c3a7b 团购卷卷码表
原订单列表逻辑
店铺营业时间
团购卷订单
团购卷卷码表
资源管理 字典管理
通用门店
个人中心
支付
2024-05-13 17:51:30 +08:00

83 lines
3.8 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.TbPlatformDictMapper">
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict" id="TbPlatformDictMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="shareImg" column="share_img" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="value" column="value" jdbcType="VARCHAR"/>
<result property="fontColor" column="font_color" jdbcType="VARCHAR"/>
<result property="backColor" column="back_color" jdbcType="VARCHAR"/>
<result property="type" column="type" jdbcType="VARCHAR"/>
<result property="coverImg" column="cover_img" jdbcType="VARCHAR"/>
<result property="video" column="video" jdbcType="VARCHAR"/>
<result property="videoCoverImg" column="video_cover_img" jdbcType="VARCHAR"/>
<result property="jumpType" column="jump_type" jdbcType="VARCHAR"/>
<result property="absUrl" column="abs_url" jdbcType="VARCHAR"/>
<result property="createdAt" column="created_at" jdbcType="INTEGER"/>
<result property="updatedAt" column="updated_at" jdbcType="INTEGER"/>
<result property="isShowCash" column="is_show_cash" jdbcType="INTEGER"/>
<result property="isShowMall" column="is_show_mall" jdbcType="INTEGER"/>
<result property="isShowApp" column="is_show_app" jdbcType="INTEGER"/>
<result property="sort" column="sort" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TbPlatformDictMap">
select
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
where id = #{id}
</select>
<select id="queryByIdList" resultMap="TbPlatformDictMap">
select
id, name,value, type, font_color, back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
where id IN
<foreach collection="idList" item="id" open="(" separator="," close=")">
#{id}
</foreach>
order by sort
</select>
<select id="queryAllByType" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
select
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url, created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
<where>
<if test="type != null and type != ''">
type = #{type}
</if>
<if test="environment == 'app'">
and is_show_app = 1
</if>
<if test="environment == 'wx'">
and is_show_mall = 1
</if>
</where>
order by sort
</select>
<select id="queryGroupByValue" resultType="com.chaozhanggui.system.cashierservice.entity.TbPlatformDict">
select
id, name,value, type,font_color,back_color, cover_img, share_img, video, video_cover_img, jump_type, abs_url,
created_at, updated_at, is_show_cash, is_show_mall, is_show_app, sort
from tb_platform_dict
<where>
value = #{value}
and type = 'group'
<if test="environment == 'app'">
and is_show_app = 1
</if>
<if test="environment == 'wx'">
and is_show_mall = 1
</if>
</where>
order by sort
</select>
</mapper>