<?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.GoodsBargainPriceMapper">
|
|
<select id="queryGoodsBargainPricePage" resultType="com.ruoyi.other.api.domain.GoodsBargainPrice">
|
SELECT
|
tgbp.*,
|
tg.`name` AS goodsName,
|
tgc.`name` AS categoryName,
|
ts.`name` AS shop_name,
|
ts.shop_manager AS ownerName,
|
ts.phone AS ownerPhone
|
FROM
|
t_goods_bargain_price tgbp
|
INNER JOIN t_goods tg ON tgbp.goods_id = tg.id and tg.del_flag = 0
|
INNER JOIN t_shop ts ON tgbp.shop_id = ts.id and tg.del_flag = 0
|
LEFT JOIN t_goods_category tgc ON tg.goods_category_id = tgc.id
|
where tgbp.del_flag = 0
|
<if test="gp.goodsId != null">
|
and tgbp.goods_id = #{gp.goodsId}
|
</if>
|
<if test="gp.goodsName != null and gp.goodsName != ''">
|
and tg.`name` like concat('%',#{gp.goodsName},'%')
|
</if>
|
<if test="gp.goodsType != null and gp.goodsType != ''">
|
and tg.`type` = #{gp.goodsType}
|
</if>
|
<if test="gp.categoryId != null and gp.categoryId != ''">
|
and tg.goods_category_id = #{gp.categoryId}
|
</if>
|
<if test="gp.auditStatus != null and gp.auditStatus != ''">
|
and tgbp.audit_status = #{gp.auditStatus}
|
</if>
|
</select>
|
</mapper>
|