Authored by qinchao

销售类目

... ... @@ -59,4 +59,6 @@ public class SaleCategory {
private String linkDetail;
private String imageUrl;
}
... ...
... ... @@ -13,17 +13,18 @@
<result property="updateTime" column="update_time"/>
<result property="linkType" column="link_type"/>
<result property="linkDetail" column="link_detail"/>
<result property="imageUrl" column="image_url"/>
</resultMap>
<sql id="Base_Column_List">
id, category_name, status, level, parent_id, order_by,create_time,update_time,link_type,link_detail
id, category_name, status, level, parent_id, order_by,create_time,update_time,link_type,link_detail,image_url
</sql>
<select id="selectAll" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from sale_category where 1=1
order by level,order_by
order by level,order_by desc
</select>
</mapper>
\ No newline at end of file
... ...
package com.yoho.ufo.service.impl;
import com.google.common.collect.Lists;
import com.yoho.ufo.dal.SaleCategoryMapper;
import com.yoho.ufo.model.commoditybasicrole.category.ProductSort;
import com.yoho.ufo.model.salecategory.SaleCategory;
import com.yoho.ufo.service.ISaleCategoryService;
import com.yoho.ufo.util.CollectionUtil;
import com.yoho.ufo.util.OrikaUtils;
import com.yohobuy.ufo.model.request.productsort.ProductSortRequestBo;
import com.yohobuy.ufo.model.response.productsort.ProductSortTreeViewResponseBo;
import com.yohobuy.ufo.model.response.salecategory.SaleCategoryTreeViewResponseBo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
... ...