Commit a1dd8478 by huluobin

update

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