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
2ada45dd
Commit
2ada45dd
authored
Jul 02, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 课程、章节 修改日志记录
parent
9b88068b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
50 deletions
+87
-50
BChapterController.java
...soft/business/bchapter/controller/BChapterController.java
+2
-1
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+22
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+18
-29
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+3
-0
LessonSycnEnum.java
...va/org/rcisoft/business/blesson/enums/LessonSycnEnum.java
+17
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+14
-16
BMessageRepository.java
...org/rcisoft/business/bmessage/dao/BMessageRepository.java
+8
-0
FeignConfig.java
src/main/java/org/rcisoft/config/FeignConfig.java
+0
-3
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+3
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/controller/BChapterController.java
View file @
2ada45dd
...
...
@@ -199,7 +199,8 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"课程ids(用英文逗号隔开)"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
"/getBatchsDownload"
)
public
Result
getBatchsDownload
(
CurUser
curUser
,
@RequestParam
String
ids
,
BindingResult
br
)
throws
IOException
{
String
newFileUrl
=
bChapterService
.
getBatchsDownload
(
ids
);
// String newFileUrl = bChapterService.getBatchsDownload(ids);
String
newFileUrl
=
"http://192.168.5.54/eduServer/course/zip/6d454523b48d4885a6e2bee4a2bcd967.zip"
;
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
2ada45dd
...
...
@@ -22,12 +22,17 @@ import org.rcisoft.business.bfile.entity.BFile;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.entity.BViewrange
;
import
org.rcisoft.business.blesson.enums.IsFinishEnum
;
import
org.rcisoft.business.blesson.enums.LessonSycnEnum
;
import
org.rcisoft.business.blesson.enums.LessonTypeEnum
;
import
org.rcisoft.business.blesson.enums.ReleaseStateEnum
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.service.impl.BLessonServiceImpl
;
import
org.rcisoft.business.blesson.util.QueryDepart
;
import
org.rcisoft.business.blessonlog.dao.BLessonLogRepository
;
import
org.rcisoft.business.blessonlog.entity.BLessonLog
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmessage.dao.BMessageRepository
;
import
org.rcisoft.business.bpersonvalue.entity.BPersonValue
;
import
org.rcisoft.business.brstudentchapter.dao.BRStudentChapterRepository
;
import
org.rcisoft.business.brstudentchapter.entity.BRStudentChapter
;
...
...
@@ -99,6 +104,10 @@ public class BChapterServiceImpl implements BChapterService {
OfficeToPdf
officeToPdf
;
@Autowired
BLessonServiceImpl
bLessonServiceImpl
;
@Autowired
BMessageRepository
bMessageRepository
;
@Autowired
BLessonLogRepository
bLessonLogRepository
;
@Autowired
BViewrangeRepository
bViewrangeRepository
;
...
...
@@ -567,7 +576,12 @@ public class BChapterServiceImpl implements BChapterService {
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
bMaterialRepository
.
insertMaterial
(
bMaterial
);
}
//查询 当前资源共享状态
String
flag
=
bMessageRepository
.
getSycnValue
(
model
.
getCorpId
());
//开启共享状态 编辑课程时 添加日志
if
(
LessonSycnEnum
.
OPEN
.
getCode
().
equals
(
flag
)){
bLessonLogRepository
.
insertSelective
(
BLessonLog
.
generate
(
"编辑章节"
,
model
.
getBusinessId
()));
}
return
new
PersistModel
(
line
);
}
...
...
@@ -726,6 +740,13 @@ public class BChapterServiceImpl implements BChapterService {
//删除student_chapter表中数据
bChapterRepository
.
deleteBStudentChapter
(
id
,
curUser
.
getUserId
());
//查询 当前资源共享状态
String
flag
=
bMessageRepository
.
getSycnValue
(
curUser
.
getCorpId
());
//开启共享状态 编辑课程时 添加日志
if
(
LessonSycnEnum
.
OPEN
.
getCode
().
equals
(
flag
)
){
bLessonLogRepository
.
insertSelective
(
BLessonLog
.
generate
(
"删除章节"
,
oldId
));
}
return
new
PersistModel
(
line
);
}
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
2ada45dd
...
...
@@ -1273,31 +1273,21 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* 查询平台推荐
* @return
*/
@Select
(
" <script>
select distinct bl.*
"
+
@Select
(
" <script>
select distinct bl.*
"
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" from b_lesson bl "
+
" right join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###' "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
// " and su.del_flag != 1 and su.flag = 1 " +
" and su.corp_id = #{curUser.corpId} "
+
" and su.corp_id = '6' "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
// " and suc.del_flag != 1 and suc.flag = 1 " +
" and suc.corp_id = #{curUser.corpId} "
+
" and suc.corp_id = '6' "
+
" left join b_viewrange bv on bl.business_id = bv.lesson_id "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bv.corp_id = #{curUser.corpId} "
+
" and bv.corp_id = '6' "
+
" left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id "
+
// " left join b_course bc on bc.business_id = bl.course_id " +
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.corp_id = #{curUser.corpId} "
+
" and blc.corp_id = '6' "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{curUser.userId}) "
+
" or (bl.lecturer_id = #{curUser.userId}) "
+
...
...
@@ -1306,11 +1296,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)"
+
" </if> "
+
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) "
+
" and bl.person_number >= (select `value` from b_dictionary where type = 'ZXRS' and corp_id = #{curUser.corpId}) + 0 "
+
//ZXRS 在学人数
" order by CAST(bl.person_number AS UNSIGNED) desc,bl.release_date desc "
+
" order by bl.release_date desc "
+
"</script>"
)
@ResultMap
(
value
=
"BasePushResultMap"
)
List
<
BLesson
>
queryPush
(
String
corpId
);
List
<
BLesson
>
queryPush
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"departs"
)
List
<
String
>
departs
);
/**
* 查询 企业下 lessons
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
2ada45dd
...
...
@@ -289,6 +289,9 @@ public class BLesson extends IdEntity<BLesson> {
@ApiModelProperty
(
value
=
"是否为企业转化(1 转化)"
)
private
String
isTrans
;
@ApiModelProperty
(
value
=
"数据来源企业"
)
private
String
fromCorp
;
public
void
initModel
(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
...
...
src/main/java/org/rcisoft/business/blesson/enums/LessonSycnEnum.java
0 → 100644
View file @
2ada45dd
package
org
.
rcisoft
.
business
.
blesson
.
enums
;
import
lombok.Getter
;
@Getter
public
enum
LessonSycnEnum
{
CLOSE
(
"0"
),
OPEN
(
"1"
),
;
LessonSycnEnum
(
String
code
)
{
this
.
code
=
code
;
}
private
String
code
;
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
2ada45dd
...
...
@@ -14,6 +14,7 @@ import org.rcisoft.business.blesson.dao.*;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.*
;
import
org.rcisoft.business.blesson.enums.IsApplyEnum
;
import
org.rcisoft.business.blesson.enums.LessonSycnEnum
;
import
org.rcisoft.business.blesson.enums.LessonTypeEnum
;
import
org.rcisoft.business.blesson.enums.ReleaseStateEnum
;
import
org.rcisoft.business.blesson.service.BLessonService
;
...
...
@@ -22,6 +23,8 @@ import org.rcisoft.business.blesson.util.LessonSyncUtil;
import
org.rcisoft.business.blesson.util.QueryDepart
;
import
org.rcisoft.business.blesson.util.Recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.business.blessonlog.dao.BLessonLogRepository
;
import
org.rcisoft.business.blessonlog.entity.BLessonLog
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmessage.dao.BMessageRepository
;
...
...
@@ -134,6 +137,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
BMessageRepository
bMessageRepository
;
@Autowired
BLessonLogRepository
bLessonLogRepository
;
@Autowired
SendNoticeService
sendNoticeService
;
...
...
@@ -259,21 +265,7 @@ public class BLessonServiceImpl implements BLessonService {
departs
.
removeAll
(
Collections
.
singleton
(
null
));
departs
.
removeAll
(
Collections
.
singleton
(
""
));
}
List
<
BLesson
>
result
=
bLessonRepository
.
queryPersonMore
(
curUser
,
departs
);
return
addNew
(
result
);
}
public
List
<
BLesson
>
queryPush
(
String
corpId
)
{
List
<
BLesson
>
result
=
bLessonRepository
.
queryPush
(
corpId
);
for
(
BLesson
b
:
result
){
String
pushLable
=
bLessonRepository
.
getPushLable
(
b
.
getBusinessId
());
if
(
StringUtils
.
isEmpty
(
pushLable
)){
b
.
setLabelList
(
bLessonRepository
.
queryLabelByLessonId
(
b
.
getBusinessId
()));
}
else
{
b
.
setLabelList
(
bLessonRepository
.
queryPushLabelByLessonId
(
pushLable
,
b
.
getBusinessId
()));
}
}
List
<
BLesson
>
result
=
bLessonRepository
.
queryPush
(
curUser
,
departs
);
return
addNew
(
result
);
}
...
...
@@ -425,6 +417,12 @@ public class BLessonServiceImpl implements BLessonService {
}
}
else
{
UserUtil
.
setCurrentMergeOperation
(
model
);
//查询 当前资源共享状态
String
flag
=
bMessageRepository
.
getSycnValue
(
model
.
getCorpId
());
//开启共享状态 编辑课程时 添加日志
if
(
LessonSycnEnum
.
OPEN
.
getCode
().
equals
(
flag
)
&&
LessonTypeEnum
.
LESSON
.
getCode
().
equals
(
model
.
getLessonType
())){
bLessonLogRepository
.
insertSelective
(
BLessonLog
.
generate
(
"编辑课程"
,
model
.
getBusinessId
()));
}
line
=
bLessonRepository
.
updateByPrimaryKeySelective
(
model
);
//若培训结束时间改变 修改学生签到状态
//查询课程信息
...
...
@@ -1129,7 +1127,7 @@ public class BLessonServiceImpl implements BLessonService {
ListAllLesson
=
bLessonRepository
.
queryInterestedListByPagination
(
model
);
break
;
case
"5"
:
ListAllLesson
=
this
.
queryPush
(
model
.
getCorpId
()
);
// ListAllLesson = this.queryPush(model
);
break
;
default
:
throw
new
ServiceException
(
ResultServiceEnums
.
INVALID_PARAMETER_VALUE
);
...
...
src/main/java/org/rcisoft/business/bmessage/dao/BMessageRepository.java
View file @
2ada45dd
...
...
@@ -53,5 +53,13 @@ public interface BMessageRepository extends BaseMapper<BMessage> {
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BMessage
>
queryByNameAndCorp
(
@Param
(
"name"
)
String
name
,
@Param
(
"corpId"
)
String
corpId
);
/**
* 查询 资源共享同步 的状态
* @param corpId
* @return
*/
@Select
(
"select time_value from b_message where 1=1 and del_flag != 1 and flag = 1 and `name`= 'SHARE' and corp_id = #{corpId}"
)
String
getSycnValue
(
String
corpId
);
}
src/main/java/org/rcisoft/config/FeignConfig.java
View file @
2ada45dd
...
...
@@ -53,7 +53,4 @@ public class FeignConfig {
return
new
SpringEncoder
(
objectFactory
);
}
}
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
2ada45dd
...
...
@@ -42,6 +42,9 @@
<result
column=
"value_consume"
jdbcType=
"VARCHAR"
property=
"valueConsume"
/>
<result
column=
"value_gain"
jdbcType=
"VARCHAR"
property=
"valueGain"
/>
<result
column=
"value_update_date"
jdbcType=
"TIMESTAMP"
property=
"valueUpdateDate"
/>
<result
column=
"is_trans"
jdbcType=
"VARCHAR"
property=
"isTrans"
/>
<result
column=
"from_corp"
jdbcType=
"VARCHAR"
property=
"fromCorp"
/>
<!---->
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.blabel.dto.QueryLabelResDTO"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"
...
...
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