|
|
|
@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="categoryCode" column="category_code" /> |
|
|
|
|
<result property="categoryName" column="category_name" /> |
|
|
|
|
<result property="categoryNameEn" column="category_name_en" /> |
|
|
|
|
<result property="productLine" column="product_line" /> |
|
|
|
|
<result property="productLineCode" column="product_line_code"/> |
|
|
|
|
<result property="parentId" column="parent_id" /> |
|
|
|
|
<result property="ancestors" column="ancestors" /> |
|
|
|
|
<result property="categoryLevel" column="category_level" /> |
|
|
|
@ -24,7 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -24,7 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<!-- 修改基础查询SQL --> |
|
|
|
|
<sql id="selectProductCategoryVo"> |
|
|
|
|
select category_id, category_name, category_code, parent_id, ancestors, |
|
|
|
|
select category_id, category_name, category_code, category_name_en, |
|
|
|
|
product_line, product_line_code, parent_id, ancestors, |
|
|
|
|
category_level, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark |
|
|
|
|
from dhc_product_category |
|
|
|
|
</sql> |
|
|
|
@ -38,6 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -38,6 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="categoryName != null and categoryName != ''"> |
|
|
|
|
AND category_name like concat('%', #{categoryName}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="productLine != null and productLine != ''"> |
|
|
|
|
AND product_line = #{productLine} |
|
|
|
|
</if> |
|
|
|
|
<if test="productLineCode != null and productLineCode != ''"> |
|
|
|
|
AND product_line_code = #{productLineCode} |
|
|
|
|
</if> |
|
|
|
|
<if test="categoryLevel != null and categoryLevel != ''"> |
|
|
|
|
AND category_level = #{categoryLevel} |
|
|
|
|
</if> |
|
|
|
@ -82,6 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -82,6 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="categoryCode != null">category_code,</if> |
|
|
|
|
<if test="categoryName != null">category_name,</if> |
|
|
|
|
<if test="categoryNameEn != null">category_name_en,</if> |
|
|
|
|
<if test="productLine != null">product_line,</if> |
|
|
|
|
<if test="productLineCode != null">product_line_code,</if> |
|
|
|
|
<if test="parentId != null">parent_id,</if> |
|
|
|
|
<if test="ancestors != null">ancestors,</if> |
|
|
|
|
<if test="categoryLevel != null">category_level,</if> |
|
|
|
@ -110,6 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -110,6 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="categoryCode != null">category_code = #{categoryCode},</if> |
|
|
|
|
<if test="categoryName != null">category_name = #{categoryName},</if> |
|
|
|
|
<if test="categoryNameEn != null">category_name_en = #{categoryNameEn},</if> |
|
|
|
|
<if test="productLine != null">product_line = #{productLine},</if> |
|
|
|
|
<if test="productLineCode != null">product_line_code = #{productLineCode},</if> |
|
|
|
|
<if test="parentId != null">parent_id = #{parentId},</if> |
|
|
|
|
<if test="ancestors != null">ancestors = #{ancestors},</if> |
|
|
|
|
<if test="categoryLevel != null">category_level = #{categoryLevel},</if> |
|
|
|
@ -147,7 +160,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -147,7 +160,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<!-- 修改校验分类编码唯一性查询 --> |
|
|
|
|
<select id="checkProductCategoryCodeUnique" parameterType="String" resultMap="ProductCategoryResult"> |
|
|
|
|
select category_id, category_name, category_code, parent_id, ancestors, status |
|
|
|
|
select category_id, category_code, category_name, product_line, product_line_code, |
|
|
|
|
parent_id, ancestors, status |
|
|
|
|
from dhc_product_category |
|
|
|
|
where category_code = #{categoryCode} limit 1 |
|
|
|
|
</select> |
|
|
|
|