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
0a98c7a5
Commit
0a98c7a5
authored
Apr 02, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
bae61124
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
LearningContentBoardMapper.java
...gy/chnmuseum/party/mapper/LearningContentBoardMapper.java
+9
-6
Asset.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
+1
-2
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+6
-4
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/mapper/LearningContentBoardMapper.java
View file @
0a98c7a5
...
@@ -32,24 +32,27 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
...
@@ -32,24 +32,27 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
IPage
<
ExhibitionBoard
>
selectBoardPageByLearningContentId
(
Page
<?>
page
,
String
learningContentId
,
String
nameOrCode
);
IPage
<
ExhibitionBoard
>
selectBoardPageByLearningContentId
(
Page
<?>
page
,
String
learningContentId
,
String
nameOrCode
);
@Select
(
"<script>"
@Select
(
"<script>"
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a "
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb,
video_content vc,
asset a "
+
"WHERE lcb.learning_content_id = lc.id "
+
"WHERE lcb.learning_content_id = lc.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.asset_id = a.id "
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
+
"and lc.applicable_scope = 'THIS_ORGAN' "
+
"and lc.organ_code = #{organCode} "
+
"and lc.organ_code = #{organCode} "
+
"UNION "
+
"UNION "
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a "
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb,
video_content vc,
asset a "
+
"WHERE lcb.learning_content_id = lc.id "
+
"WHERE lcb.learning_content_id = lc.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.asset_id = a.id "
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB'"
+
"and lc.applicable_scope = 'THIS_ORGAN_SUB'"
+
"and lc.organ_code like CONCAT(#{organCode},'%') "
+
"and lc.organ_code like CONCAT(#{organCode},'%') "
+
"UNION "
+
"UNION "
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a "
+
"SELECT a.* FROM learning_content_board lcb, learning_content lc, exhibition_board eb,
video_content vc,
asset a "
+
"WHERE lcb.learning_content_id = lc.id "
+
"WHERE lcb.learning_content_id = lc.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and lcb.exhibition_board_id = eb.id "
+
"and eb.asset_id = a.id "
+
"and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id "
+
"and lc.applicable_scope = 'ALL_PLAT'"
+
"and lc.applicable_scope = 'ALL_PLAT'"
+
"</script>"
+
"</script>"
)
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
View file @
0a98c7a5
...
@@ -78,8 +78,7 @@ public class Asset implements Serializable {
...
@@ -78,8 +78,7 @@ public class Asset implements Serializable {
@ApiModelProperty
(
"是否已删除"
)
@ApiModelProperty
(
"是否已删除"
)
@TableField
(
"is_deleted"
)
@TableField
(
"is_deleted"
)
private
Boolean
isDeleted
;
private
Boolean
deleted
;
@ApiModelProperty
(
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
0a98c7a5
...
@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller;
...
@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService
;
import
cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService
;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileCatEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
...
@@ -361,7 +360,8 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -361,7 +360,8 @@ public class ChinaMobileRestApiController extends BaseController {
String
name
=
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoard
.
getExhibitionBoardCatId
()).
getName
();
String
name
=
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoard
.
getExhibitionBoardCatId
()).
getName
();
exhibitionBoard
.
setExhibitionBoardCatName
(
name
);
exhibitionBoard
.
setExhibitionBoardCatName
(
name
);
}
}
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getVideoContentId
()).
eq
(
Asset:
:
getFileType
,
FileTypeEnum
.
VIDEO
.
name
());
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getVideoContentId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_VIDEO
);
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
List
<
Asset
>
videoList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
exhibitionBoard
.
setVideoList
(
videoList
);
exhibitionBoard
.
setVideoList
(
videoList
);
}
}
...
@@ -518,16 +518,18 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -518,16 +518,18 @@ public class ChinaMobileRestApiController extends BaseController {
}
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"boardId"
,
value
=
"展板内容ID"
,
paramType
=
"path"
,
dataType
=
"String"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"boardId"
,
value
=
"展板内容ID"
,
paramType
=
"path"
,
dataType
=
"String"
,
required
=
true
)
})
})
@GetMapping
(
"/exhibitionBoard/getRefMaterial/{boardId}"
)
@GetMapping
(
"/exhibitionBoard/getRefMaterial/{boardId}"
)
@RequiresPermissions
(
"learning:project:page"
)
@RequiresPermissions
(
"learning:project:page"
)
@ApiOperation
(
value
=
"展板参考资料
查询"
,
notes
=
"展板参考资料
查询"
)
@ApiOperation
(
value
=
"展板参考资料
分页查询"
,
notes
=
"展板参考资料分页
查询"
)
public
Map
<
String
,
Object
>
getBoardRefMaterial
(
@PathVariable
(
value
=
"boardId"
)
String
boardId
)
{
public
Map
<
String
,
Object
>
getBoardRefMaterial
(
@PathVariable
(
value
=
"boardId"
)
String
boardId
)
{
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
boardId
);
final
ExhibitionBoard
exhibitionBoard
=
this
.
exhibitionBoardService
.
getById
(
boardId
);
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
final
LambdaQueryWrapper
<
Asset
>
assetQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getRefItemId
,
exhibitionBoard
.
getId
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
assetQueryWrapper
.
eq
(
Asset:
:
getFileCat
,
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
final
List
<
Asset
>
datumList
=
this
.
assetService
.
list
(
assetQueryWrapper
);
final
Page
<
Asset
>
datumList
=
this
.
assetService
.
page
(
this
.
getPage
(),
assetQueryWrapper
);
return
getResult
(
datumList
);
return
getResult
(
datumList
);
}
}
...
...
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