|
@@ -23,12 +23,39 @@
|
|
|
<result property="remark" column="remark"/>
|
|
|
</resultMap>
|
|
|
|
|
|
-
|
|
|
+ <resultMap type="com.younike.service.pojo.vo.StoreCategoryVo" id="StoreCategoryResultVo">
|
|
|
+ <result property="storeCategoryId" column="store_category_id"/>
|
|
|
+ <result property="bizType" column="biz_type"/>
|
|
|
+ <result property="categoryName" column="category_name"/>
|
|
|
+ <result property="parentId" column="parent_id"/>
|
|
|
+ <result property="icon" column="icon"/>
|
|
|
+ <result property="isEnable" column="is_enable"/>
|
|
|
+ <result property="indexShow" column="index_show"/>
|
|
|
+ <result property="type" column="type"/>
|
|
|
+ <result property="sorting" column="sorting"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="createdBy" column="created_by"/>
|
|
|
+ <result property="createdTime" column="created_time"/>
|
|
|
+ <result property="updatedBy" column="updated_by"/>
|
|
|
+ <result property="updatedTime" column="updated_time"/>
|
|
|
+ <result property="version" column="version"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <collection property="children" select="gradeCommentId" column="parent_id"
|
|
|
+ ofType="com.younike.service.pojo.vo.StoreCategoryVo">
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
|
|
|
|
|
|
<sql id="selectStoreCategoryVo">
|
|
|
select store_category_id, biz_type, category_name, parent_id, icon, is_enable, index_show, type, sorting, del_flag, created_by, created_time, updated_by, updated_time, version, remark from store_category
|
|
|
</sql>
|
|
|
+<!--获取门店分类树状图 (只查询一级分类)-->
|
|
|
+ <select id="getStoreCategoryTree" resultMap="StoreCategoryResultVo">
|
|
|
+ <include refid="selectStoreCategoryVo"/> where parent_id=0 and del_flag=0 ORDER BY sorting,created_time desc
|
|
|
+ </select>
|
|
|
|
|
|
+ <select id="gradeCommentId" resultMap="com.younike.service.mapper.StoreCategoryMapper.StoreCategoryResultVo">
|
|
|
+ <include refid="selectStoreCategoryVo"/> where comment_id=#{parent_id} and del_flag=0 ORDER BY sorting,created_time desc
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|