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
025d85ed
Commit
025d85ed
authored
Sep 24, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改峰会
parent
e6c3f38a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
ActivityBiz.java
...c/main/java/com/xxfc/platform/summit/biz/ActivityBiz.java
+6
-5
ActivityController.java
...m/xxfc/platform/summit/controller/ActivityController.java
+6
-0
No files found.
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/biz/ActivityBiz.java
View file @
025d85ed
...
...
@@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
tk.mybatis.mapper.entity.Example
;
import
javax.xml.crypto.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -40,21 +42,20 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
criteria
.
andLike
(
"title"
,
String
.
format
(
"%%%s%%"
,
query
.
getTitle
().
trim
()));
}
if
(
query
.
getStartTime
()
!=
null
)
{
criteria
.
andLike
(
"startTime"
,
query
.
getStartTime
()
/
1000
+
"%"
);
criteria
.
andLike
(
"startTime"
,
query
.
getStartTime
()
/(
1000
*
60
*
60
)+
"%"
);
}
if
(
query
.
getStatus
()
!=
null
)
{
criteria
.
andEqualTo
(
"status"
,
query
.
getStatus
());
}
if
(
query
.
getType
()
!=
null
&&
AccessType
.
PUBLIC
.
getCode
().
equals
(
query
.
getType
()))
{
criteria
.
andEqualTo
(
"isPublish"
,
PUBLISHED
);
}
exa
.
orderBy
(
"rank"
).
asc
().
orderBy
(
"startTime"
).
desc
();
if
(
AccessType
.
PUBLIC
.
getCode
().
equals
(
query
.
getType
()))
{
return
mapper
.
selectByExample
(
exa
);
}
//
if (AccessType.PUBLIC.getCode().equals(query.getType())) {
////
return mapper.selectByExample(exa);
////
}
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
...
...
xx-summit/xx-summit-server/src/main/java/com/xxfc/platform/summit/controller/ActivityController.java
View file @
025d85ed
...
...
@@ -5,6 +5,8 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import
com.xxfc.platform.summit.biz.ActivityBiz
;
import
com.xxfc.platform.summit.entity.Activity
;
import
com.xxfc.platform.summit.pojo.ActivityQuery
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
/**
...
...
@@ -12,16 +14,19 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping
(
"/activity"
)
@Api
(
tags
=
"峰会"
)
public
class
ActivityController
extends
BaseController
<
ActivityBiz
,
Activity
>
{
@PostMapping
(
"/app/unauth/list"
)
@ApiOperation
(
value
=
"峰会列表"
,
notes
=
"峰会列表"
)
public
ObjectRestResponse
getList
(
@RequestBody
ActivityQuery
query
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getList
(
query
));
}
@Override
@PutMapping
(
"/update"
)
@ApiOperation
(
value
=
"修改"
,
notes
=
"修改"
)
public
ObjectRestResponse
update
(
@RequestBody
Activity
activity
){
if
(
baseBiz
.
update
(
activity
))
{
return
ObjectRestResponse
.
succ
();
...
...
@@ -31,6 +36,7 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
@Override
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"添加"
,
notes
=
"添加"
)
public
ObjectRestResponse
add
(
@RequestBody
Activity
activity
){
if
(
baseBiz
.
add
(
activity
))
{
return
ObjectRestResponse
.
succ
();
...
...
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