修改商品查询接口接收参数
This commit is contained in:
parent
6e8f2cdba0
commit
2841800731
|
|
@ -63,6 +63,8 @@ public class Goods extends BaseEntity {
|
|||
@Excel(name = "区域Id", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long areaId;
|
||||
|
||||
private Long exceptParentAreaId;
|
||||
|
||||
private List<GoodsArea> goodsAreaList;
|
||||
|
||||
private Map<Integer, List<GoodsImgs>> goodsImgsMap;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</sql>
|
||||
<sql id="selectGoodsWithArea">
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark
|
||||
FROM goods g
|
||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||
</sql>
|
||||
|
|
@ -93,6 +93,7 @@
|
|||
|
||||
<select id="selectGoodsList" parameterType="com.ghy.goods.domain.Goods" resultMap="GoodsResult">
|
||||
<include refid="selectGoodsWithArea" />
|
||||
LEFT JOIN sys_area sa ON sa.area_id = ga.country_area_id
|
||||
<where>
|
||||
<if test="goodsCode != null and goodsCode != ''">
|
||||
AND goods_code like concat('%', #{goodsCode}, '%')
|
||||
|
|
@ -109,6 +110,9 @@
|
|||
<if test="areaId != null and areaId != ''">
|
||||
AND country_area_id = #{areaId}
|
||||
</if>
|
||||
<if test="exceptParentAreaId != null">
|
||||
AND sa.parent_code != #{exceptParentAreaId}
|
||||
</if>
|
||||
<if test="goodsName != null and goodsName != ''">
|
||||
AND goods_name like concat('%', #{goodsName}, '%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue