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
f57d2e18
Commit
f57d2e18
authored
Aug 30, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
4e33cdad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
16 deletions
+32
-16
BrandServiceImpl.java
...in/java/com/egolm/shop/service/impl/BrandServiceImpl.java
+32
-16
No files found.
src/main/java/com/egolm/shop/service/impl/BrandServiceImpl.java
View file @
f57d2e18
...
@@ -43,12 +43,24 @@ public class BrandServiceImpl implements BrandService {
...
@@ -43,12 +43,24 @@ public class BrandServiceImpl implements BrandService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getBrandList
(
Map
<
String
,
Object
>
map
)
{
public
List
<
Map
<
String
,
Object
>>
getBrandList
(
Map
<
String
,
Object
>
map
)
{
String
sql
=
" SELECT PinyinCode = b.sPinyinCode,BrandNO = acg.sBrandID, "
String
sql
=
"SELECT "
+
"BrandName = b.sBrandName,ImgPath = b.sLogoUrl "
+
"PinyinCode = b.sPinyinCode,"
+
"FROM tAgentContractGoods acg, tBrand b "
+
"BrandNO = acg.sBrandID, "
+
"WHERE acg.sBrandID = b.sBrandID and acg.sOrgNO = ? "
+
"BrandName = b.sBrandName,"
+
"group by b.sPinyinCode, acg.sBrandID, b.sBrandName, b.sLogoUrl "
+
"ImgPath = b.sLogoUrl "
+
"ORDER BY b.sPinyinCode "
;
+
"FROM "
+
"tAgentContractGoods acg, "
+
"tBrand b "
+
"WHERE "
+
"acg.sBrandID = b.sBrandID "
+
"and acg.sOrgNO = ? "
+
"group by "
+
"b.sPinyinCode, "
+
"acg.sBrandID, "
+
"b.sBrandName, "
+
"b.sLogoUrl "
+
"ORDER BY "
+
"b.sPinyinCode "
;
String
orgNO
=(
String
)
map
.
get
(
"orgNO"
);
String
orgNO
=(
String
)
map
.
get
(
"orgNO"
);
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
return
jdbcTemplate
.
queryForList
(
sql
,
orgNO
);
return
jdbcTemplate
.
queryForList
(
sql
,
orgNO
);
...
@@ -57,17 +69,21 @@ public class BrandServiceImpl implements BrandService {
...
@@ -57,17 +69,21 @@ public class BrandServiceImpl implements BrandService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getHotSaleBrands
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
getHotSaleBrands
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
String
sql
=
"SELECT "
String
sql
=
"SELECT "
+
"BrandNO = b.sBrandID, "
+
"BrandNO = b.sBrandID, "
+
"BrandName = b.sBrandName, "
+
"BrandName = b.sBrandName, "
+
"ImgPath = b.sLogoUrl, "
+
"ImgPath = b.sLogoUrl, "
+
"SaleQty = sum(a.nSaleQty) "
+
"SaleQty = sum(a.nSaleQty) "
+
"FROM tAgentGoodsDailyOnline a "
+
"FROM tAgentGoodsDailyOnline a "
+
"JOIN tGoods g ON a.nGoodsID = g.nGoodsID "
+
"JOIN tGoods g ON a.nGoodsID = g.nGoodsID "
+
"JOIN tBrand b ON g.sBrandID = b.sBrandID "
+
"JOIN tBrand b ON g.sBrandID = b.sBrandID "
+
"JOIN tAgentContractGoods acg ON a.sAgentContractNO = acg.sAgentContractNO "
+
"JOIN tAgentContractGoods acg ON "
+
"and a.nGoodsID = acg.nGoodsID "
+
"a.sAgentContractNO = acg.sAgentContractNO and a.nGoodsID = acg.nGoodsID "
+
"WHERE acg.sOrgNO = ? "
+
"WHERE "
+
"GROUP BY b.sBrandID, b.sBrandName, b.sLogoUrl "
;
+
"acg.sOrgNO = ? "
+
"GROUP BY "
+
"b.sBrandID, "
+
"b.sBrandName, "
+
"b.sLogoUrl "
;
String
orgNO
=(
String
)
map
.
get
(
"orgNO"
);
String
orgNO
=(
String
)
map
.
get
(
"orgNO"
);
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
return
jdbcTemplate
.
limit
(
sql
,
page
,
orgNO
);
return
jdbcTemplate
.
limit
(
sql
,
page
,
orgNO
);
...
...
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