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
54f4426e
Commit
54f4426e
authored
Sep 28, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ad4b8f45
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
BrandController.java
src/main/java/com/egolm/shop/controller/BrandController.java
+5
-13
BrandService.java
src/main/java/com/egolm/shop/service/BrandService.java
+1
-1
BrandServiceImpl.java
...in/java/com/egolm/shop/service/impl/BrandServiceImpl.java
+4
-3
No files found.
src/main/java/com/egolm/shop/controller/BrandController.java
View file @
54f4426e
...
@@ -169,28 +169,20 @@ public class BrandController {
...
@@ -169,28 +169,20 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"comId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"类型"
,
defaultValue
=
"0为全部"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"comId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"类型"
,
defaultValue
=
"0为全部"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"index"
,
dataType
=
"int"
,
required
=
true
,
value
=
"页码"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
})
@RequestMapping
(
value
=
"/hotIPList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/hotIPList"
,
method
=
RequestMethod
.
GET
)
public
String
hotIPList
(
HttpServletRequest
request
)
{
public
String
hotIPList
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
comId
=
request
.
getParameter
(
"comId"
);
String
comId
=
request
.
getParameter
(
"comId"
);
String
index
=
request
.
getParameter
(
"index"
);
if
(!
StringUtil
.
isNotEmpty
(
orgNO
,
comId
))
{
String
limit
=
request
.
getParameter
(
"limit"
);
if
(!
StringUtil
.
isNotEmpty
(
orgNO
,
comId
,
index
,
limit
))
{
return
Rjx
.
json
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
orgNO
,
comId
,
"Msg_Parameter_empty"
)).
toJson
();
return
Rjx
.
json
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
orgNO
,
comId
,
"Msg_Parameter_empty"
)).
toJson
();
}
}
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"comId"
,
comId
);
params
.
put
(
"comId"
,
comId
);
Page
page
=
new
Page
();
page
.
setIndex
(
Long
.
valueOf
(
index
));
page
.
setLimit
(
Long
.
valueOf
(
limit
));
page
.
setLimitKey
(
" Sort asc "
);
List
<
Map
<
String
,
Object
>>
hotIPList
=
brandService
.
hotIPList
(
params
,
page
);
List
<
Map
<
String
,
Object
>>
hotIPList
=
brandService
.
hotIPList
(
params
);
if
(
hotIPList
!=
null
&&
hotIPList
.
size
()
>
0
)
{
if
(
hotIPList
!=
null
&&
hotIPList
.
size
()
>
0
)
{
return
Rjx
.
jsonOk
().
set
(
"list"
,
hotIPList
).
toString
();
return
Rjx
.
jsonOk
().
set
(
"list"
,
hotIPList
).
toString
();
}
else
{
}
else
{
...
...
src/main/java/com/egolm/shop/service/BrandService.java
View file @
54f4426e
...
@@ -13,7 +13,7 @@ public interface BrandService {
...
@@ -13,7 +13,7 @@ public interface BrandService {
public
List
<
Map
<
String
,
Object
>>
queryBrandList
(
String
orgNo
);
public
List
<
Map
<
String
,
Object
>>
queryBrandList
(
String
orgNo
);
public
List
<
Map
<
String
,
Object
>>
hotIPList
(
Map
<
String
,
Object
>
params
,
Page
page
);
public
List
<
Map
<
String
,
Object
>>
hotIPList
(
Map
<
String
,
Object
>
params
);
public
Map
<
String
,
Object
>
hotIPDetail
(
Map
<
String
,
Object
>
params
);
public
Map
<
String
,
Object
>
hotIPDetail
(
Map
<
String
,
Object
>
params
);
...
...
src/main/java/com/egolm/shop/service/impl/BrandServiceImpl.java
View file @
54f4426e
...
@@ -105,19 +105,20 @@ public class BrandServiceImpl implements BrandService {
...
@@ -105,19 +105,20 @@ public class BrandServiceImpl implements BrandService {
* @param page
* @param page
* @return
* @return
*/
*/
public
List
<
Map
<
String
,
Object
>>
hotIPList
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
hotIPList
(
Map
<
String
,
Object
>
params
)
{
String
orgNO
=
params
.
get
(
"orgNO"
)+
""
;
String
orgNO
=
params
.
get
(
"orgNO"
)+
""
;
String
comId
=
params
.
get
(
"comId"
)+
""
;
String
comId
=
params
.
get
(
"comId"
)+
""
;
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
String
sql
=
"SELECT IPID = a.sIPID, OrgNO = a.sOrgNO,OrgName = o.sOrgDesc,BrandName = b.sBrandName,IPBrandTypeID = sIPBrandTypeID, IPBrandType = a.sIPBrandType,Sort =
a.nSort
"
String
sql
=
"SELECT IPID = a.sIPID, OrgNO = a.sOrgNO,OrgName = o.sOrgDesc,BrandName = b.sBrandName,IPBrandTypeID = sIPBrandTypeID, IPBrandType = a.sIPBrandType,Sort =
isnull(a.nSort,0)
"
+
" FROM tIPBrand a join tOrg o on a.sOrgNO = o.sOrgNO join tBrand b on a.sBrandID = b.sBrandID "
+
" FROM tIPBrand a join tOrg o on a.sOrgNO = o.sOrgNO join tBrand b on a.sBrandID = b.sBrandID "
+
" WHERE a.nTag&1=0 and a.sOrgNO = ? and a.nTag=2 "
;
+
" WHERE a.nTag&1=0 and a.sOrgNO = ? and a.nTag=2 "
;
if
(!
comId
.
equals
(
"0"
))
{
if
(!
comId
.
equals
(
"0"
))
{
sql
+=
" and a.sIPBrandTypeID = '"
+
comId
+
"' "
;
sql
+=
" and a.sIPBrandTypeID = '"
+
comId
+
"' "
;
}
}
sql
+=
" ORDER BY a.nSort DESC "
;
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
limit
(
sql
,
page
,
orgNO
);
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
sql
,
orgNO
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
map:
list
)
{
for
(
Map
<
String
,
Object
>
map:
list
)
{
String
IPID
=
map
.
get
(
"IPID"
)+
""
;
String
IPID
=
map
.
get
(
"IPID"
)+
""
;
...
...
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