Skip to content

Commit cb1523c

Browse files
author
liujun
committed
update
1 parent 221eee3 commit cb1523c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

llmall-commodity/src/main/resources/mappers/CategoryMapper.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
ofType="biz.llmall.common.entity.commodity.Category"
1313
select="selectCategoryByParentId"/>
1414
</resultMap>
15+
<resultMap id="CategoryMainMap" type="biz.llmall.common.entity.commodity.Category">
16+
<id column="id" jdbcType="BIGINT" property="id"/>
17+
<result column="name" jdbcType="VARCHAR" property="name"/>
18+
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
19+
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
20+
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
21+
</resultMap>
1522
<!--categories-->
1623
<sql id="Base_Column_List">
1724
id, name, parent_id, create_time, update_time
@@ -46,8 +53,9 @@
4653
update_time = #{updateTime,jdbcType=TIMESTAMP}
4754
where id = #{id,jdbcType=BIGINT}
4855
</update>
49-
<select id="findCategories" resultMap="CategoryBaseResultMap">
56+
<select id="findCategories" resultMap="CategoryMainMap">
5057
select * from category t1
51-
where 1=1;
58+
where 1=1
59+
and t1.parent_id = 0;
5260
</select>
5361
</mapper>

0 commit comments

Comments
 (0)