Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
2e53c8a0
Commit
2e53c8a0
authored
Jun 15, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-项目主内容在审批前还能够修改项目
parent
1cb4be95
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
20 deletions
+29
-20
LearningProject.java
src/main/java/cn/chnmuseum/party/model/LearningProject.java
+4
-0
TVideoVisitor.java
src/main/java/cn/chnmuseum/party/model/TVideoVisitor.java
+0
-4
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+1
-2
LearningProjectController.java
...useum/party/web/controller/LearningProjectController.java
+24
-11
StatisticController.java
...n/chnmuseum/party/web/controller/StatisticController.java
+0
-3
No files found.
src/main/java/cn/chnmuseum/party/model/LearningProject.java
View file @
2e53c8a0
...
@@ -100,4 +100,8 @@ public class LearningProject implements Serializable {
...
@@ -100,4 +100,8 @@ public class LearningProject implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
LearningContent
majorLearning
;
private
LearningContent
majorLearning
;
@ApiModelProperty
(
"项目的主学习内容的审核状态|"
)
@TableField
(
exist
=
false
)
private
String
auditStatus
;
}
}
src/main/java/cn/chnmuseum/party/model/TVideoVisitor.java
View file @
2e53c8a0
...
@@ -37,10 +37,6 @@ public class TVideoVisitor implements Serializable {
...
@@ -37,10 +37,6 @@ public class TVideoVisitor implements Serializable {
@TableField
(
"video_id"
)
@TableField
(
"video_id"
)
private
String
videoId
;
private
String
videoId
;
@ApiModelProperty
(
value
=
"area"
,
name
=
"地区"
)
@TableField
(
"area"
)
private
String
area
;
@ApiModelProperty
(
value
=
"area"
,
name
=
"地区编码"
)
@ApiModelProperty
(
value
=
"area"
,
name
=
"地区编码"
)
@TableField
(
"area_code"
)
@TableField
(
"area_code"
)
private
String
areaCode
;
private
String
areaCode
;
...
...
src/main/java/cn/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
2e53c8a0
...
@@ -236,7 +236,7 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -236,7 +236,7 @@ public class ExhibitionBoardController extends BaseController {
@ApiOperation
(
value
=
"根据学习项目获取展板全部列表(无分页)"
,
notes
=
"根据学习项目获取展板全部列表(无分页)"
)
@ApiOperation
(
value
=
"根据学习项目获取展板全部列表(无分页)"
,
notes
=
"根据学习项目获取展板全部列表(无分页)"
)
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
SELECT
)
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
SELECT
)
public
Map
<
String
,
Object
>
getExhibitionBoardList
(
String
learningProjectId
,
@RequestParam
(
value
=
"exhibitionBoardCatIdList"
)
List
<
String
>
boardCatIds
)
{
public
Map
<
String
,
Object
>
getExhibitionBoardList
(
String
learningProjectId
,
@RequestParam
(
value
=
"exhibitionBoardCatIdList"
)
List
<
String
>
boardCatIds
)
{
if
(
StringUtils
.
is
Blank
(
learningProjectId
))
{
if
(
StringUtils
.
is
Empty
(
learningProjectId
))
{
return
getFailResult
(
"学习项目不能为空!"
);
return
getFailResult
(
"学习项目不能为空!"
);
}
}
if
(
CollectionUtils
.
isEmpty
(
boardCatIds
))
{
if
(
CollectionUtils
.
isEmpty
(
boardCatIds
))
{
...
@@ -582,7 +582,6 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -582,7 +582,6 @@ public class ExhibitionBoardController extends BaseController {
}
}
}
}
}
}
}
}
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
id
);
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
id
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/LearningProjectController.java
View file @
2e53c8a0
...
@@ -28,6 +28,7 @@ import org.springframework.validation.annotation.Validated;
...
@@ -28,6 +28,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -113,7 +114,7 @@ public class LearningProjectController extends BaseController {
...
@@ -113,7 +114,7 @@ public class LearningProjectController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
// 查询项目的主学习内容
// 查询项目的主学习内容
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
Wrappers
.
<
LearningContent
>
lambdaQuery
();
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
queryWrapper
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
queryWrapper
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
queryWrapper
.
eq
(
LearningContent:
:
getIsMajor
,
true
);
queryWrapper
.
eq
(
LearningContent:
:
getIsMajor
,
true
);
LearningContent
one
=
this
.
learningContentService
.
getOne
(
queryWrapper
);
LearningContent
one
=
this
.
learningContentService
.
getOne
(
queryWrapper
);
...
@@ -121,14 +122,14 @@ public class LearningProjectController extends BaseController {
...
@@ -121,14 +122,14 @@ public class LearningProjectController extends BaseController {
return
getFailResult
(
"该学习项目下没有主学习内容"
);
return
getFailResult
(
"该学习项目下没有主学习内容"
);
}
}
// 查询该学习项目的子学习内容版权方、展板分类、展板
// 查询该学习项目的子学习内容版权方、展板分类、展板
LambdaQueryWrapper
<
LearningContent
>
lambdaQueryWrapper
=
Wrappers
.
<
LearningContent
>
lambdaQuery
();
LambdaQueryWrapper
<
LearningContent
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
lambdaQueryWrapper
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
lambdaQueryWrapper
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
lambdaQueryWrapper
.
eq
(
LearningContent:
:
getIsMajor
,
false
);
//
lambdaQueryWrapper.eq(LearningContent::getIsMajor, false);
lambdaQueryWrapper
.
select
(
LearningContent:
:
getId
);
lambdaQueryWrapper
.
select
(
LearningContent:
:
getId
);
List
<
String
>
list
=
this
.
learningContentService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
List
<
String
>
list
=
this
.
learningContentService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
// 查询子学习内容的版权方
// 查询子学习内容的版权方
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
query
=
Wrappers
.
<
LearningContentCopyrightOwner
>
lambdaQuery
();
LambdaQueryWrapper
<
LearningContentCopyrightOwner
>
query
=
Wrappers
.
lambdaQuery
();
query
.
in
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
list
);
query
.
in
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
list
);
query
.
select
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
);
query
.
select
(
LearningContentCopyrightOwner:
:
getCopyrightOwnerId
);
List
<
String
>
list1
=
this
.
learningContentCopyrightOwnerService
.
listObjs
(
query
,
Object:
:
toString
);
List
<
String
>
list1
=
this
.
learningContentCopyrightOwnerService
.
listObjs
(
query
,
Object:
:
toString
);
...
@@ -150,7 +151,7 @@ public class LearningProjectController extends BaseController {
...
@@ -150,7 +151,7 @@ public class LearningProjectController extends BaseController {
}
}
// 查询子学习内容的展板分类
// 查询子学习内容的展板分类
LambdaQueryWrapper
<
LearningContentBoardCat
>
query1
=
Wrappers
.
<
LearningContentBoardCat
>
lambdaQuery
();
LambdaQueryWrapper
<
LearningContentBoardCat
>
query1
=
Wrappers
.
lambdaQuery
();
query1
.
in
(
LearningContentBoardCat:
:
getLearningContentId
,
list
);
query1
.
in
(
LearningContentBoardCat:
:
getLearningContentId
,
list
);
query1
.
select
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
);
query1
.
select
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
);
List
<
String
>
list2
=
this
.
learningContentBoardCatService
.
listObjs
(
query1
,
Object:
:
toString
);
List
<
String
>
list2
=
this
.
learningContentBoardCatService
.
listObjs
(
query1
,
Object:
:
toString
);
...
@@ -173,7 +174,7 @@ public class LearningProjectController extends BaseController {
...
@@ -173,7 +174,7 @@ public class LearningProjectController extends BaseController {
}
}
// 查询子学习内容的展板
// 查询子学习内容的展板
LambdaQueryWrapper
<
LearningContentBoard
>
query2
=
Wrappers
.
<
LearningContentBoard
>
lambdaQuery
();
LambdaQueryWrapper
<
LearningContentBoard
>
query2
=
Wrappers
.
lambdaQuery
();
query2
.
in
(
LearningContentBoard:
:
getLearningContentId
,
list
);
query2
.
in
(
LearningContentBoard:
:
getLearningContentId
,
list
);
query2
.
select
(
LearningContentBoard:
:
getExhibitionBoardId
);
query2
.
select
(
LearningContentBoard:
:
getExhibitionBoardId
);
List
<
String
>
list3
=
this
.
learningContentBoardService
.
listObjs
(
query2
,
Object:
:
toString
);
List
<
String
>
list3
=
this
.
learningContentBoardService
.
listObjs
(
query2
,
Object:
:
toString
);
...
@@ -182,7 +183,11 @@ public class LearningProjectController extends BaseController {
...
@@ -182,7 +183,11 @@ public class LearningProjectController extends BaseController {
// 差集
// 差集
list3
.
removeAll
(
learningProject
.
getExhibitionBoardIdList
());
list3
.
removeAll
(
learningProject
.
getExhibitionBoardIdList
());
// 查询被删除的展板信息
// 查询被删除的展板信息
List
<
ExhibitionBoard
>
exhibitionBoards
=
this
.
exhibitionBoardService
.
listByIds
(
list3
);
LambdaQueryWrapper
<
ExhibitionBoard
>
lambdaQuery
=
Wrappers
.
lambdaQuery
();
lambdaQuery
.
eq
(
ExhibitionBoard:
:
getPublished
,
true
);
lambdaQuery
.
in
(
ExhibitionBoard:
:
getId
,
list3
);
List
<
ExhibitionBoard
>
exhibitionBoards
=
this
.
exhibitionBoardService
.
list
(
lambdaQuery
);
// 被删除的展板名称
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
exhibitionBoards
.
forEach
(
s
->
{
exhibitionBoards
.
forEach
(
s
->
{
stringBuilder
.
append
(
s
.
getName
());
stringBuilder
.
append
(
s
.
getName
());
...
@@ -202,8 +207,8 @@ public class LearningProjectController extends BaseController {
...
@@ -202,8 +207,8 @@ public class LearningProjectController extends BaseController {
.
cover
(
learningProject
.
getCover
())
.
cover
(
learningProject
.
getCover
())
.
exhibitionBoardCatIdList
(
learningProject
.
getExhibitionBoardCatIdList
())
.
exhibitionBoardCatIdList
(
learningProject
.
getExhibitionBoardCatIdList
())
.
exhibitionBoardIdList
(
learningProject
.
getExhibitionBoardIdList
()).
build
();
.
exhibitionBoardIdList
(
learningProject
.
getExhibitionBoardIdList
()).
build
();
this
.
learningContentController
.
updateLearningContent
(
learningContent
);
Map
<
String
,
Object
>
map
=
this
.
learningContentController
.
updateLearningContent
(
learningContent
);
return
getSuccessResult
()
;
return
map
;
}
}
@GetMapping
(
"/getList"
)
@GetMapping
(
"/getList"
)
...
@@ -247,11 +252,19 @@ public class LearningProjectController extends BaseController {
...
@@ -247,11 +252,19 @@ public class LearningProjectController extends BaseController {
LearningProject:
:
getCreateTime
,
LearningProject:
:
getCreateTime
,
LearningProject:
:
getUpdateTime
);
LearningProject:
:
getUpdateTime
);
Page
<
LearningProject
>
page
=
this
.
learningProjectService
.
page
(
getPage
(),
queryWrapper
);
Page
<
LearningProject
>
page
=
this
.
learningProjectService
.
page
(
getPage
(),
queryWrapper
);
for
(
LearningProject
learningProject
:
page
.
getRecords
())
{
for
(
LearningProject
learningProject
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
LearningContent
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContent
>
lambdaQuery
()
LambdaQueryWrapper
<
LearningContent
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContent
>
lambdaQuery
()
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
.
eq
(
LearningContent:
:
getLearningProjectId
,
learningProject
.
getId
());
lambdaQueryWrapper
.
select
(
LearningContent:
:
getName
);
List
<
LearningContent
>
learningContentList
=
this
.
learningContentService
.
list
(
lambdaQueryWrapper
);
List
<
String
>
learningContentNameList
=
this
.
learningContentService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
List
<
String
>
learningContentNameList
=
new
ArrayList
<>();
learningContentList
.
forEach
(
s
->{
if
(
s
.
getIsMajor
())
{
learningProject
.
setAuditStatus
(
s
.
getAuditStatus
());
}
else
{
learningContentNameList
.
add
(
s
.
getName
());
}
});
learningProject
.
setLearningContentNames
(
String
.
join
(
"、"
,
learningContentNameList
));
learningProject
.
setLearningContentNames
(
String
.
join
(
"、"
,
learningContentNameList
));
}
}
return
getResult
(
page
);
return
getResult
(
page
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/StatisticController.java
View file @
2e53c8a0
...
@@ -88,13 +88,10 @@ public class StatisticController extends BaseController {
...
@@ -88,13 +88,10 @@ public class StatisticController extends BaseController {
Map
<
String
,
String
>
addressByIp
=
AddressUtil
.
getAddressByIp
(
ipAddress
);
Map
<
String
,
String
>
addressByIp
=
AddressUtil
.
getAddressByIp
(
ipAddress
);
if
(
StringUtils
.
isNotBlank
(
addressByIp
.
get
(
"region"
)))
{
if
(
StringUtils
.
isNotBlank
(
addressByIp
.
get
(
"region"
)))
{
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"regionCode"
));
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"regionCode"
));
tVideoVisitor
.
setArea
(
addressByIp
.
get
(
"region"
));
}
else
if
(
StringUtils
.
isNotBlank
(
addressByIp
.
get
(
"city"
))){
}
else
if
(
StringUtils
.
isNotBlank
(
addressByIp
.
get
(
"city"
))){
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"cityCode"
));
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"cityCode"
));
tVideoVisitor
.
setArea
(
addressByIp
.
get
(
"city"
));
}
else
{
}
else
{
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"proCode"
));
tVideoVisitor
.
setAreaCode
(
addressByIp
.
get
(
"proCode"
));
tVideoVisitor
.
setArea
(
addressByIp
.
get
(
"pro"
));
}
}
// 该条信息的创建时间和更新时间
// 该条信息的创建时间和更新时间
...
...
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