From 5a02b62b3b2b3663b89a1fb8be0c3f6ac1eb1d3f Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 29 Jun 2021 17:54:48 +0800 Subject: [PATCH] fix --- gc-shop/src/main/resources/mapper/shop/ScoreGoodsCategoryMapper.xml | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gc-shop/src/main/resources/mapper/shop/ScoreGoodsCategoryMapper.xml b/gc-shop/src/main/resources/mapper/shop/ScoreGoodsCategoryMapper.xml index 100a7f7..13fd2f0 100644 --- a/gc-shop/src/main/resources/mapper/shop/ScoreGoodsCategoryMapper.xml +++ b/gc-shop/src/main/resources/mapper/shop/ScoreGoodsCategoryMapper.xml @@ -15,16 +15,18 @@ select a.id id, a.name name, b.id c_id, b.name c_name from xzx_score_goods_category a left join xzx_score_goods_category b on a.id=b.parent_id + where a.parent_id=0 </select> <select id="queryGoodsCategoryList" resultType="com.xzx.gc.shop.vo.QueryGoodsCategoryListVo"> SELECT - * + a.*, + a.CREATED_TIME createTime FROM xzx_score_goods_category a WHERE 1 = 1 <if test="record.name != null and record.name != ''"> - and a.name=#{record.name} + and a.name like concat('%',#{record.name},'%') </if> <if test="record.categoryIden != null and record.categoryIden != ''"> and a.category_iden=#{record.categoryIden} @@ -37,7 +39,8 @@ <select id="viewGoodsCategoryOneList" resultType="com.xzx.gc.shop.vo.ViewGoodsCategoryListVo"> SELECT - * + a.*, + a.CREATED_TIME createTime FROM xzx_score_goods_category a WHERE 1 = 1 @@ -47,6 +50,7 @@ <select id="viewGoodsCategoryList" resultType="com.xzx.gc.shop.vo.ViewGoodsCategoryListVo"> SELECT a.*, + a.CREATED_TIME createTime, (select name from xzx_score_goods_category where a.parent_id = id) parentName FROM xzx_score_goods_category a -- Gitblit v1.9.1