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
91d8305c
Commit
91d8305c
authored
3 years ago
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app需求变动
parent
f3d0ef45
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
142 additions
and
72 deletions
+142
-72
ExhibitionBoardMapper.java
...java/cn/chnmuseum/party/mapper/ExhibitionBoardMapper.java
+2
-0
LearningContentBoardMapper.java
...cn/chnmuseum/party/mapper/LearningContentBoardMapper.java
+21
-1
ExhibitionBoardService.java
...va/cn/chnmuseum/party/service/ExhibitionBoardService.java
+3
-0
ExhibitionBoardServiceImpl.java
...museum/party/service/impl/ExhibitionBoardServiceImpl.java
+7
-0
LearningContentBoardServiceImpl.java
...m/party/service/impl/LearningContentBoardServiceImpl.java
+5
-1
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+92
-67
ExhibitionBoardMapper.xml
src/main/resources/mapper/ExhibitionBoardMapper.xml
+12
-3
No files found.
src/main/java/cn/chnmuseum/party/mapper/ExhibitionBoardMapper.java
View file @
91d8305c
...
...
@@ -17,4 +17,6 @@ import java.util.List;
public
interface
ExhibitionBoardMapper
extends
BaseMapper
<
ExhibitionBoard
>
{
List
<
ExhibitionBoard
>
getList
(
@Param
(
"learningProjectId"
)
String
learningProjectId
,
@Param
(
"isPublished"
)
boolean
isPublished
);
List
<
ExhibitionBoard
>
getByContentList
(
@Param
(
"learningContentId"
)
String
learningContentId
,
@Param
(
"isPublished"
)
boolean
isPublished
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/mapper/LearningContentBoardMapper.java
View file @
91d8305c
...
...
@@ -122,7 +122,7 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
@Select
(
"<script>"
+
"SELECT eb.* FROM learning_project p,learning_content lc,learning_content_board lcb, exhibition_board eb "
+
"WHERE lcb.exhibition_board_id = eb.id and p.id = lc.learning_project_id and lc.id = lcb.learning_content_id "
+
"and eb.is_published = 1 and eb.is_deleted = 0 and lc.is_deleted = 0 and lc.is_published = 1"
+
"and eb.is_published = 1 and eb.is_deleted = 0 and lc.is_deleted = 0 and lc.is_published = 1
and lc.is_major = 1
"
+
"<if test='learningProjectId != null'>and p.id = #{learningProjectId} </if>"
+
"<if test='nameOrCode != null'>"
+
"AND ( eb.name LIKE CONCAT('%', #{nameOrCode}, '%') OR eb.name_pin_yin LIKE CONCAT('%', #{nameOrCode}, '%') "
+
...
...
@@ -133,4 +133,24 @@ public interface LearningContentBoardMapper extends BaseMapper<LearningContentBo
+
"</script>"
)
IPage
<
ExhibitionBoard
>
getBoardPageByLearningProjectId
(
Page
<
ExhibitionBoard
>
page
,
String
learningProjectId
,
String
nameOrCode
);
@Select
(
"SELECT t.* FROM "
+
"("
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover "
+
"FROM learning_content_board lcb, learning_content lc, exhibition_board eb, video_content vc, asset a "
+
"WHERE lcb.learning_content_id = lc.id and lcb.exhibition_board_id = eb.id and eb.video_content_id = vc.id "
+
"and vc.id = a.ref_item_id and lc.is_published = 1 and lc.is_deleted = 0 and eb.is_published = 1 "
+
"and eb.is_deleted = 0 and vc.is_deleted = 0 and vc.is_published = 1 and a.is_published = 1 "
+
"and a.is_published = 1 and a.file_type = 'VIDEO' and lc.is_major = 1 "
+
"union "
+
"SELECT a.*, eb.id exhibition_board_id, eb.name exhibition_board_name, eb.cover exhibition_board_cover "
+
"FROM learning_content_board lcb, learning_content lc, exhibition_board eb, asset a "
+
" WHERE lcb.learning_content_id = lc.id and lcb.exhibition_board_id = eb.id and eb.id = a.ref_item_id "
+
"and lc.is_published = 1 and lc.is_deleted = 0 and eb.is_published = 1 and eb.is_deleted = 0 "
+
"and a.is_published = 1 and a.is_published = 1 and a.file_cat = 'EXHIBITION_BOARD_DATUM' "
+
"and a.file_type = 'VIDEO' and lc.is_major = 1"
+
") t"
)
IPage
<
Asset
>
selectAssetPageAll
(
Page
<
Asset
>
page
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/service/ExhibitionBoardService.java
View file @
91d8305c
...
...
@@ -3,6 +3,7 @@ package cn.chnmuseum.party.service;
import
cn.chnmuseum.party.model.ExhibitionBoard
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.Collection
;
import
java.util.List
;
/**
...
...
@@ -16,4 +17,6 @@ import java.util.List;
public
interface
ExhibitionBoardService
extends
IService
<
ExhibitionBoard
>
{
List
<
ExhibitionBoard
>
getList
(
String
learningProjectId
,
boolean
b
);
List
<
ExhibitionBoard
>
getByContentList
(
String
learningContentId
,
boolean
b
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/service/impl/ExhibitionBoardServiceImpl.java
View file @
91d8305c
...
...
@@ -23,8 +23,15 @@ public class ExhibitionBoardServiceImpl extends ServiceImpl<ExhibitionBoardMappe
@Autowired
private
ExhibitionBoardMapper
exhibitionBoardMapper
;
//根据学习项目id查询所有展板
@Override
public
List
<
ExhibitionBoard
>
getList
(
String
learningProjectId
,
boolean
isPublished
)
{
return
exhibitionBoardMapper
.
getList
(
learningProjectId
,
isPublished
);
}
//根据学习内容id查询所有展板
@Override
public
List
<
ExhibitionBoard
>
getByContentList
(
String
learningContentId
,
boolean
isPublished
)
{
return
exhibitionBoardMapper
.
getByContentList
(
learningContentId
,
isPublished
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/service/impl/LearningContentBoardServiceImpl.java
View file @
91d8305c
...
...
@@ -39,11 +39,15 @@ public class LearningContentBoardServiceImpl extends ServiceImpl<LearningContent
@Override
public
IPage
<
Asset
>
getAssetPageByOrganCode
(
Page
<
Asset
>
page
,
String
organCode
)
{
return
learningContentBoardMapper
.
selectAssetPageByOrganCode
(
page
,
organCode
);
//查询所有可看子学习内容视频列表
// return learningContentBoardMapper.selectAssetPageByOrganCode(page, organCode);
//直接查询主学习内容更新视频
return
learningContentBoardMapper
.
selectAssetPageAll
(
page
);
}
@Override
public
IPage
<
ExhibitionBoard
>
getBoardPageByLearningProjectId
(
Page
<
ExhibitionBoard
>
page
,
String
learningProjectId
,
String
nameOrCode
)
{
//直接关联主学习内容查询展板
return
learningContentBoardMapper
.
getBoardPageByLearningProjectId
(
page
,
learningProjectId
,
nameOrCode
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
91d8305c
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/ExhibitionBoardMapper.xml
View file @
91d8305c
...
...
@@ -35,9 +35,18 @@
select e.name,e.cover,lb.sortorder,e.create_time
from exhibition_board e
left join learning_content_board lb on lb.exhibition_board_id = e.id
left join learning_content lc on lb.learning_content_id = lc.id and lc.is_deleted = 0
left join learning_project p on lc.learning_project_id = p.id
where e.is_published = #{isPublished} and p.id = #{learningProjectId} and e.is_deleted = 0 and lc.is_deleted = 0 and lc.is_published = 1
inner join learning_content lc on lb.learning_content_id = lc.id and lc.is_deleted = 0 and lc.is_published = 1 and lc.is_major = 1
left join learning_project p on lc.learning_project_id = p.id and p.id = #{learningProjectId}
where e.is_published = #{isPublished} and e.is_deleted = 0
order by lb.sortorder desc,e.create_time DESC
</select>
<select
id=
"getByContentList"
resultMap=
"BaseResultMap"
>
select e.name,e.cover,lb.sortorder,e.create_time
from exhibition_board e
left join learning_content_board lb on lb.exhibition_board_id = e.id
inner join learning_content lc on lb.learning_content_id = lc.id and lc.id = #{learningContentId}
where e.is_published = #{isPublished} and e.is_deleted = 0
order by lb.sortorder desc,e.create_time DESC
</select>
...
...
This diff is collapsed.
Click to expand it.
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