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
567d7904
Commit
567d7904
authored
Sep 20, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
87647a66
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
PageController.java
src/main/java/com/egolm/shop/controller/PageController.java
+5
-5
PageServiceImpl.java
...ain/java/com/egolm/shop/service/impl/PageServiceImpl.java
+2
-2
No files found.
src/main/java/com/egolm/shop/controller/PageController.java
View file @
567d7904
...
...
@@ -36,22 +36,22 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
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
=
"
t
ypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"类型"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"
adT
ypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"类型"
,
defaultValue
=
""
),
@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
=
"/queryBanner"
,
method
=
RequestMethod
.
GET
)
public
String
queryBanner
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
typeID
=
request
.
getParameter
(
"t
ypeID"
);
String
adTypeID
=
request
.
getParameter
(
"adT
ypeID"
);
String
index
=
request
.
getParameter
(
"index"
);
String
limit
=
request
.
getParameter
(
"limit"
);
if
(!
StringUtil
.
isNotEmpty
(
orgNO
,
t
ypeID
,
index
,
limit
))
{
return
Rjx
.
json
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
orgNO
,
t
ypeID
,
"Msg_Parameter_empty"
)).
toJson
();
if
(!
StringUtil
.
isNotEmpty
(
orgNO
,
adT
ypeID
,
index
,
limit
))
{
return
Rjx
.
json
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
orgNO
,
adT
ypeID
,
"Msg_Parameter_empty"
)).
toJson
();
}
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"
typeID"
,
t
ypeID
);
params
.
put
(
"
adTypeID"
,
adT
ypeID
);
Page
page
=
new
Page
();
page
.
setIndex
(
Long
.
valueOf
(
index
));
...
...
src/main/java/com/egolm/shop/service/impl/PageServiceImpl.java
View file @
567d7904
...
...
@@ -63,7 +63,7 @@ public class PageServiceImpl implements PageService {
*/
public
List
<
Map
<
String
,
Object
>>
queryBanner
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
String
orgNO
=
params
.
get
(
"orgNO"
)+
""
;
String
typeID
=
params
.
get
(
"t
ypeID"
)+
""
;
String
adTypeID
=
params
.
get
(
"adT
ypeID"
)+
""
;
jdbcTemplate
.
setDialect
(
new
SqlServerDialect
());
String
sql
=
"SELECT BannerAdNO = b.sBannerAdNO, BannerAdTitle = b.sBannerAdTitle,OrgNO = b.sOrgNO,AdPostionTypeID = b.sAdPositionTypeID,AdPostionType = b.sAdPositionType,"
...
...
@@ -72,7 +72,7 @@ public class PageServiceImpl implements PageService {
+
" from tBannerAd b "
+
" WHERE sOrgNO = ? AND sAdPositionTypeID =? AND b.dStartTime <=getdate() AND b.dEndTime >= getdate() AND b.nTag&2 = 2 "
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
orgNO
,
t
ypeID
);
return
jdbcTemplate
.
limit
(
sql
,
page
,
orgNO
,
adT
ypeID
);
}
/**
...
...
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