Commit a1dd8478 by huluobin

update

parent 5c8b824d
......@@ -47,6 +47,7 @@ public class BaseProduceServiceImpl extends ServiceImpl<BaseProduceMapper, BaseP
//排序条件 1-saleNum 2-index_sort
Integer sort = baseFeatures != null && baseFeatures.getName().equals("热销款") ? 1 : 2;
request.setSort(sort);
request.setSourceFrom(SessionUtils.getSourceFrom());
page = baseProduceMapper.queryProducePage(page, request);
List<Integer> produceIds = page.getRecords().stream().map(BaseProduce::getId).collect(Collectors.toList());
......
......@@ -31,4 +31,7 @@ public class QueryProducePageRequest extends PageRequest implements Serializable
private Integer sort;
private String sourceFrom;
}
spring:
profiles:
active: dev
active: prod
servlet:
#文件上传最大容量
multipart:
......
......@@ -101,13 +101,17 @@
<select id="queryProducePage" resultType="com.gogirl.domain.product.serve.BaseProduce">
select * from base_produce t1
<if test="request.labelId !=null ">
left join features_mapping t2 on t1.id =t2.data_id and t2.data_type =2
</if>
<if test="request.colorSystemId !=null ">
left join color_system_product_map t3 on t1.id = t3.product_id
</if>
where t1.has_index_show =1
where true
<if test="request.sourceFrom !=null and request.sourceFrom ='customer' ">
and t1.has_index_show = 1
</if>
<if test="request.labelId !=null ">
and t2.features_id=#{request.labelId}
</if>
......@@ -130,6 +134,7 @@
</otherwise>
</choose>
</select>
<select id="queryProduceServiceDuration" resultType="com.gogirl.shared.product.CalcServiceDuration">
SELECT t1.bargain_price, t1.`name`, t1.service_duration, t1.id, t2.quantity, t3.price, t3.duration
from base_produce t1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment