Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
b2b5db15
Commit
b2b5db15
authored
Dec 16, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改banner接口
parent
9ec7ac2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
BannerBiz.java
...r/src/main/java/com/xxfc/platform/uccn/biz/BannerBiz.java
+8
-4
BannerWebController.java
...java/com/xxfc/platform/uccn/rest/BannerWebController.java
+2
-2
No files found.
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/BannerBiz.java
View file @
b2b5db15
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.xxfc.platform.uccn.dto.BannerDto
;
import
com.xxfc.platform.uccn.entity.Banner
;
import
com.xxfc.platform.uccn.mapper.BannerMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
...
...
@@ -47,12 +48,15 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
* @param indexShow 是否首页展示
* @return
*/
public
ObjectRestResponse
<
List
<
Banner
>>
getAll
(
Integer
indexShow
,
Integer
location
)
{
public
ObjectRestResponse
<
List
<
Banner
>>
getAll
(
Integer
indexShow
,
Integer
location
,
String
title
)
{
Example
example
=
new
Example
(
Banner
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"location"
,
location
);
if
(
indexShow
!=
null
)
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"indexShow"
,
indexShow
).
andEqualTo
(
"location"
,
location
);
}
else
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"location"
,
location
);
criteria
.
andEqualTo
(
"indexShow"
,
indexShow
);
}
if
(
StringUtils
.
isNotBlank
(
title
))
{
criteria
.
andLike
(
"title"
,
"%"
+
title
+
"%"
);
}
example
.
orderBy
(
"rank"
);
return
ObjectRestResponse
.
succ
(
mapper
.
selectByExample
(
example
));
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/BannerWebController.java
View file @
b2b5db15
...
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
public
class
BannerWebController
extends
BaseController
<
BannerBiz
,
Banner
>
{
@GetMapping
(
value
=
"/app/unauth/getAll"
)
public
ObjectRestResponse
getAll
(
@RequestParam
(
value
=
"location"
,
defaultValue
=
"1"
)
Integer
location
)
{
return
baseBiz
.
getAll
(
1
,
location
);
public
ObjectRestResponse
getAll
(
@RequestParam
(
value
=
"location"
,
defaultValue
=
"1"
)
Integer
location
,
String
title
)
{
return
baseBiz
.
getAll
(
1
,
location
,
title
);
}
}
\ No newline at end of file
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