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
f1aa4a06
Commit
f1aa4a06
authored
Oct 17, 2019
by
王淑君
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
0bacddfc
2230072a
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
86 additions
and
20 deletions
+86
-20
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+18
-2
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+6
-1
BRecommendRepository.java
...rg/rcisoft/business/blesson/dao/BRecommendRepository.java
+1
-1
FindLessonRecommendDTO.java
.../rcisoft/business/blesson/dto/FindLessonRecommendDTO.java
+2
-1
FindLessonRecommendRspDTO.java
...isoft/business/blesson/dto/FindLessonRecommendRspDTO.java
+3
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+8
-0
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+1
-1
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+31
-13
ContactFeignClient.java
...g/rcisoft/common/util/feignClient/ContactFeignClient.java
+9
-0
MTCotactApiRequestClient.java
...isoft/common/util/outClient/MTCotactApiRequestClient.java
+5
-0
ResultExceptionEnum.java
...ain/java/org/rcisoft/core/result/ResultExceptionEnum.java
+2
-1
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
f1aa4a06
...
...
@@ -377,7 +377,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param
* @return
*/
@ApiOperation
(
value
=
"620 线上课程学员跟踪"
,
notes
=
"线上课程学员跟踪"
)
@ApiOperation
(
value
=
"620 线上课程学员跟踪"
,
notes
=
"线上课程学员跟踪"
,
response
=
StudentTrackingRspDTO
.
class
)
@GetMapping
(
value
=
"/studentTrackingByPagination"
)
public
Result
studentTrackingByPagination
(
CurUser
curUser
,
@Valid
StudentTrackingDTO
studentTrackingDTO
,
BindingResult
bindingResult
)
{
bLessonPersonService
.
studentTrackingByPagination
(
getPaginationUtility
(),
studentTrackingDTO
);
...
...
@@ -424,7 +424,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param
* @return
*/
@ApiOperation
(
value
=
"623 根据课程Id 查询该课程推荐范围"
,
notes
=
"根据课程id 查询课程推荐范围(人和部门)"
,
response
=
BLesson
.
class
)
@ApiOperation
(
value
=
"623 根据课程Id 查询该课程推荐范围"
,
notes
=
"根据课程id 查询课程推荐范围(人和部门)"
,
response
=
FindLessonRecommendRspDTO
.
class
)
@GetMapping
(
value
=
"/queryRecommendByLessonId"
)
public
Result
queryRecommendByLessonId
(
CurUser
curUser
,
@Valid
FindLessonRecommendDTO
param
,
BindingResult
bindingResult
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
...
...
@@ -453,4 +453,20 @@ public class BLessonController extends PaginationController<BLesson> {
addMyLearnLessonDTO
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"626 删除推荐"
,
notes
=
"删除推荐"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/deleteRecommend"
)
public
Result
deleteRecommend
(
CurUser
curUser
,
@Valid
String
lessonId
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonService
.
deleteRecommend
(
lessonId
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
lessonId
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
f1aa4a06
...
...
@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
// 退出课程
@Update
(
"update b_lesson_person set
flag = 0
where business_id = #{id}"
)
@Update
(
"update b_lesson_person set
del_flag = 1
where business_id = #{id}"
)
int
quit
(
String
id
);
//查询线上课程学员追踪图表
...
...
@@ -232,4 +232,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" #{param.isAppoint}) "
+
"</script>"
)
int
insertBLessonPerson
(
@Param
(
"param"
)
BLessonPerson
param
);
@Select
(
"<script>select * from b_lesson_person where 1=1 "
+
"and business_id = #{businessId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BLessonPerson
selectById
(
String
businessId
);
}
src/main/java/org/rcisoft/business/blesson/dao/BRecommendRepository.java
View file @
f1aa4a06
...
...
@@ -61,7 +61,7 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
int
insertBRecommendSons
(
List
<
BRecommendSon
>
bRecommendSons
);
@Select
(
"<script>select brs.business_id businessId, brs.type type, brs.target_id targetId, su.name targetName "
+
@Select
(
"<script>select brs.business_id businessId, brs.type type, brs.target_id targetId, su.name targetName
,su.account_id accountId
"
+
" from b_recommend_son brs left join b_recommend br on brs.recommend_id = br.business_id "
+
" left join b_lesson bl on br.lesson_id = bl.business_id "
+
" left join s_user su on brs.target_id = su.business_id "
+
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindLessonRecommendDTO.java
View file @
f1aa4a06
...
...
@@ -2,6 +2,7 @@ package org.rcisoft.business.blesson.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.rcisoft.common.util.feignDto.DeptGetRspDTO
;
import
java.util.List
;
...
...
@@ -14,7 +15,7 @@ public class FindLessonRecommendDTO {
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
List
<
LessonRecommendDepart
DTO
>
departs
;
private
List
<
DeptGetRsp
DTO
>
departs
;
private
String
userId
;
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindLessonRecommendRspDTO.java
View file @
f1aa4a06
...
...
@@ -19,4 +19,7 @@ public class FindLessonRecommendRspDTO {
@ApiModelProperty
(
value
=
"被推荐 人/部门名"
)
private
String
targetName
;
@ApiModelProperty
(
value
=
"被推荐 人/部门accountId"
)
private
String
accountId
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
f1aa4a06
...
...
@@ -181,4 +181,12 @@ public interface BLessonService{
*/
List
<
BLesson
>
theLessonMangageByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
BLesson
bLesson
);
/**
* 分页查询列表页全部
* @author: zhangqingle
* @param lessonId
* @return
*/
PersistModel
deleteRecommend
(
String
lessonId
);
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
f1aa4a06
...
...
@@ -45,7 +45,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
PersistModel
quit
(
QuitLessonDTO
quitLessonDTO
)
{
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectBy
PrimaryKey
(
quitLessonDTO
.
getBusinessId
());
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectBy
Id
(
quitLessonDTO
.
getBusinessId
());
if
(
"1"
.
equals
(
bLessonPerson
.
getIsAppoint
())){
throw
new
ServiceException
(
ResultExceptionEnum
.
APPOINT_NOT_CLOSE
);
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
f1aa4a06
...
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.entity.*;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.common.util.feignDto.DeptGetRspDTO
;
import
org.rcisoft.common.util.feignDto.MTUserGetsReqDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
...
...
@@ -357,28 +358,27 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
)
{
//按部门名模糊查询部门id(list)------
List
<
LessonRecommendDepartDTO
>
departs
=
new
ArrayList
<>();
departs
.
add
(
new
LessonRecommendDepartDTO
(
"1"
,
"111"
));
departs
.
add
(
new
LessonRecommendDepartDTO
(
"2"
,
"222"
));
departs
.
add
(
new
LessonRecommendDepartDTO
(
"3"
,
"333"
));
//-------------------------------
// if (StringUtils.isEmpty(param.getViewParam())){
// param.setViewParam("");
// }
List
<
DeptGetRspDTO
>
departs
=
cotactApiRequestClient
.
deptListDeptInfoByName
(
param
.
getCorpId
(),
param
.
getViewParam
());
//查询结果放入DTO中
param
.
setDeparts
(
departs
);
//查询该课程推荐的所有人
List
<
FindLessonRecommendRspDTO
>
findLessonPersonRecommend
=
bRecommendRepository
.
queryRecommendPersonByLessonId
(
param
);
//查询该课程推荐的所有部门
List
<
FindLessonRecommendRspDTO
>
findLessonDepartRecommend
=
bRecommendRepository
.
queryRecommendDepartByLessonId
(
param
);
for
(
LessonRecommendDepartDTO
depart
:
departs
)
{
if
(
departs
!=
null
&&
departs
.
size
()
>
0
&&
findLessonDepartRecommend
!=
null
&&
findLessonDepartRecommend
.
size
()
>
0
){
for
(
DeptGetRspDTO
depart
:
departs
)
{
for
(
FindLessonRecommendRspDTO
findLessonRecommendRspDTO
:
findLessonDepartRecommend
)
{
if
(
depart
.
equals
(
findLessonRecommendRspDTO
.
getTargetId
())){
findLessonRecommendRspDTO
.
setTargetName
(
depart
.
getDepar
tName
());
if
(
depart
.
getId
()
.
equals
(
findLessonRecommendRspDTO
.
getTargetId
())){
findLessonRecommendRspDTO
.
setTargetName
(
depart
.
ge
tName
());
}
}
}
findLessonPersonRecommend
.
addAll
(
findLessonDepartRecommend
);
}
return
findLessonPersonRecommend
;
}
...
...
@@ -535,6 +535,24 @@ public class BLessonServiceImpl implements BLessonService {
return
bLessons
;
}
@Override
public
PersistModel
deleteRecommend
(
String
lessonId
)
{
List
<
String
>
recommendIds
=
bRecommendRepository
.
selectIdByLessonId
(
lessonId
);
if
(
recommendIds
==
null
||
recommendIds
.
size
()<
1
){
throw
new
ServiceException
(
ResultExceptionEnum
.
NOT_RECOMMEND
);
}
//修改推荐表
BRecommend
bRecommend
=
new
BRecommend
();
bRecommend
.
setLessonId
(
lessonId
);
UserUtil
.
setCurrentMergeOperation
(
bRecommend
);
bRecommend
.
setBusinessId
(
recommendIds
.
get
(
0
));
bRecommend
.
setDelFlag
(
"1"
);
int
line
=
bRecommendRepository
.
updateByPrimaryKeySelective
(
bRecommend
);
//删除推荐子表内容
return
new
PersistModel
(
line
);
}
//遍历标签放入List中
List
<
BLessonLabel
>
addLabel
(
BLesson
model
){
//标签集合
...
...
src/main/java/org/rcisoft/common/util/feignClient/ContactFeignClient.java
View file @
f1aa4a06
...
...
@@ -194,4 +194,13 @@ public interface ContactFeignClient {
@RequestParam
(
"zxClientType"
)
String
zxClientType
,
@RequestParam
(
"zxAccountId"
)
Long
zxAccountId
);
/**
* 通过名称模糊搜索部门列表
*/
@RequestMapping
(
value
=
"/dept/list_dept_info_by_name"
,
method
=
RequestMethod
.
GET
)
Ret
<
List
<
DeptGetRspDTO
>>
deptListDeptInfoByName
(
@RequestParam
(
"corpId"
)
String
corpId
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"zxClientType"
)
String
zxClientType
,
@RequestParam
(
"zxAccountId"
)
Long
zxAccountId
);
}
src/main/java/org/rcisoft/common/util/outClient/MTCotactApiRequestClient.java
View file @
f1aa4a06
...
...
@@ -476,6 +476,11 @@ public class MTCotactApiRequestClient {
return
contactFeignClient
.
getUserByDeptIds
(
getUserByDeptIdReqDTO
,
zxClientType
,
zxAccountId
).
getData
();
}
public
List
<
DeptGetRspDTO
>
deptListDeptInfoByName
(
String
corpId
,
String
name
){
return
contactFeignClient
.
deptListDeptInfoByName
(
corpId
,
name
,
zxClientType
,
zxAccountId
).
getData
();
}
/**
* 刷新token
* @param refreshToken
...
...
src/main/java/org/rcisoft/core/result/ResultExceptionEnum.java
View file @
f1aa4a06
...
...
@@ -30,7 +30,8 @@ public enum ResultExceptionEnum {
APPOINT_NOT_CLOSE
(
4014
,
"必修不能退出"
),
STATE_NOT_RELEASE
(
4015
,
"该课程状态不能发布"
),
APPOINT_NOT_CANCEL
(
4016
,
"该课程不能取消指派"
),
INVALID_PARAMETER_VALUE
(
4017
,
"参数值无效"
)
INVALID_PARAMETER_VALUE
(
4017
,
"参数值无效"
),
NOT_RECOMMEND
(
4018
,
"该课程未推荐"
)
;
private
Integer
code
;
...
...
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