123456789101112131415161718192021222324 |
- <?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.chelvc.cloud.vehicle.server.dao.GoodsMapper">
- <select id="listMerchantSimpleGoods" resultType="com.chelvc.cloud.vehicle.api.dto.GoodsDTO">
- select id, name, logo, original_price, special_price, score, sale
- from `goods`
- <where>
- merchant_id = #{merchantId}
- <if test="param.offset != null">
- and id > #{param.offset}
- </if>
- <if test="param.type != null">
- and type = #{param.type}
- </if>
- </where>
- limit #{param.size}
- </select>
- <select id="listMerchantGoodsCategoryTypes" resultType="com.chelvc.cloud.vehicle.api.constant.CategoryType">
- select distinct type
- from `goods`
- where merchant_id = #{merchantId} and status = 'ONLINE'
- </select>
- </mapper>
|