Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
a1dd8478
Commit
a1dd8478
authored
Aug 20, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5c8b824d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
BaseProduceServiceImpl.java
...pplication/product/serve/impl/BaseProduceServiceImpl.java
+1
-0
QueryProducePageRequest.java
.../gogirl/shared/product/serve/QueryProducePageRequest.java
+3
-0
application.yml
src/main/resources/application.yml
+1
-1
BaseProduceMapper.xml
src/main/resources/mapper/product/BaseProduceMapper.xml
+6
-1
No files found.
src/main/java/com/gogirl/application/product/serve/impl/BaseProduceServiceImpl.java
View file @
a1dd8478
...
@@ -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
());
...
...
src/main/java/com/gogirl/shared/product/serve/QueryProducePageRequest.java
View file @
a1dd8478
...
@@ -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
;
}
}
src/main/resources/application.yml
View file @
a1dd8478
spring
:
spring
:
profiles
:
profiles
:
active
:
dev
active
:
prod
servlet
:
servlet
:
#文件上传最大容量
#文件上传最大容量
multipart
:
multipart
:
...
...
src/main/resources/mapper/product/BaseProduceMapper.xml
View file @
a1dd8478
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment