记得上下班打卡 | 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
f5dd327b
Commit
f5dd327b
authored
Apr 06, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 活动
parent
d4ac52aa
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
488 additions
and
74 deletions
+488
-74
SmileProjectDetailsVo.java
...iquidnet/service/goblin/dto/vo/SmileProjectDetailsVo.java
+2
-0
SmileVolunteersTeamVo.java
...iquidnet/service/goblin/dto/vo/SmileVolunteersTeamVo.java
+55
-0
SmileVolunteersController.java
.../controller/zhengzai/smile/SmileVolunteersController.java
+40
-2
list.html
...n/resources/templates/zhengzai/smile/volunteers/list.html
+1
-7
add.html
...rces/templates/zhengzai/smile/volunteers/project/add.html
+171
-0
edit.html
...ces/templates/zhengzai/smile/volunteers/project/edit.html
+179
-0
list.html
...ces/templates/zhengzai/smile/volunteers/project/list.html
+27
-53
SmileVPParam.java
...quidnet/client/admin/zhengzai/smile/dto/SmileVPParam.java
+1
-1
SmileVolunteersProjectServiceImpl.java
...smile/service/impl/SmileVolunteersProjectServiceImpl.java
+10
-9
db_ln_volunteers.sql
...le/liquidnet-service-smile-impl/docu/db_ln_volunteers.sql
+2
-2
No files found.
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/dto/vo/SmileProjectDetailsVo.java
View file @
f5dd327b
...
@@ -29,6 +29,8 @@ public class SmileProjectDetailsVo implements Cloneable {
...
@@ -29,6 +29,8 @@ public class SmileProjectDetailsVo implements Cloneable {
private
String
img
;
private
String
img
;
@ApiModelProperty
(
value
=
"职责组集合"
,
example
=
""
)
@ApiModelProperty
(
value
=
"职责组集合"
,
example
=
""
)
private
List
<
SmileVolunteersTeam
>
teamArray
;
private
List
<
SmileVolunteersTeam
>
teamArray
;
@ApiModelProperty
(
value
=
"职责组集合Vo"
,
example
=
""
)
private
List
<
SmileVolunteersTeamVo
>
teamVoArray
;
private
static
final
SmileProjectDetailsVo
obj
=
new
SmileProjectDetailsVo
();
private
static
final
SmileProjectDetailsVo
obj
=
new
SmileProjectDetailsVo
();
...
...
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/dto/vo/SmileVolunteersTeamVo.java
0 → 100644
View file @
f5dd327b
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 志愿者-项目职责组表
* </p>
*
* @author jiangxiulong
* @since 2022-04-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SmileVolunteersTeamVo
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 职责组id
*/
private
String
teamId
;
/**
* 组名称
*/
private
String
name
;
/**
* 组介绍
*/
private
String
introduce
;
/**
* 是否选中
*/
private
Integer
isCheck
;
private
static
final
SmileVolunteersTeamVo
obj
=
new
SmileVolunteersTeamVo
();
public
static
SmileVolunteersTeamVo
getNew
()
{
try
{
return
(
SmileVolunteersTeamVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SmileVolunteersTeamVo
();
}
}
}
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 @
f5dd327b
...
@@ -3,6 +3,7 @@ package com.liquidnet.client.admin.web.controller.zhengzai.smile;
...
@@ -3,6 +3,7 @@ package com.liquidnet.client.admin.web.controller.zhengzai.smile;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.framework.web.domain.server.Sys
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVPParam
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVPParam
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVPSParam
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVPSParam
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVSParam
;
import
com.liquidnet.client.admin.zhengzai.smile.dto.SmileVSParam
;
...
@@ -10,15 +11,22 @@ import com.liquidnet.client.admin.zhengzai.smile.dto.SmileVTSParam;
...
@@ -10,15 +11,22 @@ import com.liquidnet.client.admin.zhengzai.smile.dto.SmileVTSParam;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersProjectService
;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersProjectService
;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersService
;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersService
;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersTeamService
;
import
com.liquidnet.client.admin.zhengzai.smile.service.ISmileVolunteersTeamService
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.goblin.dto.vo.SmileProjectDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.SmileProjectDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.SmileVolunteersDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.SmileVolunteersDetailsVo
;
import
com.liquidnet.service.goblin.dto.vo.SmileVolunteersTeamVo
;
import
com.liquidnet.service.smile.entity.SmileVolunteersTeam
;
import
com.liquidnet.service.smile.entity.SmileVolunteersTeam
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Api
(
tags
=
"志愿者"
)
@Api
(
tags
=
"志愿者"
)
@Controller
@Controller
@RequestMapping
(
"/smile/volunteers"
)
@RequestMapping
(
"/smile/volunteers"
)
...
@@ -30,6 +38,8 @@ public class SmileVolunteersController extends BaseController {
...
@@ -30,6 +38,8 @@ public class SmileVolunteersController extends BaseController {
ISmileVolunteersTeamService
volunteersTeamService
;
ISmileVolunteersTeamService
volunteersTeamService
;
@Autowired
@Autowired
ISmileVolunteersService
volunteersService
;
ISmileVolunteersService
volunteersService
;
@Value
(
"${liquidnet.client.admin.platformUrl}"
)
private
String
platformUrl
;
private
final
String
prefix
=
"zhengzai/smile/volunteers"
;
private
final
String
prefix
=
"zhengzai/smile/volunteers"
;
...
@@ -69,7 +79,14 @@ public class SmileVolunteersController extends BaseController {
...
@@ -69,7 +79,14 @@ public class SmileVolunteersController extends BaseController {
* 新增活动
* 新增活动
*/
*/
@GetMapping
(
"/project/add"
)
@GetMapping
(
"/project/add"
)
public
String
addProject
()
{
public
String
addProject
(
ModelMap
mmap
)
{
SmileVTSParam
param
=
new
SmileVTSParam
();
param
.
setPageNum
(
1
);
param
.
setPageSize
(
40
);
TableDataInfo
tableDataInfo
=
volunteersTeamService
.
list
(
param
);
List
<
SmileVolunteersTeam
>
list
=
(
List
<
SmileVolunteersTeam
>)
tableDataInfo
.
getRows
();
mmap
.
put
(
"platformUrl"
,
platformUrl
);
mmap
.
put
(
"listData"
,
list
);
return
prefix
+
"/project/add"
;
return
prefix
+
"/project/add"
;
}
}
...
@@ -155,8 +172,29 @@ public class SmileVolunteersController extends BaseController {
...
@@ -155,8 +172,29 @@ public class SmileVolunteersController extends BaseController {
})
})
public
String
detailsProject
(
@PathVariable
(
"projectId"
)
String
projectId
,
ModelMap
mmap
)
{
public
String
detailsProject
(
@PathVariable
(
"projectId"
)
String
projectId
,
ModelMap
mmap
)
{
SmileProjectDetailsVo
data
=
volunteersProjectService
.
details
(
projectId
);
SmileProjectDetailsVo
data
=
volunteersProjectService
.
details
(
projectId
);
SmileVTSParam
param
=
new
SmileVTSParam
();
param
.
setPageNum
(
1
);
param
.
setPageSize
(
40
);
TableDataInfo
tableDataInfo
=
volunteersTeamService
.
list
(
param
);
List
<
SmileVolunteersTeamVo
>
listVo
=
new
ArrayList
<>();
List
<
SmileVolunteersTeam
>
listBean
=
((
List
<
SmileVolunteersTeam
>)
tableDataInfo
.
getRows
());
List
<
String
>
list
=
data
.
getTeamArray
().
stream
().
map
(
SmileVolunteersTeam:
:
getTeamId
).
collect
(
Collectors
.
toList
());
for
(
SmileVolunteersTeam
bean
:
listBean
)
{
SmileVolunteersTeamVo
vo
=
SmileVolunteersTeamVo
.
getNew
();
vo
.
setTeamId
(
bean
.
getTeamId
());
vo
.
setName
(
bean
.
getName
());
vo
.
setIntroduce
(
bean
.
getIntroduce
());
if
(
list
.
contains
(
bean
.
getTeamId
()))
{
vo
.
setIsCheck
(
1
);
}
else
{
vo
.
setIsCheck
(
0
);
}
listVo
.
add
(
vo
);
}
data
.
setTeamVoArray
(
listVo
);
mmap
.
put
(
"platformUrl"
,
platformUrl
);
mmap
.
put
(
"smileProjectDetailsVo"
,
data
);
mmap
.
put
(
"smileProjectDetailsVo"
,
data
);
return
prefix
+
"/project/
details
"
;
return
prefix
+
"/project/
edit
"
;
}
}
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/smile/volunteers/list.html
View file @
f5dd327b
...
@@ -47,18 +47,12 @@
...
@@ -47,18 +47,12 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
detailFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performances:detail'
)}]];
var
prefix
=
ctx
+
"smile/volunteers"
;
var
expertFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performances:expert'
)}]];
var
prefix
=
ctx
+
"kylin/performances"
;
$
(
function
()
{
$
(
function
()
{
var
options
=
{
var
options
=
{
url
:
prefix
+
"/list"
,
url
:
prefix
+
"/list"
,
detailUrl
:
prefix
+
"/details/{id}"
,
detailUrl
:
prefix
+
"/details/{id}"
,
createUrl
:
prefix
+
"/add"
,
updateUrl
:
prefix
+
"/edit/{id}"
,
removeUrl
:
prefix
+
"/remove"
,
exportUrl
:
prefix
+
"/export"
,
// sortName: "sort",
// sortName: "sort",
modalName
:
"演出"
,
modalName
:
"演出"
,
orderSc
:
"desc"
,
orderSc
:
"desc"
,
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/smile/volunteers/project/add.html
0 → 100644
View file @
f5dd327b
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('新增活动')"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-team-add"
>
<input
id=
"teamIdArray"
name=
"teamIdArray"
type=
"hidden"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
活动名称:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"title"
class=
"form-control"
type=
"text"
required
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-8"
>
<input
id=
"fileinput10"
type=
"file"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
封面图地址:
</label>
<div
class=
"col-sm-8"
>
<input
id=
"iptUrl"
name=
"img"
class=
"form-control"
type=
"text"
required
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
地址:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"address"
class=
"form-control"
type=
"text"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
介绍:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"introduce"
class=
"form-control"
type=
"text"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
开始时间:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"timeStart"
class=
"form-control"
type=
"date"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
结束时间:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"timeEnd"
class=
"form-control"
type=
"date"
required
>
</div>
</div>
</form>
<form
class=
"form-horizontal m"
id=
"form-team"
th:object=
"${listData}"
>
<table
id=
"team-table"
th:border=
"1"
>
<tr>
<td>
名称
</td>
<td>
介绍
</td>
<td>
选中
</td>
<tr/>
<div
th:each=
"item : ${listData}"
>
<tr
class=
"content-tr"
>
<td
th:value=
"${item.name}"
th:text=
"${item.name}"
>
</td>
<td
th:text=
"${item.introduce}"
>
</td>
<td>
<input
name=
"checkbox"
type=
"checkbox"
th:value=
"${item.teamId}"
>
选中
</label>
</td>
</tr>
</div>
</table>
</form>
<div
class=
"cover_pop"
style=
"display: none"
>
<div
class=
"pop_inner"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"file-loading"
>
<input
id=
"fileinput-demo-1"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
data-msg-placeholder=
"Select {files} for upload..."
>
<input
hidden
id=
"coverImg"
name=
"coverImg"
>
</div>
</div>
<div
class=
"pop_btns"
>
<div
class=
"confirm_btn"
onclick=
"popBtn(1)"
>
确认
</div>
<div
class=
"confirm_btn confirm_cancel"
onclick=
"popBtn(0)"
>
取消
</div>
</div>
</div>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<script
th:inline=
"javascript"
>
var
smilePrefix
=
ctx
+
"smile/volunteers"
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
teamIds
=
[];
$
(
"#form-team-add"
).
validate
({
focusCleanup
:
true
});
$
(
"input:checkbox"
).
click
(
function
()
{
var
domName
=
$
(
this
).
attr
(
'name'
);
//获取当前单选框控件name 属性值
var
checkedState
=
$
(
this
).
attr
(
'checked'
);
//记录当前选中状态
var
value
=
$
(
this
).
val
();
$
(
"input:radio[name='"
+
domName
+
"']"
).
attr
(
'checked'
,
false
);
//1.
$
(
this
).
attr
(
'checked'
,
true
);
//2.
if
(
checkedState
==
'checked'
)
{
$
(
this
).
attr
(
'checked'
,
false
);
//3.
teamIds
.
remove
(
value
)
}
else
{
teamIds
.
push
(
value
);
}
});
//扩展数组方法:查找指定元素的下标
//author cjianquan 2016-1-14
Array
.
prototype
.
indexOf
=
function
(
val
)
{
for
(
var
i
=
0
;
i
<
this
.
length
;
i
++
)
{
if
(
this
[
i
]
==
val
)
return
i
;
}
return
-
1
;
};
//扩展数组方法:删除指定元素
//author cjianquan 2016-1-14
Array
.
prototype
.
remove
=
function
(
val
)
{
var
index
=
this
.
indexOf
(
val
);
while
(
index
>
-
1
)
{
this
.
splice
(
index
,
1
);
index
=
this
.
indexOf
(
val
);
}
};
$
(
"#fileinput10"
).
change
((
e
)
=>
{
if
(
!
e
.
target
.
files
[
0
])
{
return
}
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
e
.
target
.
files
[
0
]);
$
.
ajax
({
url
:
platformUrl
+
"/platform/basicServices/alOss/upload"
,
//路径是你控制器中上传图片的方法,下面controller里面我会写到
data
:
formData
,
cache
:
false
,
contentType
:
false
,
processData
:
false
,
type
:
'POST'
,
success
:
function
(
res
)
{
console
.
log
(
res
,
'res'
)
let
imgPath
=
'https://img.zhengzai.tv/'
+
res
.
data
.
ossPath
;
$
(
"#iptUrl"
).
val
(
imgPath
);
}
});
})
function
submitHandler
()
{
document
.
getElementById
(
"teamIdArray"
).
value
=
teamIds
.
join
(
","
);
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
smilePrefix
+
"/project/insert"
,
$
(
'#form-team-add'
).
serialize
());
}
}
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/smile/volunteers/project/edit.html
0 → 100644
View file @
f5dd327b
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('修改活动')"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-project-edit"
th:object=
"${smileProjectDetailsVo}"
>
<input
id=
"teamIdArray"
name=
"teamIdArray"
type=
"hidden"
>
<input
id=
"projectId"
name=
"projectId"
type=
"hidden"
th:value=
"${smileProjectDetailsVo.projectId}"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
活动名称:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"title"
class=
"form-control"
type=
"text"
th:value=
"${smileProjectDetailsVo.title}"
required
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-8"
>
<input
id=
"fileinput10"
type=
"file"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
封面图地址:
</label>
<div
class=
"col-sm-8"
>
<input
id=
"iptUrl"
name=
"img"
class=
"form-control"
type=
"text"
th:value=
"${smileProjectDetailsVo.img}"
required
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
地址:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"address"
class=
"form-control"
type=
"text"
th:value=
"${smileProjectDetailsVo.address}"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
介绍:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"introduce"
class=
"form-control"
type=
"text"
th:value=
"${smileProjectDetailsVo.introduce}"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
开始时间:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"timeStart"
class=
"form-control"
type=
"date"
th:value=
"${smileProjectDetailsVo.timeStart}"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
结束时间:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"timeEnd"
class=
"form-control"
type=
"date"
th:value=
"${smileProjectDetailsVo.timeEnd}"
required
>
</div>
</div>
</form>
<form
class=
"form-horizontal m"
id=
"form-team"
>
<table
id=
"team-table"
th:border=
"1"
>
<tr>
<td>
名称
</td>
<td>
介绍
</td>
<td>
选中
</td>
<tr/>
<div
th:each=
"item : ${smileProjectDetailsVo.teamVoArray}"
>
<tr
class=
"content-tr"
>
<td
th:value=
"${item.name}"
th:text=
"${item.name}"
>
</td>
<td
th:text=
"${item.introduce}"
>
</td>
<td>
<input
name=
"checkbox"
type=
"checkbox"
th:value=
"${item.teamId}"
th:if=
"${item.isCheck==1}"
th:text=
"选中"
checked
></label>
<input
name=
"checkbox"
type=
"checkbox"
th:value=
"${item.teamId}"
th:if=
"${item.isCheck==0}"
th:text=
"选中"
></label>
</td>
</tr>
</div>
</table>
</form>
<div
class=
"cover_pop"
style=
"display: none"
>
<div
class=
"pop_inner"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"file-loading"
>
<input
id=
"fileinput-demo-1"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
data-msg-placeholder=
"Select {files} for upload..."
>
<input
hidden
id=
"coverImg"
name=
"coverImg"
>
</div>
</div>
<div
class=
"pop_btns"
>
<div
class=
"confirm_btn"
onclick=
"popBtn(1)"
>
确认
</div>
<div
class=
"confirm_btn confirm_cancel"
onclick=
"popBtn(0)"
>
取消
</div>
</div>
</div>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<script
th:inline=
"javascript"
>
var
smilePrefix
=
ctx
+
"smile/volunteers"
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
var
teamIds
=
[];
$
(
"#form-roadShow-edit"
).
validate
({
focusCleanup
:
true
});
$
(
"input:checkbox"
).
click
(
function
()
{
var
domName
=
$
(
this
).
attr
(
'name'
);
//获取当前单选框控件name 属性值
var
checkedState
=
$
(
this
).
attr
(
'checked'
);
//记录当前选中状态
var
value
=
$
(
this
).
val
();
$
(
"input:radio[name='"
+
domName
+
"']"
).
attr
(
'checked'
,
false
);
//1.
$
(
this
).
attr
(
'checked'
,
true
);
//2.
if
(
checkedState
==
'checked'
)
{
$
(
this
).
attr
(
'checked'
,
false
);
//3.
teamIds
.
remove
(
value
)
}
else
{
teamIds
.
push
(
value
);
}
});
//扩展数组方法:查找指定元素的下标
//author cjianquan 2016-1-14
Array
.
prototype
.
indexOf
=
function
(
val
)
{
for
(
var
i
=
0
;
i
<
this
.
length
;
i
++
)
{
if
(
this
[
i
]
==
val
)
return
i
;
}
return
-
1
;
};
//扩展数组方法:删除指定元素
//author cjianquan 2016-1-14
Array
.
prototype
.
remove
=
function
(
val
)
{
var
index
=
this
.
indexOf
(
val
);
while
(
index
>
-
1
)
{
this
.
splice
(
index
,
1
);
index
=
this
.
indexOf
(
val
);
}
};
$
(
"#fileinput10"
).
change
((
e
)
=>
{
if
(
!
e
.
target
.
files
[
0
])
{
return
}
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
e
.
target
.
files
[
0
]);
$
.
ajax
({
url
:
platformUrl
+
"/platform/basicServices/alOss/upload"
,
//路径是你控制器中上传图片的方法,下面controller里面我会写到
data
:
formData
,
cache
:
false
,
contentType
:
false
,
processData
:
false
,
type
:
'POST'
,
success
:
function
(
res
)
{
console
.
log
(
res
,
'res'
)
let
imgPath
=
'https://img.zhengzai.tv/'
+
res
.
data
.
ossPath
;
$
(
"#iptUrl"
).
val
(
imgPath
);
}
});
})
function
submitHandler
()
{
document
.
getElementById
(
"teamIdArray"
).
value
=
teamIds
.
join
(
","
);
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
smilePrefix
+
"/project/update"
,
$
(
'#form-project-edit'
).
serialize
());
}
}
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/smile/volunteers/project/list.html
View file @
f5dd327b
...
@@ -24,6 +24,11 @@
...
@@ -24,6 +24,11 @@
</div>
</div>
</form>
</form>
</div>
</div>
<div
class=
"btn-group-sm"
id=
"toolbar"
role=
"group"
>
<a
class=
"btn btn-success"
onclick=
"$.operate.add()"
>
<i
class=
"fa fa-plus"
></i>
添加
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table"
></table>
<table
id=
"bootstrap-table"
></table>
</div>
</div>
...
@@ -31,91 +36,60 @@
...
@@ -31,91 +36,60 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
<script
th:inline=
"javascript"
>
var
detailFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performances:detail'
)}]];
var
smilePrefix
=
ctx
+
"smile/volunteers"
;
var
expertFlag
=
[[
$
{@
permission
.
hasPermi
(
'kylin:performances:expert'
)}]];
var
prefix
=
ctx
+
"kylin/performances"
;
$
(
function
()
{
$
(
function
()
{
var
options
=
{
var
options
=
{
url
:
prefix
+
"/list"
,
url
:
smilePrefix
+
"/project/list"
,
detailUrl
:
prefix
+
"/details/{id}"
,
createUrl
:
smilePrefix
+
"/project/add"
,
createUrl
:
prefix
+
"/add"
,
updateUrl
:
smilePrefix
+
"/project/details/{id}"
,
updateUrl
:
prefix
+
"/edit/{id}"
,
removeUrl
:
prefix
+
"/remove"
,
exportUrl
:
prefix
+
"/export"
,
// sortName: "sort",
// sortName: "sort",
modalName
:
"
演出
"
,
modalName
:
"
活动
"
,
orderSc
:
"desc"
,
orderSc
:
"desc"
,
orderItem
:
"created_at"
,
orderItem
:
"created_at"
,
columns
:
[{
columns
:
[{
checkbox
:
true
checkbox
:
true
},
},
{
{
field
:
'title'
,
field
:
'projectId'
,
title
:
'演出名称'
title
:
'活动id'
},
{
field
:
'performancesId'
,
title
:
'演出id'
},
{
field
:
'timeStart'
,
title
:
'开演时间'
},
{
field
:
'totalGeneral'
,
title
:
'供票总量'
},
},
{
{
field
:
'saleGeneral'
,
field
:
'title'
,
title
:
'实销'
title
:
'活动名称'
},
{
field
:
'surplusGeneral'
,
title
:
'余票'
},
},
{
{
field
:
'totalSalePrice'
,
field
:
'img'
,
title
:
'总销售款'
title
:
'封面图'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
imageView
(
value
,
"300"
,
"300"
);
}
},
},
{
{
field
:
'
statusName
'
,
field
:
'
timeStart
'
,
title
:
'
演出状态
'
title
:
'
开始时间
'
},
},
{
{
field
:
'
rejectTxt
'
,
field
:
'
timeEnd
'
,
title
:
'
拒绝理由
'
title
:
'
结束时间
'
},
},
{
{
field
:
'sort'
,
field
:
'createdAt'
,
title
:
'排序'
,
title
:
'创建时间'
sortable
:
true
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
align
:
'center'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
var
actions
=
[];
if
(
row
.
auditStatus
==
0
&&
row
.
fieldAuditStatus
==
0
)
{
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> '
);
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
detailFlag
+
'" href="javascript:void(0)" onclick="$.operate.detailTab(
\'
'
+
row
.
performancesId
+
'
\'
)"><i class="fa fa-edit"></i>管理</a> '
);
}
else
{
actions
.
push
(
'<a class="btn btn-success btn-xs '
+
detailFlag
+
'" href="javascript:void(0)" onclick="$.operate.detailTab(
\'
'
+
row
.
performancesId
+
'
\'
)"><i class="fa fa-edit"></i>查看</a> '
);
}
if
(
row
.
syncDamai
==
1
)
{
actions
.
push
(
'<a class="btn btn-warning btn-xs '
+
expertFlag
+
'" href="javascript:void(0)" onclick="f(
\'
'
+
row
.
performancesId
+
'
\'
)"><i class="fa fa-remove"></i>同步</a>'
);
}
return
actions
.
join
(
''
);
return
actions
.
join
(
''
);
}
}
}]
}]
};
};
$
.
table
.
init
(
options
);
$
.
table
.
init
(
options
);
});
});
function
f
(
id
)
{
$
.
post
(
prefix
+
"/sync/damai"
,
{
performancesId
:
id
},
function
(
res
)
{
alert
(
res
.
msg
)
});
}
</script>
</script>
</body>
</body>
</html>
</html>
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/dto/SmileVPParam.java
View file @
f5dd327b
...
@@ -27,5 +27,5 @@ public class SmileVPParam {
...
@@ -27,5 +27,5 @@ public class SmileVPParam {
@ApiModelProperty
(
value
=
"封面图"
,
example
=
""
)
@ApiModelProperty
(
value
=
"封面图"
,
example
=
""
)
private
String
img
;
private
String
img
;
@ApiModelProperty
(
value
=
"职责组id数组"
,
example
=
""
)
@ApiModelProperty
(
value
=
"职责组id数组"
,
example
=
""
)
private
ArrayList
<
String
>
teamIdArray
;
private
String
teamIdArray
;
}
}
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 @
f5dd327b
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -49,7 +50,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
...
@@ -49,7 +50,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
PageHelper
.
startPage
(
param
.
getPageNum
(),
param
.
getPageSize
());
PageHelper
.
startPage
(
param
.
getPageNum
(),
param
.
getPageSize
());
LambdaQueryWrapper
<
SmileVolunteersProject
>
wrappers
=
Wrappers
.
lambdaQuery
(
SmileVolunteersProject
.
class
);
LambdaQueryWrapper
<
SmileVolunteersProject
>
wrappers
=
Wrappers
.
lambdaQuery
(
SmileVolunteersProject
.
class
);
if
(
param
.
getTitle
()
!=
null
&&
!
param
.
getTitle
().
equals
(
""
))
{
if
(
param
.
getTitle
()
!=
null
&&
!
param
.
getTitle
().
equals
(
""
))
{
wrappers
.
eq
(
SmileVolunteersProject:
:
getTitle
,
param
.
getTitle
());
wrappers
.
like
(
SmileVolunteersProject:
:
getTitle
,
param
.
getTitle
());
}
}
List
<
SmileVolunteersProject
>
data
=
volunteersProjectMapper
.
selectList
(
wrappers
);
List
<
SmileVolunteersProject
>
data
=
volunteersProjectMapper
.
selectList
(
wrappers
);
rspData
.
setCode
(
0
);
rspData
.
setCode
(
0
);
...
@@ -69,7 +70,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
...
@@ -69,7 +70,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
List
<
SmileVolunteersTeam
>
teamList
=
new
ArrayList
<>();
List
<
SmileVolunteersTeam
>
teamList
=
new
ArrayList
<>();
SmileVolunteersProject
data
=
copySmileVolunteersProject
(
param
,
now
,
null
);
SmileVolunteersProject
data
=
copySmileVolunteersProject
(
param
,
now
,
null
);
int
count
=
volunteersProjectMapper
.
insert
(
data
);
int
count
=
volunteersProjectMapper
.
insert
(
data
);
for
(
String
teamId
:
param
.
getTeamIdArray
())
{
for
(
String
teamId
:
param
.
getTeamIdArray
()
.
split
(
","
)
)
{
SmileProjectTeamRelation
smileProjectTeamRelation
=
SmileProjectTeamRelation
.
getNew
();
SmileProjectTeamRelation
smileProjectTeamRelation
=
SmileProjectTeamRelation
.
getNew
();
smileProjectTeamRelation
.
setProjectId
(
param
.
getProjectId
());
smileProjectTeamRelation
.
setProjectId
(
param
.
getProjectId
());
smileProjectTeamRelation
.
setTeamId
(
teamId
);
smileProjectTeamRelation
.
setTeamId
(
teamId
);
...
@@ -103,7 +104,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
...
@@ -103,7 +104,7 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
int
count
=
volunteersProjectMapper
.
update
(
data
,
Wrappers
.
lambdaQuery
(
SmileVolunteersProject
.
class
).
eq
(
SmileVolunteersProject:
:
getProjectId
,
param
.
getProjectId
()));
int
count
=
volunteersProjectMapper
.
update
(
data
,
Wrappers
.
lambdaQuery
(
SmileVolunteersProject
.
class
).
eq
(
SmileVolunteersProject:
:
getProjectId
,
param
.
getProjectId
()));
//删除所有关联关系
//删除所有关联关系
projectTeamRelationMapper
.
delete
(
Wrappers
.
lambdaQuery
(
SmileProjectTeamRelation
.
class
).
eq
(
SmileProjectTeamRelation:
:
getProjectId
,
param
.
getProjectId
()));
projectTeamRelationMapper
.
delete
(
Wrappers
.
lambdaQuery
(
SmileProjectTeamRelation
.
class
).
eq
(
SmileProjectTeamRelation:
:
getProjectId
,
param
.
getProjectId
()));
for
(
String
teamId
:
param
.
getTeamIdArray
())
{
for
(
String
teamId
:
param
.
getTeamIdArray
()
.
split
(
","
)
)
{
SmileProjectTeamRelation
smileProjectTeamRelation
=
SmileProjectTeamRelation
.
getNew
();
SmileProjectTeamRelation
smileProjectTeamRelation
=
SmileProjectTeamRelation
.
getNew
();
smileProjectTeamRelation
.
setProjectId
(
param
.
getProjectId
());
smileProjectTeamRelation
.
setProjectId
(
param
.
getProjectId
());
smileProjectTeamRelation
.
setTeamId
(
teamId
);
smileProjectTeamRelation
.
setTeamId
(
teamId
);
...
@@ -136,12 +137,12 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
...
@@ -136,12 +137,12 @@ public class SmileVolunteersProjectServiceImpl extends ServiceImpl<SmileVoluntee
private
SmileVolunteersProject
copySmileVolunteersProject
(
SmileVPParam
source
,
LocalDateTime
ct
,
LocalDateTime
ut
)
{
private
SmileVolunteersProject
copySmileVolunteersProject
(
SmileVPParam
source
,
LocalDateTime
ct
,
LocalDateTime
ut
)
{
SmileVolunteersProject
smileVolunteersProject
=
SmileVolunteersProject
.
getNew
();
SmileVolunteersProject
smileVolunteersProject
=
SmileVolunteersProject
.
getNew
();
smileVolunteersProject
.
setProjectId
(
source
.
getProjectId
());
smileVolunteersProject
.
setProjectId
(
source
.
getProjectId
());
smileVolunteersProject
.
setTitle
(
s
mileVolunteersProject
.
getTitle
());
smileVolunteersProject
.
setTitle
(
s
ource
.
getTitle
());
smileVolunteersProject
.
setTimeStart
(
LocalDateTime
.
parse
(
source
.
getTimeStart
()
,
DTF_YMD_HMS
));
smileVolunteersProject
.
setTimeStart
(
LocalDateTime
.
parse
(
source
.
getTimeStart
()
+
" 00:00:00"
,
DTF_YMD_HMS
));
smileVolunteersProject
.
setTimeEnd
(
LocalDateTime
.
parse
(
source
.
getTimeEnd
()
,
DTF_YMD_HMS
));
smileVolunteersProject
.
setTimeEnd
(
LocalDateTime
.
parse
(
source
.
getTimeEnd
()
+
" 00:00:00"
,
DTF_YMD_HMS
));
smileVolunteersProject
.
setAddress
(
s
mileVolunteersProject
.
getAddress
());
smileVolunteersProject
.
setAddress
(
s
ource
.
getAddress
());
smileVolunteersProject
.
setIntroduce
(
s
mileVolunteersProject
.
getIntroduce
());
smileVolunteersProject
.
setIntroduce
(
s
ource
.
getIntroduce
());
smileVolunteersProject
.
setImg
(
s
mileVolunteersProject
.
getImg
());
smileVolunteersProject
.
setImg
(
s
ource
.
getImg
());
if
(
ct
!=
null
)
{
if
(
ct
!=
null
)
{
smileVolunteersProject
.
setCreatedAt
(
ct
);
smileVolunteersProject
.
setCreatedAt
(
ct
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-smile/liquidnet-service-smile-impl/docu/db_ln_volunteers.sql
View file @
f5dd327b
...
@@ -5,7 +5,7 @@ CREATE TABLE `smile_volunteers`
...
@@ -5,7 +5,7 @@ CREATE TABLE `smile_volunteers`
`uid`
varchar
(
64
)
DEFAULT
''
COMMENT
'用户id'
,
`uid`
varchar
(
64
)
DEFAULT
''
COMMENT
'用户id'
,
`project_id`
varchar
(
64
)
DEFAULT
''
COMMENT
'活动id'
,
`project_id`
varchar
(
64
)
DEFAULT
''
COMMENT
'活动id'
,
`name`
varchar
(
32
)
DEFAULT
''
COMMENT
'姓名'
,
`name`
varchar
(
32
)
DEFAULT
''
COMMENT
'姓名'
,
`img`
varchar
(
128
)
DEFAULT
''
COMMENT
'头像'
,
`img`
varchar
(
256
)
DEFAULT
''
COMMENT
'头像'
,
`id_card`
varchar
(
32
)
DEFAULT
''
COMMENT
'证件号'
,
`id_card`
varchar
(
32
)
DEFAULT
''
COMMENT
'证件号'
,
`sex`
tinyint
(
2
)
DEFAULT
0
COMMENT
'性别[0-未知|1-男|2-女]'
,
`sex`
tinyint
(
2
)
DEFAULT
0
COMMENT
'性别[0-未知|1-男|2-女]'
,
`status`
tinyint
(
2
)
DEFAULT
0
COMMENT
'状态[0-待审核|1-审核通过|2-审核未通过]'
,
`status`
tinyint
(
2
)
DEFAULT
0
COMMENT
'状态[0-待审核|1-审核通过|2-审核未通过]'
,
...
@@ -40,7 +40,7 @@ CREATE TABLE `smile_volunteers_project`
...
@@ -40,7 +40,7 @@ CREATE TABLE `smile_volunteers_project`
`time_end`
datetime
DEFAULT
NULL
COMMENT
'结束时间'
,
`time_end`
datetime
DEFAULT
NULL
COMMENT
'结束时间'
,
`address`
varchar
(
256
)
DEFAULT
''
COMMENT
'活动地址'
,
`address`
varchar
(
256
)
DEFAULT
''
COMMENT
'活动地址'
,
`introduce`
varchar
(
1028
)
DEFAULT
''
COMMENT
'活动介绍'
,
`introduce`
varchar
(
1028
)
DEFAULT
''
COMMENT
'活动介绍'
,
`img`
varchar
(
64
)
DEFAULT
''
COMMENT
'封面图'
,
`img`
varchar
(
256
)
DEFAULT
''
COMMENT
'封面图'
,
`comment`
varchar
(
255
)
DEFAULT
''
COMMENT
'补充字段'
,
`comment`
varchar
(
255
)
DEFAULT
''
COMMENT
'补充字段'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
...
...
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