|
@@ -12,7 +12,7 @@ |
|
@@ -12,7 +12,7 @@ |
12
|
</resultMap>
|
12
|
</resultMap>
|
13
|
|
13
|
|
14
|
<sql id="queryColumns">
|
14
|
<sql id="queryColumns">
|
15
|
- size.id, size.size_name, sort.sort_name as sortName
|
15
|
+ size.id, size.size_name, CONCAT(IFNULL(CONCAT(sort2.sort_name,'/'),''),sort1.sort_name) AS sortName, size.order_by
|
16
|
</sql>
|
16
|
</sql>
|
17
|
|
17
|
|
18
|
<insert id="insertSize" parameterType="com.yoho.ufo.model.commoditybasicrole.size.Size">
|
18
|
<insert id="insertSize" parameterType="com.yoho.ufo.model.commoditybasicrole.size.Size">
|
|
@@ -52,27 +52,28 @@ |
|
@@ -52,27 +52,28 @@ |
52
|
|
52
|
|
53
|
|
53
|
|
54
|
<sql id="queryPage">
|
54
|
<sql id="queryPage">
|
55
|
- LEFT JOIN product_sort sort
|
|
|
56
|
- ON size.sort_id = sort.id
|
55
|
+ from size
|
|
|
56
|
+ LEFT JOIN product_sort sort1
|
|
|
57
|
+ ON size.sort_id = sort1.id
|
|
|
58
|
+ left join product_sort sort2
|
|
|
59
|
+ on sort1.parent_id = sort2.id
|
57
|
<where>
|
60
|
<where>
|
58
|
<if test="size.sortName != null and size.sortName != ''">
|
61
|
<if test="size.sortName != null and size.sortName != ''">
|
59
|
- sort.sort_name like concat('%', #{size.sortName}, '%')
|
62
|
+ sort1.sort_name like concat('%', #{size.sortName}, '%') or sort2.sort_name like concat('%', #{size.sortName}, '%')
|
60
|
</if>
|
63
|
</if>
|
61
|
<if test="size.sizeName != null and size.sizeName !=''">
|
64
|
<if test="size.sizeName != null and size.sizeName !=''">
|
62
|
- size.size_name like concat('%', #{size.sizeName}, '%')
|
65
|
+ and size.size_name like concat('%', #{size.sizeName}, '%')
|
63
|
</if>
|
66
|
</if>
|
64
|
</where>
|
67
|
</where>
|
65
|
</sql>
|
68
|
</sql>
|
66
|
|
69
|
|
67
|
<select id="selectSizeCount" resultType="integer">
|
70
|
<select id="selectSizeCount" resultType="integer">
|
68
|
select count(*)
|
71
|
select count(*)
|
69
|
- from size
|
|
|
70
|
<include refid="queryPage"/>
|
72
|
<include refid="queryPage"/>
|
71
|
</select>
|
73
|
</select>
|
72
|
|
74
|
|
73
|
<select id="getSizePageList" resultMap="sizeMap">
|
75
|
<select id="getSizePageList" resultMap="sizeMap">
|
74
|
select <include refid="queryColumns"/>
|
76
|
select <include refid="queryColumns"/>
|
75
|
- from size
|
|
|
76
|
<include refid="queryPage"/>
|
77
|
<include refid="queryPage"/>
|
77
|
order by size.update_time desc
|
78
|
order by size.update_time desc
|
78
|
limit #{page.startIndex}, #{page.pageSize}
|
79
|
limit #{page.startIndex}, #{page.pageSize}
|