Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
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
曲欣亮
shop
Commits
a11d1fba
Commit
a11d1fba
authored
Aug 29, 2018
by
黄毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.egolm.com/key/shop.git
parents
5cbd5147
78f845d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
BrandServiceImpl.java
...in/java/com/egolm/shop/service/impl/BrandServiceImpl.java
+2
-2
GoodsServiceImpl.java
...in/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
+4
-3
No files found.
src/main/java/com/egolm/shop/service/impl/BrandServiceImpl.java
View file @
a11d1fba
...
...
@@ -49,7 +49,7 @@ public class BrandServiceImpl implements BrandService {
@Override
public
List
<
Map
<
String
,
Object
>>
getHotSaleBrands
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
listMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
String
sql
=
"SELECT
TOP 20 "
String
sql
=
"SELECT
"
// TOP 20
+
"BrandNO = b.sBrandID, "
+
"BrandName = b.sBrandName, "
+
"ImgPath = b.sLogoUrl, "
...
...
@@ -61,7 +61,7 @@ public class BrandServiceImpl implements BrandService {
+
"and a.nGoodsID = acg.nGoodsID "
+
"WHERE acg.sOrgNO = ? "
+
"GROUP BY b.sBrandID, b.sBrandName, b.sLogoUrl "
+
"ORDER BY sum(a.nSaleQty) DESC "
;
+
"ORDER BY sum(a.nSaleQty) DESC
limit 0,20
"
;
String
OrgNO
=(
String
)
map
.
get
(
"OrgNO"
);
listMap
=
jdbcTemplate
.
queryForList
(
sql
,
OrgNO
);
return
listMap
;
...
...
src/main/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
View file @
a11d1fba
...
...
@@ -51,13 +51,14 @@ public class GoodsServiceImpl implements GoodsService {
@Override
public
List
<
Map
<
String
,
Object
>>
getHotSaleGoods
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
listMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
String
sql
=
"SELECT
TOP 20 "
String
sql
=
"SELECT
"
// TOP 20
+
"GoodsID = a.nGoodsID, "
+
"GoodsNO = g.sGoodsNO, "
+
"GoodsName = g.sGoodsDesc, "
+
"Price = acg.nSalePrice, "
+
"MinQty = acg.nMinSaleQty, "
+
"SaleUnit = acg.nSaleUnits, "
+
"Unit = acg.sUnit, "
+
"MarketPrice = acg.nMarketPrice, "
+
"MarketUnit = acg.sMarketUnit, "
+
"SaleQty = sum(a.nSaleQty) "
...
...
@@ -67,8 +68,8 @@ public class GoodsServiceImpl implements GoodsService {
+
"and a.nGoodsID = acg.nGoodsID "
+
"WHERE acg.sOrgNO = ? "
+
"GROUP BY a.nGoodsID, g.sGoodsNO, g.sGoodsDesc, "
+
"acg.nSalePrice, acg.nMinSaleQty, acg.nSaleUnits, acg.nMarketPrice, acg.sMarketUnit "
+
"ORDER BY sum(a.nSaleQty) DESC "
;
+
"acg.nSalePrice, acg.nMinSaleQty, acg.nSaleUnits,
acg.sUnit,
acg.nMarketPrice, acg.sMarketUnit "
+
"ORDER BY sum(a.nSaleQty) DESC
limit 0,20
"
;
String
OrgNO
=(
String
)
map
.
get
(
"OrgNO"
);
listMap
=
jdbcTemplate
.
queryForList
(
sql
,
OrgNO
);
return
listMap
;
...
...
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