记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
652fe33f
Commit
652fe33f
authored
Apr 13, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
admin smile-impl 下线接口提交
parent
d94858e1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
8 deletions
+48
-8
SmileVolunteersController.java
.../controller/zhengzai/smile/SmileVolunteersController.java
+8
-1
list.html
...ces/templates/zhengzai/smile/volunteers/project/list.html
+12
-0
ISmileVolunteersProjectService.java
...hengzai/smile/service/ISmileVolunteersProjectService.java
+3
-0
SmileVolunteersProjectServiceImpl.java
...smile/service/impl/SmileVolunteersProjectServiceImpl.java
+14
-0
SmileVolunteersProject.java
...iquidnet/service/smile/entity/SmileVolunteersProject.java
+5
-0
db_ln_volunteers.sql
...le/liquidnet-service-smile-impl/docu/db_ln_volunteers.sql
+1
-0
SmileVolunteerServerImpl.java
...uidnet/service/service/impl/SmileVolunteerServerImpl.java
+5
-7
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/smile/SmileVolunteersController.java
View file @
652fe33f
...
...
@@ -168,6 +168,13 @@ public class SmileVolunteersController extends BaseController {
return
volunteersProjectService
.
updateData
(
param
);
}
@PostMapping
(
"project/status"
)
@ApiOperation
(
"活动修改状态"
)
@ResponseBody
public
AjaxResult
updateProject
(
String
projectId
,
Integer
status
)
{
return
volunteersProjectService
.
updateStatus
(
projectId
,
status
);
}
@GetMapping
(
"project/details/{projectId}"
)
@ApiOperation
(
"活动详情"
)
@ApiImplicitParams
({
...
...
@@ -212,7 +219,7 @@ public class SmileVolunteersController extends BaseController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"mid"
,
value
=
"mid"
),
})
public
String
detailsVolunteers
(
@PathVariable
(
"mid"
)
String
mid
,
ModelMap
mmap
)
{
public
String
detailsVolunteers
(
@PathVariable
(
"mid"
)
String
mid
,
ModelMap
mmap
)
{
SmileVolunteersDetailsVo
data
=
volunteersService
.
details
(
mid
);
mmap
.
put
(
"smileVolunteersDetailsVo"
,
data
);
AjaxResult
ajaxResult
=
volunteersTeamService
.
getListByProjectId
(
data
.
getProjectId
());
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/smile/volunteers/project/list.html
View file @
652fe33f
...
...
@@ -86,12 +86,24 @@
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(
\'
'
+
row
.
projectId
+
'
\'
)"><i class="fa fa-edit"></i>管理</a> '
);
if
(
row
.
status
==
1
)
{
actions
.
push
(
'<a class="btn btn-warning btn-xs " href="javascript:void(0)" onclick="f(
\'
'
+
row
.
projectId
+
'
\'
,0)"><i class="fa fa-remove"></i>下线</a>'
);
}
else
{
actions
.
push
(
'<a class="btn btn-warning btn-xs " href="javascript:void(0)" onclick="f(
\'
'
+
row
.
projectId
+
'
\'
,1)"><i class="fa fa-remove"></i>上线</a>'
);
}
return
actions
.
join
(
''
);
}
}]
};
$
.
table
.
init
(
options
);
});
function
f
(
a1
,
a2
)
{
$
.
post
(
smilePrefix
+
"/project/status"
,
{
projectId
:
a1
,
status
:
a2
},
function
(
res
)
{
alert
(
res
.
msg
);
location
.
reload
();
});
}
</script>
</body>
</html>
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/ISmileVolunteersProjectService.java
View file @
652fe33f
...
...
@@ -32,4 +32,7 @@ public interface ISmileVolunteersProjectService extends IService<SmileVolunteers
//活动详情
SmileProjectDetailsVo
details
(
String
projectId
);
//活动状态修改
AjaxResult
updateStatus
(
String
projectId
,
Integer
status
);
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/impl/SmileVolunteersProjectServiceImpl.java
View file @
652fe33f
...
...
@@ -137,6 +137,20 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
return
SmileProjectDetailsVo
.
getNew
().
copy
(
data
,
smileVolunteersTeamList
);
}
@Override
public
AjaxResult
updateStatus
(
String
projectId
,
Integer
status
)
{
LambdaQueryWrapper
<
SmileVolunteersProject
>
wrappers
=
Wrappers
.
lambdaQuery
(
SmileVolunteersProject
.
class
);
SmileVolunteersProject
smileVolunteersProject
=
SmileVolunteersProject
.
getNew
();
smileVolunteersProject
.
setStatus
(
status
);
volunteersProjectMapper
.
update
(
smileVolunteersProject
,
wrappers
.
eq
(
SmileVolunteersProject:
:
getProjectId
,
projectId
));
if
(
status
==
1
){
redisUtils
.
addProjectId
(
projectId
);
}
else
{
redisUtils
.
delProjectId
(
projectId
);
}
return
AjaxResult
.
success
(
"修改成功"
);
}
private
SmileVolunteersProject
copySmileVolunteersProject
(
SmileVPParam
source
,
LocalDateTime
ct
,
LocalDateTime
ut
)
{
SmileVolunteersProject
smileVolunteersProject
=
SmileVolunteersProject
.
getNew
();
smileVolunteersProject
.
setProjectId
(
source
.
getProjectId
());
...
...
liquidnet-bus-do/liquidnet-service-smile-do/src/main/java/com/liquidnet/service/smile/entity/SmileVolunteersProject.java
View file @
652fe33f
...
...
@@ -61,6 +61,11 @@ public class SmileVolunteersProject implements Serializable, Cloneable {
*/
private
String
img
;
/**
* 状态[1-上线|0-下线]
*/
private
Integer
status
;
/**
* 补充字段
*/
...
...
liquidnet-bus-service/liquidnet-service-smile/liquidnet-service-smile-impl/docu/db_ln_volunteers.sql
View file @
652fe33f
...
...
@@ -41,6 +41,7 @@ CREATE TABLE `smile_volunteers_project`
`address`
varchar
(
256
)
DEFAULT
''
COMMENT
'活动地址'
,
`introduce`
varchar
(
1028
)
DEFAULT
''
COMMENT
'活动介绍'
,
`img`
varchar
(
256
)
DEFAULT
''
COMMENT
'封面图'
,
`status`
tinyint
(
2
)
DEFAULT
1
COMMENT
'状态[1-上线|0-下线]'
,
`comment`
varchar
(
255
)
DEFAULT
''
COMMENT
'补充字段'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
...
...
liquidnet-bus-service/liquidnet-service-smile/liquidnet-service-smile-impl/src/main/java/com/liquidnet/service/service/impl/SmileVolunteerServerImpl.java
View file @
652fe33f
...
...
@@ -22,10 +22,7 @@ import org.springframework.stereotype.Service;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
...
...
@@ -48,10 +45,11 @@ public class SmileVolunteerServerImpl implements SmileVolunteersService {
SmileProjectDetailsVo
redisData
=
smileRedisUtils
.
getProject
(
projectId
);
ArrayList
<
String
>
teamIds
=
smileRedisUtils
.
getVolunteers
(
projectId
,
uid
);
SmileVProjectListVo
vo
=
SmileVProjectListVo
.
getNew
().
copy
(
redisData
,
teamIds
==
null
?
0
:
1
);
if
(
LocalDateTime
.
now
().
isBefore
(
LocalDateTime
.
parse
(
vo
.
getTimeEnd
(),
DTF_YMD_HMS
)))
{
voList
.
add
(
vo
);
}
//
if (LocalDateTime.now().isBefore(LocalDateTime.parse(vo.getTimeEnd(), DTF_YMD_HMS))) {
voList
.
add
(
vo
);
//
}
}
voList
=
voList
.
stream
().
sorted
(
Comparator
.
comparing
(
SmileVProjectListVo:
:
getTimeStart
)).
collect
(
Collectors
.
toList
());
return
ResponseDto
.
success
(
voList
);
}
...
...
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