...
|
...
|
@@ -12,7 +12,7 @@ |
|
|
</resultMap>
|
|
|
|
|
|
<sql id="queryColumns">
|
|
|
size.id, size.size_name, sort.sort_name as sortName
|
|
|
size.id, size.size_name, CONCAT(IFNULL(CONCAT(sort2.sort_name,'/'),''),sort1.sort_name) AS sortName, size.order_by
|
|
|
</sql>
|
|
|
|
|
|
<insert id="insertSize" parameterType="com.yoho.ufo.model.commoditybasicrole.size.Size">
|
...
|
...
|
@@ -52,27 +52,28 @@ |
|
|
|
|
|
|
|
|
<sql id="queryPage">
|
|
|
LEFT JOIN product_sort sort
|
|
|
ON size.sort_id = sort.id
|
|
|
from size
|
|
|
LEFT JOIN product_sort sort1
|
|
|
ON size.sort_id = sort1.id
|
|
|
left join product_sort sort2
|
|
|
on sort1.parent_id = sort2.id
|
|
|
<where>
|
|
|
<if test="size.sortName != null and size.sortName != ''">
|
|
|
sort.sort_name like concat('%', #{size.sortName}, '%')
|
|
|
sort1.sort_name like concat('%', #{size.sortName}, '%') or sort2.sort_name like concat('%', #{size.sortName}, '%')
|
|
|
</if>
|
|
|
<if test="size.sizeName != null and size.sizeName !=''">
|
|
|
size.size_name like concat('%', #{size.sizeName}, '%')
|
|
|
and size.size_name like concat('%', #{size.sizeName}, '%')
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectSizeCount" resultType="integer">
|
|
|
select count(*)
|
|
|
from size
|
|
|
<include refid="queryPage"/>
|
|
|
</select>
|
|
|
|
|
|
<select id="getSizePageList" resultMap="sizeMap">
|
|
|
select <include refid="queryColumns"/>
|
|
|
from size
|
|
|
<include refid="queryPage"/>
|
|
|
order by size.update_time desc
|
|
|
limit #{page.startIndex}, #{page.pageSize}
|
...
|
...
|
|