1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| <?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.other.mapper.GoodsMapper">
|
| <select id="selectListByShopId" resultType="com.ruoyi.other.api.domain.Goods">
| SELECT
| tg.id,
| tg.`name`,
| tg.type,
| tg.introduction,
| tg.selling_price,
| tg.original_price,
| tg.sale_num,
| tg.home_page_picture
| FROM
| t_shop ts
| LEFT JOIN t_goods_shop tgs ON ts.id = tgs.shop_id
| LEFT JOIN t_goods tg ON tg.id = tgs.goods_id
| where ts.id = #{shopId}
| <if test="vip != null">
| and FIND_IN_SET(#{vip}, commodity_authority) > 0
| </if>
| ORDER BY tg.sale_num DESC
| </select>
| </mapper>
|
|