Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
643f5cdb
Commit
643f5cdb
authored
Jun 24, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-大屏数据不统计被删除展板数据,PC登录限制
parent
66aa6dd3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
9 deletions
+45
-9
AuditServiceImpl.java
...ava/cn/chnmuseum/party/service/impl/AuditServiceImpl.java
+9
-2
AuditController.java
...va/cn/chnmuseum/party/web/controller/AuditController.java
+3
-0
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+2
-0
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+10
-4
LoginController.java
...va/cn/chnmuseum/party/web/controller/LoginController.java
+9
-1
StatisticController.java
...n/chnmuseum/party/web/controller/StatisticController.java
+8
-0
application-dev.properties
src/main/resources/application-dev.properties
+0
-1
application.properties
src/main/resources/application.properties
+1
-1
TBoardStatisticMapper.xml
src/main/resources/mapper/TBoardStatisticMapper.xml
+3
-0
No files found.
src/main/java/cn/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
643f5cdb
...
...
@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
...
...
@@ -66,6 +67,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
@Resource
private
LearningContentCopyrightOwnerService
learningContentCopyrightOwnerService
;
@Resource
private
LearningContentAssetService
learningContentAssetService
;
@Override
public
Page
<
Audit
>
getUserList
(
Page
<
Audit
>
page
,
TUser
user
)
{
return
page
.
setRecords
(
auditMapper
.
getUserList
(
page
,
user
));
...
...
@@ -342,6 +346,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
* 根据审核操作 填充ExhibitionBoard属性用于更改
*/
@Transactional
public
boolean
fillExhibitionBoardByAudit
(
Audit
audit
)
{
final
String
exhibitionBoardId
=
audit
.
getRefItemId
();
ExhibitionBoard
exhibitionBoard
=
new
ExhibitionBoard
();
...
...
@@ -365,8 +370,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update
=
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
break
;
case
REMOVE:
// 6.2改 getExhibitionBoardCatId改为getExhibitionBoardId
// final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().eq(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardId);
final
LambdaQueryWrapper
<
LearningContentBoard
>
learningContentBoardLambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
exhibitionBoardId
);
final
List
<
LearningContentBoard
>
learningContentBoardList
=
this
.
learningContentBoardService
.
list
(
learningContentBoardLambdaQueryWrapper
);
if
(
learningContentBoardList
!=
null
&&
!
learningContentBoardList
.
isEmpty
())
{
...
...
@@ -384,6 +387,8 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
}
this
.
assetMapper
.
delete
(
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
));
update
=
this
.
exhibitionBoardService
.
removeById
(
exhibitionBoardId
);
// 删除LearningContentAsset表中的记录
this
.
learningContentAssetService
.
remove
(
Wrappers
.<
LearningContentAsset
>
lambdaUpdate
().
eq
(
LearningContentAsset:
:
getBoardId
,
exhibitionBoardId
));
break
;
case
ADD:
this
.
assetMapper
.
update
(
Asset
.
builder
().
published
(
true
).
build
(),
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoardId
));
...
...
@@ -483,6 +488,8 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
this
.
learningContentBoardCatService
.
remove
(
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
learningContentId
));
this
.
learningContentCopyrightOwnerService
.
remove
(
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
learningContentId
));
update
=
this
.
learningContentService
.
removeById
(
learningContentId
);
// 删除LearningContentAsset中的记录
this
.
learningContentAssetService
.
remove
(
Wrappers
.<
LearningContentAsset
>
lambdaUpdate
().
eq
(
LearningContentAsset:
:
getLearningContentId
,
learningContentId
));
break
;
case
ADD:
learningContent
.
setPublished
(
true
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/AuditController.java
View file @
643f5cdb
...
...
@@ -224,6 +224,9 @@ public class AuditController extends BaseController {
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
try
{
Audit
audit
=
auditService
.
selectOne
(
id
,
type
);
if
(
audit
==
null
)
{
audit
=
new
Audit
();
}
resultMap
.
put
(
"resultCode"
,
"200"
);
resultMap
.
put
(
"message"
,
"操作成功"
);
resultMap
.
put
(
"data"
,
audit
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
643f5cdb
...
...
@@ -328,6 +328,7 @@ public class CopyrightOwnerController extends BaseController {
// 版权方有对应展板信息,则不能被删除
LambdaQueryWrapper
<
ExhibitionBoard
>
exhibitionBoardLambdaQueryWrapper1
=
new
LambdaQueryWrapper
<>();
exhibitionBoardLambdaQueryWrapper1
.
eq
(
ExhibitionBoard:
:
getBoardCopyrightOwnerId
,
id
);
exhibitionBoardLambdaQueryWrapper1
.
eq
(
ExhibitionBoard:
:
getDeleted
,
false
);
List
<
ExhibitionBoard
>
list
=
this
.
exhibitionBoardService
.
list
();
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
return
getFailResult
(
"该版权方有关联展板信息,无法删除"
);
...
...
@@ -335,6 +336,7 @@ public class CopyrightOwnerController extends BaseController {
// 版权方有对应视频信息,无法删除
LambdaQueryWrapper
<
VideoContent
>
videoContentLambdaQueryWrapper1
=
new
LambdaQueryWrapper
<>();
videoContentLambdaQueryWrapper1
.
eq
(
VideoContent:
:
getVideoContentCopyrightOwnerId
,
id
);
videoContentLambdaQueryWrapper1
.
eq
(
VideoContent:
:
getDeleted
,
false
);
List
<
VideoContent
>
list1
=
this
.
videoContentService
.
list
(
videoContentLambdaQueryWrapper1
);
if
(
CollectionUtil
.
isNotEmpty
(
list1
))
{
return
getFailResult
(
"该版权方有关联视频信息,无法删除!"
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
643f5cdb
...
...
@@ -245,6 +245,7 @@ public class LearningContentController extends BaseController {
return
getFailResult
(
"单位管理员只能修改所属机构及其子机构的学习内容"
);
}
}
// 学习内容下显示的参考信息被修改
LambdaQueryWrapper
<
LearningContentAsset
>
lambdaQuery
=
Wrappers
.
lambdaQuery
();
lambdaQuery
.
eq
(
LearningContentAsset:
:
getLearningContentId
,
one
.
getId
());
...
...
@@ -253,10 +254,10 @@ public class LearningContentController extends BaseController {
if
(!
ListUtil
.
compareValue
(
list
,
learningContent
.
getFileList
()))
{
LambdaUpdateWrapper
<
LearningContentAsset
>
updateWrapper
=
Wrappers
.
lambdaUpdate
();
updateWrapper
.
eq
(
LearningContentAsset:
:
getLearningContentId
,
one
.
getId
());
boolean
remove
=
this
.
learningContentAssetService
.
remove
(
updateWrapper
);
if
(!
remove
)
{
return
getFailResult
(
"更新数据失败!"
);
}
// 删除原有信息
this
.
learningContentAssetService
.
remove
(
updateWrapper
);
// 新增
List
<
String
>
fileList
=
learningContent
.
getFileList
();
if
(!
CollectionUtils
.
isEmpty
(
fileList
))
{
LambdaQueryWrapper
<
Asset
>
queryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
in
(
Asset:
:
getId
,
fileList
);
...
...
@@ -563,6 +564,11 @@ public class LearningContentController extends BaseController {
}
learningContent
.
setExhibitionBoardList
(
exhibitionBoardList
);
}
// 查询该学习内容下哪些展板参考资料在app展示
LambdaQueryWrapper
<
LearningContentAsset
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentAsset
>
lambdaQuery
().
eq
(
LearningContentAsset:
:
getLearningContentId
,
id
);
lambdaQueryWrapper
.
select
(
LearningContentAsset:
:
getAssetId
);
List
<
String
>
list
=
this
.
learningContentAssetService
.
listObjs
(
lambdaQueryWrapper
,
Object:
:
toString
);
learningContent
.
setFileList
(
list
);
final
LambdaQueryWrapper
<
Audit
>
auditQueryWrapper
=
Wrappers
.<
Audit
>
lambdaQuery
().
eq
(
Audit:
:
getRefItemId
,
id
);
final
List
<
Audit
>
auditList
=
this
.
auditService
.
list
(
auditQueryWrapper
);
...
...
src/main/java/cn/chnmuseum/party/web/controller/LoginController.java
View file @
643f5cdb
...
...
@@ -185,7 +185,7 @@ public class LoginController extends BaseController {
}
List
<
Role
>
roles
=
roleService
.
selectRoleByUserId
(
user
.
getId
());
// 该参数判断登录请求:1是大屏,2是h5
// 该参数判断登录请求:1是大屏,2是h5
,改参数为空是PC
String
administrator
=
request
.
getParameter
(
"administrator"
);
List
<
String
>
roleAliasList
=
roles
.
stream
().
map
(
Role:
:
getAlias
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotBlank
(
administrator
)
&&
"1"
.
equals
(
administrator
))
{
...
...
@@ -202,6 +202,14 @@ public class LoginController extends BaseController {
return
resultMap
;
}
}
// PC
if
(
StringUtils
.
isEmpty
(
administrator
))
{
if
(
"3"
.
equals
(
user
.
getType
())
||
"4"
.
equals
(
user
.
getType
()))
{
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"您登录的账号是机顶盒账号或运维账号,不能使用PC的功能"
);
return
resultMap
;
}
}
List
<
String
>
list1
=
new
ArrayList
<>();
//获取当前用户角色拥有菜单
...
...
src/main/java/cn/chnmuseum/party/web/controller/StatisticController.java
View file @
643f5cdb
package
cn
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.chnmuseum.party.common.util.AddressUtil
;
import
cn.chnmuseum.party.common.util.DateUtil
;
import
cn.chnmuseum.party.model.Menu
;
import
cn.chnmuseum.party.model.Role
;
import
cn.chnmuseum.party.model.TVideoVisitor
;
import
cn.chnmuseum.party.service.TVideoVisitorService
;
import
cn.chnmuseum.party.vo.StatisticData
;
import
cn.hutool.core.date.DateBetween
;
import
cn.hutool.core.date.format.FastDateFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -68,6 +71,11 @@ public class StatisticController extends BaseController {
@GetMapping
(
"/recordVisitor"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
value
=
"videoId"
,
name
=
"视频id"
),
@ApiImplicitParam
(
value
=
"ip"
,
name
=
"使用者ip地址"
)
}
)
@ApiOperation
(
value
=
"记录视频访问者的城市"
,
notes
=
"记录视频访问者的城市"
)
public
Map
recordVisitor
(
String
videoId
,
String
ip
){
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
...
...
src/main/resources/application-dev.properties
View file @
643f5cdb
...
...
@@ -43,7 +43,6 @@ spring.datasource.druid.test-while-idle=true
spring.datasource.druid.time-between-eviction-runs-millis
=
60000
spring.datasource.druid.url
=
jdbc:mysql://192.168.110.93:3306/chnmuseum-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
#spring.datasource.druid.url=jdbc:mysql://10.18.121.26:3306/chnmuseum-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.druid.username
=
root
spring.datasource.druid.password
=
password
spring.datasource.druid.validation-query
=
SELECT 1 FROM DUAL
...
...
src/main/resources/application.properties
View file @
643f5cdb
...
...
@@ -35,7 +35,7 @@ fdfs.tracker-list[0]=192.168.110.85:22122
dfsFileAccessBasePath
=
http://111.203.232.175:8085
prefixPat
=
/data/fastdfs/data
IMAGE_BASE_URL
=
http://111.203.232.175:8085/
#
#fdfs.tracker-list[0]=10.18.121.26:22122
#dfsFileAccessBasePath=http://101.96.131.110:9999
...
...
src/main/resources/mapper/TBoardStatisticMapper.xml
View file @
643f5cdb
...
...
@@ -178,6 +178,7 @@
SELECT sum(s.play_number) play_number
from t_board_statistic s
left join t_organ o on o.id = s.organ_id
left join exhibition_board e on e.id = s.board_id and e.is_deleted = 0
<where>
<if
test=
"statisticDate != null and statisticDate.length() == 4"
>
and left(s.play_date,4) = ${statisticDate}
...
...
@@ -215,6 +216,7 @@
( SELECT s.board_id
FROM t_board_statistic s
left join t_organ o on o.id = s.organ_id
left join exhibition_board e on e.id = s.board_id and e.is_deleted = 0
<where>
<if
test=
"statisticDate != null and statisticDate.length() == 4"
>
left(s.play_date,4) = ${statisticDate}
...
...
@@ -275,6 +277,7 @@
<select
id=
"getInteractionTotal"
resultType=
"java.lang.Integer"
>
select count(i.id) from t_interaction i
left join t_organ o on o.id = i.organ_id
left join exhibition_board e on e.id = i.board_id and e.is_deleted = 0
<where>
<if
test=
"statisticDate != null and statisticDate.length() == 4"
>
DATE_FORMAT(i.create_time,'%Y') = ${statisticDate}
...
...
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