Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
f169ca47
Commit
f169ca47
authored
Jul 24, 2020
by
liuyuanjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug29610
parent
16cd60ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
8 deletions
+39
-8
BLabelRepository.java
...ava/org/rcisoft/business/blabel/dao/BLabelRepository.java
+21
-1
BLabelServiceImpl.java
...isoft/business/blabel/service/impl/BLabelServiceImpl.java
+2
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+15
-5
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/blabel/dao/BLabelRepository.java
View file @
f169ca47
...
@@ -14,13 +14,33 @@ public interface BLabelRepository extends BaseMapper<BLabel> {
...
@@ -14,13 +14,33 @@ public interface BLabelRepository extends BaseMapper<BLabel> {
// 查询所有数据
// 查询所有数据
@Select
(
"<script>SELECT * FROM b_label where del_flag != 1 and flag = 1 "
+
@Select
(
"<script>SELECT * FROM b_label where del_flag != 1 and flag = 1 "
+
" and corp_id = #{corpId}"
+
" and corp_id = #{corpId}
"
+
"<if test=\"lName!=null and lName != ''\"> and l_name like CONCAT('%',#{lName},'%') </if>"
+
"<if test=\"lName!=null and lName != ''\"> and l_name like CONCAT('%',#{lName},'%') </if>"
+
"order by create_date desc </script>"
)
"order by create_date desc </script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLabel
>
queryBlabels
(
@Param
(
"lName"
)
String
lName
,
@Param
(
"corpId"
)
String
corpId
);
List
<
BLabel
>
queryBlabels
(
@Param
(
"lName"
)
String
lName
,
@Param
(
"corpId"
)
String
corpId
);
/**
* 根据企业id查询其所属的平台标签
* @param lName
* @param corpId
* @return
*/
@Select
(
"<script>"
+
"select distinct bla.business_id,bla.l_name,bla.corp_id "
+
"from b_lesson_corp blc \n"
+
"left join b_lesson ble on ble.business_id = blc.lesson_id \n"
+
"left join b_label bla on FIND_IN_SET(bla.business_id,ble.push_lable) \n"
+
"where blc.corp_id = #{corpId} and ble.push_lable <> '' \n"
+
"<if test=\"lName!=null and lName != ''\"> "
+
"and l_name like CONCAT('%',#{lName},'%') \n"
+
"</if>"
+
"order by bla.create_date desc "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLabel
>
queryBLabelsForPlatform
(
@Param
(
"lName"
)
String
lName
,
@Param
(
"corpId"
)
String
corpId
);
// 增加标签是检查标签名重复
// 增加标签是检查标签名重复
@Select
(
"<script>select count(0) from b_label "
+
@Select
(
"<script>select count(0) from b_label "
+
"where l_name = #{lName} "
+
"where l_name = #{lName} "
+
...
...
src/main/java/org/rcisoft/business/blabel/service/impl/BLabelServiceImpl.java
View file @
f169ca47
...
@@ -45,6 +45,8 @@ public class BLabelServiceImpl implements BLabelService {
...
@@ -45,6 +45,8 @@ public class BLabelServiceImpl implements BLabelService {
@Override
@Override
public
List
<
BLabel
>
queryBlabels
(
String
lName
,
CurUser
curUser
)
{
public
List
<
BLabel
>
queryBlabels
(
String
lName
,
CurUser
curUser
)
{
List
<
BLabel
>
labels
=
bLabelRepository
.
queryBlabels
(
lName
,
curUser
.
getCorpId
());
List
<
BLabel
>
labels
=
bLabelRepository
.
queryBlabels
(
lName
,
curUser
.
getCorpId
());
List
<
BLabel
>
labelsForPlatform
=
bLabelRepository
.
queryBLabelsForPlatform
(
lName
,
curUser
.
getCorpId
());
labels
.
addAll
(
labelsForPlatform
);
List
<
BLesson
>
lessons
=
addPushLable
(
bLessonService
.
queryHomeBLessons
(
curUser
),
curUser
);
List
<
BLesson
>
lessons
=
addPushLable
(
bLessonService
.
queryHomeBLessons
(
curUser
),
curUser
);
log
.
info
(
"-----------addNewLable----------首页所有课程总个数--"
+
lessons
.
size
()+
"--------------------"
);
log
.
info
(
"-----------addNewLable----------首页所有课程总个数--"
+
lessons
.
size
()+
"--------------------"
);
...
@@ -69,7 +71,6 @@ public class BLabelServiceImpl implements BLabelService {
...
@@ -69,7 +71,6 @@ public class BLabelServiceImpl implements BLabelService {
log
.
info
(
"-----------addNewLable----------当前标签--"
+
label
+
"--的new课程个数--"
+
num
+
"--------------------"
);
log
.
info
(
"-----------addNewLable----------当前标签--"
+
label
+
"--的new课程个数--"
+
num
+
"--------------------"
);
label
.
setNewCount
(
num
);
label
.
setNewCount
(
num
);
}
}
return
labels
;
return
labels
;
}
}
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
f169ca47
...
@@ -840,7 +840,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -840,7 +840,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" where bl.del_flag != 1 and bl.flag = 1 "
+
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">"
+
" and (bll.label_id = #{model.labelId} or FIND_IN_SET(#{model.labelId},bl.push_lable)) "
+
" </if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
...
@@ -897,7 +899,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -897,7 +899,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">"
+
" and (bll.label_id = #{model.labelId} or FIND_IN_SET(#{model.labelId},bl.push_lable)) "
+
" </if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((brs.type = 0 and brs.target_id = #{model.userId}) "
+
" and ((brs.type = 0 and brs.target_id = #{model.userId}) "
+
...
@@ -956,7 +960,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -956,7 +960,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">"
+
" and (bll.label_id = #{model.labelId} or FIND_IN_SET(#{model.labelId},bl.push_lable)) "
+
" </if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
...
@@ -1014,7 +1020,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -1014,7 +1020,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" where bl.del_flag != 1 and bl.flag = 1 "
+
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" and (bl.corp_id = #{model.corpId} or blc.corp_id = #{model.corpId}) "
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.valueScreen !=null and model.valueScreen != ''\"> ${model.valueScreen} </if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">"
+
" and (bll.label_id = #{model.labelId} or FIND_IN_SET(#{model.labelId},bl.push_lable)) "
+
" </if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
...
@@ -1085,7 +1093,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -1085,7 +1093,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" b_lesson b left join b_lesson_person blp on b.business_id = blp.lesson_id "
+
" b_lesson b left join b_lesson_person blp on b.business_id = blp.lesson_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and blp.person_id = #{model.userId} ) "
+
" and blp.person_id = #{model.userId} ) "
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">"
+
" and (bll.label_id = #{model.labelId} or FIND_IN_SET(#{model.labelId},b.push_lable)) "
+
" </if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and b.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and b.lesson_type = #{model.lessonType}</if>"
+
" and b.release_state = 2 "
+
" and b.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{model.userId}) "
+
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
f169ca47
...
@@ -1207,7 +1207,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1207,7 +1207,7 @@ public class BLessonServiceImpl implements BLessonService {
List
<
BLesson
>
ListAllLesson
=
null
;
List
<
BLesson
>
ListAllLesson
=
null
;
//根据不同传值 查询列表页内容 searchType:查询类型 0 全部 1 推荐 2在学 3收藏"
//根据不同传值 查询列表页内容 searchType:查询类型 0 全部 1 推荐 2在学 3收藏
4兴趣
"
switch
(
model
.
getSearchType
())
{
switch
(
model
.
getSearchType
())
{
case
"0"
:
case
"0"
:
ListAllLesson
=
bLessonRepository
.
queryListAllLessonByPagination
(
model
);
ListAllLesson
=
bLessonRepository
.
queryListAllLessonByPagination
(
model
);
...
...
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