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
57c0092f
Commit
57c0092f
authored
Oct 17, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口、添加新接口
parent
14fbc593
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
17 deletions
+78
-17
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+18
-2
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
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+30
-12
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 @
57c0092f
...
@@ -377,7 +377,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -377,7 +377,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param
* @param
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"620 线上课程学员跟踪"
,
notes
=
"线上课程学员跟踪"
)
@ApiOperation
(
value
=
"620 线上课程学员跟踪"
,
notes
=
"线上课程学员跟踪"
,
response
=
StudentTrackingRspDTO
.
class
)
@GetMapping
(
value
=
"/studentTrackingByPagination"
)
@GetMapping
(
value
=
"/studentTrackingByPagination"
)
public
Result
studentTrackingByPagination
(
CurUser
curUser
,
@Valid
StudentTrackingDTO
studentTrackingDTO
,
BindingResult
bindingResult
)
{
public
Result
studentTrackingByPagination
(
CurUser
curUser
,
@Valid
StudentTrackingDTO
studentTrackingDTO
,
BindingResult
bindingResult
)
{
bLessonPersonService
.
studentTrackingByPagination
(
getPaginationUtility
(),
studentTrackingDTO
);
bLessonPersonService
.
studentTrackingByPagination
(
getPaginationUtility
(),
studentTrackingDTO
);
...
@@ -424,7 +424,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -424,7 +424,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param
* @param
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"623 根据课程Id 查询该课程推荐范围"
,
notes
=
"根据课程id 查询课程推荐范围(人和部门)"
,
response
=
BLesson
.
class
)
@ApiOperation
(
value
=
"623 根据课程Id 查询该课程推荐范围"
,
notes
=
"根据课程id 查询课程推荐范围(人和部门)"
,
response
=
FindLessonRecommendRspDTO
.
class
)
@GetMapping
(
value
=
"/queryRecommendByLessonId"
)
@GetMapping
(
value
=
"/queryRecommendByLessonId"
)
public
Result
queryRecommendByLessonId
(
CurUser
curUser
,
@Valid
FindLessonRecommendDTO
param
,
BindingResult
bindingResult
)
{
public
Result
queryRecommendByLessonId
(
CurUser
curUser
,
@Valid
FindLessonRecommendDTO
param
,
BindingResult
bindingResult
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
...
@@ -453,4 +453,20 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -453,4 +453,20 @@ public class BLessonController extends PaginationController<BLesson> {
addMyLearnLessonDTO
);
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/BRecommendRepository.java
View file @
57c0092f
...
@@ -61,7 +61,7 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
...
@@ -61,7 +61,7 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
int
insertBRecommendSons
(
List
<
BRecommendSon
>
bRecommendSons
);
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 "
+
" 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 b_lesson bl on br.lesson_id = bl.business_id "
+
" left join s_user su on brs.target_id = su.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 @
57c0092f
...
@@ -2,6 +2,7 @@ package org.rcisoft.business.blesson.dto;
...
@@ -2,6 +2,7 @@ package org.rcisoft.business.blesson.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.rcisoft.common.util.feignDto.DeptGetRspDTO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,7 +15,7 @@ public class FindLessonRecommendDTO {
...
@@ -14,7 +15,7 @@ public class FindLessonRecommendDTO {
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
String
lessonId
;
private
List
<
LessonRecommendDepart
DTO
>
departs
;
private
List
<
DeptGetRsp
DTO
>
departs
;
private
String
userId
;
private
String
userId
;
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindLessonRecommendRspDTO.java
View file @
57c0092f
...
@@ -19,4 +19,7 @@ public class FindLessonRecommendRspDTO {
...
@@ -19,4 +19,7 @@ public class FindLessonRecommendRspDTO {
@ApiModelProperty
(
value
=
"被推荐 人/部门名"
)
@ApiModelProperty
(
value
=
"被推荐 人/部门名"
)
private
String
targetName
;
private
String
targetName
;
@ApiModelProperty
(
value
=
"被推荐 人/部门accountId"
)
private
String
accountId
;
}
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
57c0092f
...
@@ -181,4 +181,12 @@ public interface BLessonService{
...
@@ -181,4 +181,12 @@ public interface BLessonService{
*/
*/
List
<
BLesson
>
theLessonMangageByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
BLesson
bLesson
);
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/BLessonServiceImpl.java
View file @
57c0092f
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.entity.*;
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.entity.*;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
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.MTUserGetsReqDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
...
@@ -357,13 +358,10 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -357,13 +358,10 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
)
{
public
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
)
{
//按部门名模糊查询部门id(list)------
//按部门名模糊查询部门id(list)------
if
(
StringUtils
.
isEmpty
(
param
.
getViewParam
())){
List
<
LessonRecommendDepartDTO
>
departs
=
new
ArrayList
<>();
param
.
setViewParam
(
""
);
departs
.
add
(
new
LessonRecommendDepartDTO
(
"1"
,
"111"
));
}
departs
.
add
(
new
LessonRecommendDepartDTO
(
"2"
,
"222"
));
List
<
DeptGetRspDTO
>
departs
=
cotactApiRequestClient
.
deptListDeptInfoByName
(
param
.
getCorpId
(),
param
.
getViewParam
());
departs
.
add
(
new
LessonRecommendDepartDTO
(
"3"
,
"333"
));
//-------------------------------
//查询结果放入DTO中
//查询结果放入DTO中
param
.
setDeparts
(
departs
);
param
.
setDeparts
(
departs
);
//查询该课程推荐的所有人
//查询该课程推荐的所有人
...
@@ -371,14 +369,16 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -371,14 +369,16 @@ public class BLessonServiceImpl implements BLessonService {
List
<
FindLessonRecommendRspDTO
>
findLessonDepartRecommend
=
bRecommendRepository
.
queryRecommendDepartByLessonId
(
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
)
{
for
(
FindLessonRecommendRspDTO
findLessonRecommendRspDTO
:
findLessonDepartRecommend
)
{
if
(
depart
.
equals
(
findLessonRecommendRspDTO
.
getTargetId
())){
if
(
depart
.
getId
()
.
equals
(
findLessonRecommendRspDTO
.
getTargetId
())){
findLessonRecommendRspDTO
.
setTargetName
(
depart
.
getDepar
tName
());
findLessonRecommendRspDTO
.
setTargetName
(
depart
.
ge
tName
());
}
}
}
}
}
}
findLessonPersonRecommend
.
addAll
(
findLessonDepartRecommend
);
findLessonPersonRecommend
.
addAll
(
findLessonDepartRecommend
);
}
return
findLessonPersonRecommend
;
return
findLessonPersonRecommend
;
}
}
...
@@ -535,6 +535,24 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -535,6 +535,24 @@ public class BLessonServiceImpl implements BLessonService {
return
bLessons
;
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中
List
<
BLessonLabel
>
addLabel
(
BLesson
model
){
List
<
BLessonLabel
>
addLabel
(
BLesson
model
){
//标签集合
//标签集合
...
...
src/main/java/org/rcisoft/common/util/feignClient/ContactFeignClient.java
View file @
57c0092f
...
@@ -194,4 +194,13 @@ public interface ContactFeignClient {
...
@@ -194,4 +194,13 @@ public interface ContactFeignClient {
@RequestParam
(
"zxClientType"
)
String
zxClientType
,
@RequestParam
(
"zxClientType"
)
String
zxClientType
,
@RequestParam
(
"zxAccountId"
)
Long
zxAccountId
);
@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 @
57c0092f
...
@@ -476,6 +476,11 @@ public class MTCotactApiRequestClient {
...
@@ -476,6 +476,11 @@ public class MTCotactApiRequestClient {
return
contactFeignClient
.
getUserByDeptIds
(
getUserByDeptIdReqDTO
,
zxClientType
,
zxAccountId
).
getData
();
return
contactFeignClient
.
getUserByDeptIds
(
getUserByDeptIdReqDTO
,
zxClientType
,
zxAccountId
).
getData
();
}
}
public
List
<
DeptGetRspDTO
>
deptListDeptInfoByName
(
String
corpId
,
String
name
){
return
contactFeignClient
.
deptListDeptInfoByName
(
corpId
,
name
,
zxClientType
,
zxAccountId
).
getData
();
}
/**
/**
* 刷新token
* 刷新token
* @param refreshToken
* @param refreshToken
...
...
src/main/java/org/rcisoft/core/result/ResultExceptionEnum.java
View file @
57c0092f
...
@@ -30,7 +30,8 @@ public enum ResultExceptionEnum {
...
@@ -30,7 +30,8 @@ public enum ResultExceptionEnum {
APPOINT_NOT_CLOSE
(
4014
,
"必修不能退出"
),
APPOINT_NOT_CLOSE
(
4014
,
"必修不能退出"
),
STATE_NOT_RELEASE
(
4015
,
"该课程状态不能发布"
),
STATE_NOT_RELEASE
(
4015
,
"该课程状态不能发布"
),
APPOINT_NOT_CANCEL
(
4016
,
"该课程不能取消指派"
),
APPOINT_NOT_CANCEL
(
4016
,
"该课程不能取消指派"
),
INVALID_PARAMETER_VALUE
(
4017
,
"参数值无效"
)
INVALID_PARAMETER_VALUE
(
4017
,
"参数值无效"
),
NOT_RECOMMEND
(
4018
,
"该课程未推荐"
)
;
;
private
Integer
code
;
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