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
6c8ba60d
Commit
6c8ba60d
authored
Mar 29, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
dc74d79a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
48 deletions
+61
-48
AssetController.java
...nergy/chnmuseum/party/web/controller/AssetController.java
+20
-5
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+39
-41
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+2
-2
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetController.java
View file @
6c8ba60d
...
...
@@ -22,7 +22,6 @@ import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.parser.Feature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.tobato.fastdfs.domain.fdfs.MetaData
;
import
io.swagger.annotations.Api
;
...
...
@@ -191,10 +190,25 @@ public class AssetController extends BaseController {
@RequiresPermissions
(
"asset:list"
)
@ApiOperation
(
value
=
"获取视频全部列表(无分页)"
,
notes
=
"获取视频全部列表(无分页)"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"auditStatus"
,
value
=
"审核状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"auditStatus"
,
value
=
"审核状态"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"assetTypeId"
,
value
=
"视频分类ID"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"assetCopyrightOwnerId"
,
value
=
"视频版权方ID"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
getAssetList
(
@RequestParam
(
value
=
"auditStatus"
,
defaultValue
=
"APPROVED_FINAL"
,
required
=
false
)
AuditStatusEnum
auditStatus
)
{
List
<
Asset
>
assetList
=
assetService
.
list
(
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getAuditStatus
,
auditStatus
.
name
()).
eq
(
Asset:
:
getPublished
,
true
));
public
Map
<
String
,
Object
>
getAssetList
(
@RequestParam
(
value
=
"auditStatus"
,
required
=
false
)
AuditStatusEnum
auditStatus
,
@RequestParam
(
value
=
"assetTypeId"
,
required
=
false
)
String
assetTypeId
,
@RequestParam
(
value
=
"assetCopyrightOwnerId"
,
required
=
false
)
String
assetCopyrightOwnerId
)
{
final
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
//lambdaQueryWrapper.eq(Asset::getPublished, true);
if
(
auditStatus
!=
null
)
{
lambdaQueryWrapper
.
eq
(
Asset:
:
getAuditStatus
,
auditStatus
.
name
());
}
if
(
StringUtils
.
isNotBlank
(
assetTypeId
))
{
lambdaQueryWrapper
.
eq
(
Asset:
:
getAssetTypeId
,
assetTypeId
);
}
if
(
StringUtils
.
isNotBlank
(
assetCopyrightOwnerId
))
{
lambdaQueryWrapper
.
eq
(
Asset:
:
getAssetCopyrightOwnerId
,
assetCopyrightOwnerId
);
}
List
<
Asset
>
assetList
=
assetService
.
list
(
lambdaQueryWrapper
);
return
getResult
(
assetList
);
}
...
...
@@ -277,7 +291,8 @@ public class AssetController extends BaseController {
}
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{},
Feature
.
OrderedField
);
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
},
Feature
.
OrderedField
);
asset
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
return
getResult
(
asset
);
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
6c8ba60d
...
...
@@ -475,7 +475,6 @@ public class ChinaMobileRestApiController extends BaseController {
@RequiresPermissions
(
"t:board:statistic:statisticBoardInfo"
)
@ApiOperation
(
value
=
"播放记录信息反馈"
,
notes
=
"播放记录信息反馈"
)
public
Map
<
String
,
Object
>
boardStatisticInfo
(
@Validated
(
value
=
{
Add
.
class
})
TBoardStatistic
tBoardStatistic
)
{
// 展板信息统计
try
{
Object
result
=
tBoardStatisticService
.
boardStatisticInfo
(
tBoardStatistic
,
false
);
...
...
@@ -485,12 +484,50 @@ public class ChinaMobileRestApiController extends BaseController {
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// 保存失败
return
getFailResult
();
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/learningContent/getPage"
)
@RequiresPermissions
(
"learning:content:page"
)
@ApiOperation
(
value
=
"获取学习内容分页列表"
,
notes
=
"获取学习内容分页列表"
)
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
LearningContent:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
LearningContent:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
LearningContent:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
LearningContent:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
LearningContent:
:
getId
,
LearningContent:
:
getName
,
LearningContent:
:
getAuditStatus
,
LearningContent:
:
getCreateTime
,
LearningContent:
:
getUpdateTime
);
Page
<
LearningContent
>
page
=
this
.
learningContentService
.
page
(
getPage
(),
queryWrapper
);
for
(
LearningContent
learningContent
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
LearningContentBoard
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContent
.
getId
());
int
exhibitionBoardCount
=
this
.
learningContentBoardService
.
count
(
lambdaQueryWrapper
);
learningContent
.
setExhibitionBoardCount
(
exhibitionBoardCount
);
}
return
getResult
(
page
);
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
...
...
@@ -534,43 +571,4 @@ public class ChinaMobileRestApiController extends BaseController {
return
getResult
(
page
);
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/learningContent/getPageList"
)
@RequiresPermissions
(
"learning:content:page"
)
@ApiOperation
(
value
=
"获取学习内容分页列表"
,
notes
=
"获取学习内容分页列表"
)
public
Map
<
String
,
Object
>
getLearningContentPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
LearningContent:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
LearningContent:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
LearningContent:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
LearningContent:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
LearningContent:
:
getId
,
LearningContent:
:
getName
,
LearningContent:
:
getAuditStatus
,
LearningContent:
:
getCreateTime
,
LearningContent:
:
getUpdateTime
);
Page
<
LearningContent
>
page
=
this
.
learningContentService
.
page
(
getPage
(),
queryWrapper
);
for
(
LearningContent
learningContent
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
LearningContentBoard
>
lambdaQueryWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaQuery
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContent
.
getId
());
int
exhibitionBoardCount
=
this
.
learningContentBoardService
.
count
(
lambdaQueryWrapper
);
learningContent
.
setExhibitionBoardCount
(
exhibitionBoardCount
);
}
return
getResult
(
page
);
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
6c8ba60d
...
...
@@ -86,7 +86,7 @@ public class ExhibitionBoardCatController extends BaseController {
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
updateStatus
(
@NotNull
(
message
=
"展板分类ID不能为空"
)
@PathVariable
(
"id"
)
String
id
,
@RequestParam
(
"
s
tatus"
)
AuditStatusEnum
status
)
{
public
Map
<
String
,
Object
>
updateStatus
(
@NotNull
(
message
=
"展板分类ID不能为空"
)
@PathVariable
(
"id"
)
String
id
,
@RequestParam
(
"
auditS
tatus"
)
AuditStatusEnum
status
)
{
UpdateWrapper
<
ExhibitionBoardCat
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"id"
,
id
);
updateWrapper
.
eq
(
"audit_status"
,
status
.
name
());
...
...
@@ -110,7 +110,7 @@ public class ExhibitionBoardCatController extends BaseController {
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"exhibition:board:cat:list"
)
@ApiOperation
(
value
=
"获取展板分类全部列表(无分页)"
,
notes
=
"获取展板分类全部列表(无分页)"
)
public
Map
<
String
,
Object
>
getExhibitionBoardCatList
(
@RequestParam
(
value
=
"auditStatus"
,
defaultValue
=
"APPROVED"
,
required
=
false
)
AuditStatusEnum
auditStatus
)
{
public
Map
<
String
,
Object
>
getExhibitionBoardCatList
(
@RequestParam
(
value
=
"auditStatus"
,
required
=
false
)
AuditStatusEnum
auditStatus
)
{
List
<
ExhibitionBoardCat
>
exhibitionBoardCatList
=
exhibitionBoardCatService
.
list
();
return
getResult
(
exhibitionBoardCatList
);
}
...
...
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