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
2850edeb
Commit
2850edeb
authored
Sep 26, 2019
by
王淑君
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
3797c9ca
61e8eea5
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
339 additions
and
182 deletions
+339
-182
BCourseRepository.java
...a/org/rcisoft/business/bcourse/dao/BCourseRepository.java
+9
-0
AllCourseDTO.java
...n/java/org/rcisoft/business/bcourse/dto/AllCourseDTO.java
+17
-0
BCourseService.java
.../org/rcisoft/business/bcourse/service/BCourseService.java
+7
-0
BCourseServiceImpl.java
...oft/business/bcourse/service/impl/BCourseServiceImpl.java
+6
-0
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+48
-4
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+61
-11
AddLessonDTO.java
...n/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
+3
-4
LessonTrainDTO.java
...java/org/rcisoft/business/blesson/dto/LessonTrainDTO.java
+29
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+7
-7
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+22
-11
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+31
-119
recursion.java
...ain/java/org/rcisoft/business/blesson/util/recursion.java
+28
-0
BLessonPersonController.java
...ess/blessonperson/controller/BLessonPersonController.java
+4
-2
BLessonPersonRepository.java
...t/business/blessonperson/dao/BLessonPersonRepository.java
+2
-1
SysUserController.java
...va/org/rcisoft/sys/user/controller/SysUserController.java
+13
-12
SysUserMapper.java
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
+11
-3
QuerySysUserDTO.java
src/main/java/org/rcisoft/sys/user/dto/QuerySysUserDTO.java
+22
-0
SysUser.java
src/main/java/org/rcisoft/sys/user/entity/SysUser.java
+0
-3
SysUserService.java
...ain/java/org/rcisoft/sys/user/service/SysUserService.java
+2
-1
SysUserServiceImpl.java
...org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
+3
-2
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
BCourseMapper.xml
...esources/mapper/business/bcourse.mapper/BCourseMapper.xml
+8
-0
UserMapper.xml
src/main/resources/mapper/sys/user/mapper/UserMapper.xml
+5
-1
No files found.
src/main/java/org/rcisoft/business/bcourse/dao/BCourseRepository.java
View file @
2850edeb
package
org
.
rcisoft
.
business
.
bcourse
.
dao
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.dto.QueryCourseResDTO
;
import
org.rcisoft.business.bcourse.entity.BCourse
;
import
org.rcisoft.core.base.BaseMapper
;
...
...
@@ -39,4 +40,12 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
@Select
(
"select * from b_course where course_level = 1 and del_flag != '1' and flag ='1'"
)
@ResultMap
(
value
=
"BaseResultMapDTO"
)
List
<
QueryCourseResDTO
>
queryFirstLevel
();
/**
* 查询所有分类存到List中
* @return
*/
@Select
(
"select * from b_course where del_flag != '1' and flag ='1'"
)
@ResultMap
(
value
=
"AllCourseResultMap"
)
List
<
AllCourseDTO
>
findAllCourse
();
}
src/main/java/org/rcisoft/business/bcourse/dto/AllCourseDTO.java
0 → 100644
View file @
2850edeb
package
org
.
rcisoft
.
business
.
bcourse
.
dto
;
import
lombok.Data
;
@Data
public
class
AllCourseDTO
{
private
String
businessId
;
private
String
cName
;
private
String
pid
;
private
String
courseLevel
;
}
src/main/java/org/rcisoft/business/bcourse/service/BCourseService.java
View file @
2850edeb
package
org
.
rcisoft
.
business
.
bcourse
.
service
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.dto.QueryCourseResDTO
;
import
org.rcisoft.business.bcourse.entity.BCourse
;
import
org.rcisoft.core.aop.PageUtil
;
...
...
@@ -21,5 +22,11 @@ public interface BCourseService {
PersistModel
updateCourse
(
BCourse
bCoursee
);
/**
* 查询所有分类放入List中
* @return
*/
List
<
AllCourseDTO
>
findAllCourse
();
}
src/main/java/org/rcisoft/business/bcourse/service/impl/BCourseServiceImpl.java
View file @
2850edeb
package
org
.
rcisoft
.
business
.
bcourse
.
service
.
impl
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.dto.QueryCourseResDTO
;
import
org.rcisoft.business.bcourse.entity.BCourse
;
import
org.rcisoft.business.bcourse.service.BCourseService
;
...
...
@@ -81,4 +82,9 @@ public class BCourseServiceImpl implements BCourseService {
return
new
PersistModel
(
bCourseRepository
.
updateByPrimaryKeySelective
(
bCourse
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
@Override
public
List
<
AllCourseDTO
>
findAllCourse
()
{
return
bCourseRepository
.
findAllCourse
();
}
}
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
2850edeb
...
...
@@ -4,9 +4,13 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.service.BCourseService
;
import
org.rcisoft.business.blesson.dto.AddLessonDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.blesson.dto.FirstPageQueryDTO
;
import
org.rcisoft.business.blesson.dto.LessonTrainDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.common.component.Global
;
...
...
@@ -26,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
...
...
@@ -39,6 +44,9 @@ public class BLessonController extends PaginationController<BLesson> {
@Autowired
private
BLessonService
bLessonService
;
@Autowired
private
BCourseService
bCourseService
;
@Autowired
private
Global
global
;
...
...
@@ -127,8 +135,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"608 分页查询最受关注"
,
notes
=
"分页查询最受关注"
)
@GetMapping
(
value
=
"/queryConcernByPagination"
)
public
Result
queryConcernByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
// String userId = curUser.getUserId();
public
Result
queryConcernByPagination
(
CurUser
curUser
)
{
bLessonService
.
queryConcernByPagination
(
getPaginationUtility
());
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
...
...
@@ -140,8 +147,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"609 分页查询可能感兴趣"
,
notes
=
"分页查询可能感兴趣"
)
@GetMapping
(
value
=
"/queryInterestedByPagination"
)
public
Result
queryInterestedByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
// String userId = curUser.getUserId();
public
Result
queryInterestedByPagination
(
CurUser
curUser
)
{
bLessonService
.
queryInterestedByPagination
(
getPaginationUtility
());
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
...
...
@@ -149,4 +155,42 @@ public class BLessonController extends PaginationController<BLesson> {
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
}
@ApiOperation
(
value
=
"610 首页分页查询全部课程"
,
notes
=
"根据条件分页查询全部课程"
)
@GetMapping
(
value
=
"/queryHomeBLessonsByPagination"
)
public
Result
queryHomeBLessonsByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
List
<
AllCourseDTO
>
allCourse
=
null
;
if
(
StringUtils
.
isNotEmpty
(
firstPageQueryDTO
.
getCourseLevelOne
())){
allCourse
=
bCourseService
.
findAllCourse
();
}
bLessonService
.
queryHomeBLessonsByPagination
(
getPaginationUtility
(),
firstPageQueryDTO
,
allCourse
);
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
}
@ApiOperation
(
value
=
"611 关闭课程"
,
notes
=
"根据ID关闭一个课程"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/close"
)
public
Result
close
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonService
.
closeBLesson
(
businessId
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@ApiOperation
(
value
=
"612 课程培训条件查询"
,
notes
=
"课程培训条件查询(工作台)"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/findLessonTrain"
)
public
Result
findLessonTrain
(
CurUser
curUser
,
@Valid
LessonTrainDTO
lessonTrainDTO
,
BindingResult
bindingResult
)
{
bLessonService
.
findLessonTrain
(
getPaginationUtility
(),
lessonTrainDTO
);
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
2850edeb
...
...
@@ -5,6 +5,7 @@ import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blesson.dto.BLessonIPublishDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.blesson.dto.FirstPageQueryDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.core.base.BaseMapper
;
...
...
@@ -69,11 +70,24 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@Delete
(
"<script>delete from b_lesson_label where lesson_id = #{businessId}</script>"
)
int
removeLabelByLessonId
(
BLesson
model
);
@Select
(
"<script>select * from b_lesson "
+
""
+
"where del_flag != 1 and flag = 1 and lecturer_id = #{lecturerId}"
+
"<if test=\"param.releaseState!=null and param.releaseState != ''\">and release_state = #{param.releaseState} </if>"
+
"order by update_date desc</script>"
)
/**
* 单一查询课程信息
* @param businessId
* @return
*/
@Select
(
" <script> select bl.* "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" ,bc.c_name courseName "
+
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" left join b_course bc on bc.business_id = bl.course_type "
+
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and bl.business_id = #{businessId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BLesson
selectInfoById
(
String
businessId
);
...
...
@@ -90,19 +104,18 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
// " left join b_course bc on bc.business_id = bl.course_type " +
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" <if test= \" code != null and code != ''\">and bl.code
=
CONCAT('%',#{code},'%') </if> "
+
" <if test= \" lessonName != null and lessonName != ''\">and bl.lesson_name
=
CONCAT('%',#{lessonName},'%') </if> "
+
" <if test= \" code != null and code != ''\">and bl.code
like
CONCAT('%',#{code},'%') </if> "
+
" <if test= \" lessonName != null and lessonName != ''\">and bl.lesson_name
like
CONCAT('%',#{lessonName},'%') </if> "
+
" <if test= \" releaseState !=null and releaseState != ''\">and bl.release_state = #{releaseState} </if> "
+
" <if test= \" createByName != null and createByName != ''\">and suc.name
=
CONCAT('%',#{createByName},'%') </if> "
+
" <if test= \" createByName != null and createByName != ''\">and suc.name
like
CONCAT('%',#{createByName},'%') </if> "
+
" <if test= \" courseType !=null and courseType != ''\">and bl.course_type = #{courseType} </if> "
+
" <if test= \" viewRange !=null and viewRange != ''\">and bl.view_range = #{viewRange} </if> "
+
" <if test= \" lessonType !=null and lessonType != ''\">and bl.lesson_type = #{lessonType} </if> "
+
" <if test= \" recommend !=null and recommend != ''\">and bl.recommend = #{recommend} </if> "
+
" <if test= \" lecturerName !=null and lecturerName != ''\">and bl.lesson_name
=
CONCAT('%',#{lecturerName},'%') </if> "
+
" <if test= \" lecturerName !=null and lecturerName != ''\">and bl.lesson_name
like
CONCAT('%',#{lecturerName},'%') </if> "
+
" order by bl.release_date desc"
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
@@ -141,7 +154,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" left join b_lesson bl on br.lesson_id = bl.business_id "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
// " left join b_course bc on bc.business_id = bl.course_type " +
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
...
...
@@ -199,5 +211,43 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and bls.business_id = #{lessonId} "
+
"</script>"
)
List
<
QueryLabelResDTO
>
queryLabelByLessonId
(
String
lessonId
);
@Select
(
" <script> select bl.* "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
// " left join b_course bc on bc.business_id = bl.course_type " +
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and bl.release_state = 2 "
+
" <if test= \" param.viewParam !=null and param.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{param.viewParam},'%') "
+
" or su.name like CONCAT('%',#{param.viewParam},'%'))</if> "
+
" <if test= \" courseIds !=null and courseIds.size() > 0 \">and course_type in "
+
" <foreach item='item' index='index' collection='courseIds' open='(' separator=',' close=')'> #{item} </foreach> "
+
" </if> "
+
" order by bl.person_number desc "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryHomeBLesson
(
@Param
(
"param"
)
FirstPageQueryDTO
firstPageQueryDTO
,
@Param
(
"courseIds"
)
List
<
String
>
sonCourseIds
);
/**
* 根据课程id关闭课程
* @param model
* @return
*/
@Update
({
"<script>"
,
"update b_lesson"
,
" <set>"
,
" <if test='updateBy != null'>update_by=#{updateBy},</if>"
,
" <if test='updateDate != null'>update_date=#{updateDate},</if>"
,
" release_state = '4'"
,
" </set>"
,
"where business_id=#{businessId}"
,
"</script>"
})
int
closeLesson
(
BLesson
model
);
}
src/main/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
View file @
2850edeb
...
...
@@ -13,20 +13,19 @@ public class AddLessonDTO {
@ApiModelProperty
(
value
=
"课程id"
)
private
String
businessId
;
@NotBlank
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@ApiModelProperty
(
value
=
"课程编号"
)
private
String
code
;
@NotBlank
@ApiModelProperty
(
value
=
"课程名称"
)
@ApiModelProperty
(
value
=
"课程名称"
,
required
=
true
)
@Length
(
min
=
1
,
max
=
200
,
message
=
"长度最小为1,最大为150"
)
private
String
lessonName
;
@ApiModelProperty
(
value
=
"默认封面图片url"
)
private
String
defaultUrl
;
@ApiModelProperty
(
value
=
"课程分类"
)
@ApiModelProperty
(
value
=
"课程分类"
,
required
=
true
)
@NotBlank
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
courseType
;
...
...
@@ -41,7 +40,7 @@ public class AddLessonDTO {
private
String
viewRange
;
@ApiModelProperty
(
value
=
"课程类型(0:课程 1:培训)"
)
@ApiModelProperty
(
value
=
"课程类型(0:课程 1:培训)"
,
required
=
true
)
@NotBlank
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
lessonType
;
...
...
src/main/java/org/rcisoft/business/blesson/dto/LessonTrainDTO.java
0 → 100644
View file @
2850edeb
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.persistence.Transient
;
@Data
public
class
LessonTrainDTO
{
@ApiModelProperty
(
value
=
"课程名称"
,
required
=
false
)
@Length
(
min
=
1
,
max
=
200
,
message
=
"长度最小为1,最大为150"
)
private
String
lessonName
;
@ApiModelProperty
(
value
=
"发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
releaseState
;
@ApiModelProperty
(
value
=
"创建人姓名"
)
@Transient
private
String
createByName
;
@ApiModelProperty
(
value
=
"课程类型(0:课程 1:培训)"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
lessonType
;
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
2850edeb
...
...
@@ -75,7 +75,7 @@ public class BLesson extends IdEntity<BLesson> {
private
Date
releaseDate
;
@ApiModelProperty
(
value
=
"课程类型(0:课程 1:培训)"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50
"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1
"
)
private
String
lessonType
;
@ApiModelProperty
(
value
=
"评论数"
)
...
...
@@ -106,11 +106,7 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
lecturerName
;
@ApiModelProperty
(
value
=
"是否学完"
)
@Transient
private
String
isLearnOver
;
@ApiModelProperty
(
value
=
"标签集合"
)
@ApiModelProperty
(
value
=
"接收标签集合 用‘,’分隔"
)
@Transient
private
String
labels
;
...
...
@@ -118,8 +114,12 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
createByName
;
@ApiModelProperty
(
value
=
"标签集合"
)
@ApiModelProperty
(
value
=
"
返回
标签集合"
)
@Transient
private
List
<
QueryLabelResDTO
>
labelList
;
@ApiModelProperty
(
value
=
"分类名"
)
@Transient
private
String
courseName
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
2850edeb
package
org
.
rcisoft
.
business
.
blesson
.
service
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.rcisoft.business.blesson.dto.AddLessonDTO
;
import
org.rcisoft.business.blesson.dto.BLessonIPublishDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
java.io.IOException
;
import
java.util.List
;
/**
...
...
@@ -88,16 +84,31 @@ public interface BLessonService{
PersistModel
persist
(
AddLessonDTO
model
);
/**
*
课程信息excel导入
* @param
hwb
*
逻辑删除
* @param
id
* @return
*/
PersistModel
importExcel
(
HSSFWorkbook
hwb
)
throws
IOException
;
PersistModel
removeBLesson
(
String
id
)
;
/**
* 逻辑删除
* 首页条件查询全部课程
* @return
*/
List
<
BLesson
>
queryHomeBLessonsByPagination
(
PageUtil
pageUtil
,
FirstPageQueryDTO
firstPageQueryDTO
,
List
<
AllCourseDTO
>
allCourse
);
/**
* 关闭课程
* @param id
* @return
*/
PersistModel
removeBLesson
(
String
id
);
PersistModel
closeBLesson
(
String
id
);
/**
* 课程培训条件查询
* @param pageUtil
* @param lessonTrainDTO
* @return
*/
List
<
BLesson
>
findLessonTrain
(
PageUtil
pageUtil
,
LessonTrainDTO
lessonTrainDTO
);
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
2850edeb
...
...
@@ -4,20 +4,18 @@ import com.alibaba.fastjson.JSON;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.blesson.dao.BLessonRepository
;
import
org.rcisoft.business.blesson.dto.AddLessonDTO
;
import
org.rcisoft.business.blesson.dto.BLessonIPublishDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.util.ExcelUtil
;
import
org.rcisoft.core.util.UserUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,7 +23,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -42,6 +39,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
private
BLessonRepository
bLessonRepository
;
@Autowired
private
BCourseRepository
bCourseRepository
;
@Autowired
private
Global
global
;
...
...
@@ -152,118 +152,6 @@ public class BLessonServiceImpl implements BLessonService {
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
PersistModel
importExcel
(
HSSFWorkbook
hwb
)
throws
IOException
{
ArrayList
<
BLesson
>
lessons
=
new
ArrayList
<
BLesson
>();
ArrayList
<
String
>
repeatCode
=
new
ArrayList
<
String
>();
List
<
String
>
errorCode
=
new
ArrayList
<>();
ArrayList
<
String
>
direction
=
new
ArrayList
<
String
>();
List
<
String
>
isChinese
=
new
ArrayList
<>();
List
<
String
>
isNegative
=
new
ArrayList
<>();
List
<
String
>
currentlyCode
=
new
ArrayList
<>();
String
innerRepeatResult
=
""
;
String
[]
headers
=
{
"课程编号"
,
"课程名称"
,
"课程方向编号"
,
"学时"
,
"学分"
};
ArrayList
<
String
[]>
values
=
ExcelUtil
.
importExcel
(
hwb
,
headers
,
false
,
1
);
//获取excel数据
if
(
values
.
size
()<
1
){
throw
new
ServiceException
(
ResultServiceEnums
.
EXCEL_IMPORT_DATA_NOT_EXIST
);
}
// for(String[] value:values){ //将数据封装到entity
// BLesson bLesson = null;
// String classCode = value[0];
//
// //判断编号是否含有中文
// if(TestChinese.isChinese(classCode)){
// isChinese.add(value[0]);
// continue;
// };
//
// //判断1:班级编号是否满足<15位;
// if(classCode.length()>15){
// //该用户不满足要求,记入valuesShort中
// errorCode.add(value[0]);
// continue;
// }
//
// if(Integer.parseInt(value[4])<0||Integer.parseInt(value[3])<0){
// //该用户不满足要求,记入valuesShort中
// isNegative.add(value[0]);
// continue;
// }
// if((bLesson=bLessonRepository.queryBLessonByCode(value[0]))!=null) {
// repeatCode.add(value[0]);
// continue;
// }
// BDirection b_direction = bDirectionRepository.selectOne(new BDirection(value[2]));
// if (b_direction == null) {
// if (!direction.contains(value[2]))
// direction.add(value[2]);
// continue;
// }
// bLesson= new BLesson(value[0],value[1],value[3],value[4]);
// bLesson.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
// UserUtil.setCurrentPersistOperation(bLesson);
// //表中去重
// if(currentlyCode.contains(bLesson.getCode())){
// innerRepeatResult += "编号 " + value[1] + " 在Excel中重复出现,除第一条以外的数据插入失败 \n";
// continue;
// }
// if(!lessons.contains(bLesson)){
// currentlyCode.add(bLesson.getCode());
// lessons.add(bLesson);
//
// BLessonDirection bDirection = new BLessonDirection();
// bDirection.setDirectionId(b_direction.getBusinessId());
// bDirection.setBusinessId(IdGen.uuid());
// bDirection.setLessionId(bLesson.getBusinessId());
// bDirectionRepository.insertBLessonDirection(bDirection);
// }
// }
String
result
=
""
;
if
(
lessons
.
size
()>
0
){
int
line
=
bLessonRepository
.
insertList
(
lessons
);
if
(
line
>
0
)
{
result
+=
"成功导入"
+
lessons
.
size
()+
"门课程。"
;
}
else
{
throw
new
ServiceException
(
ResultServiceEnums
.
EXCEL_IMPORT_DB_INSERT_ERROR
);
}
}
if
(
isNegative
.
size
()>
0
){
result
+=
"以下课程的学时或学分不能为负数:"
+
JSON
.
toJSONString
(
isNegative
)+
"。"
;
}
if
(
isChinese
.
size
()>
0
){
result
+=
"以下编号格式不正确:"
+
JSON
.
toJSONString
(
isChinese
)+
"。"
;
}
if
(
repeatCode
.
size
()>
0
){
result
+=
"以下课程编号存在重复:"
+
JSON
.
toJSONString
(
repeatCode
)+
"。"
;
}
if
(
errorCode
.
size
()>
0
){
result
+=
"以下课程编号超过15位:"
+
JSON
.
toJSONString
(
errorCode
)+
"。"
;
}
if
(
direction
.
size
()>
0
){
result
+=
"以下课程方向编号不存在:"
+
JSON
.
toJSONString
(
direction
)+
"。"
;
}
if
(
lessons
.
size
()<
1
){
throw
new
ServiceException
(
ResultServiceEnums
.
EXCEL_IMPORT_DATA_NOT_EXIST
.
getCode
(),
result
);
}
return
new
PersistModel
(
1
,
result
+
innerRepeatResult
);
}
public
PersistModel
importPic
(
HSSFWorkbook
hwb
)
throws
IOException
{
return
null
;
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
PersistModel
removeBLesson
(
String
id
)
{
...
...
@@ -283,6 +171,30 @@ public class BLessonServiceImpl implements BLessonService {
}
@Override
public
List
<
BLesson
>
queryHomeBLessonsByPagination
(
PageUtil
pageUtil
,
FirstPageQueryDTO
firstPageQueryDTO
,
List
<
AllCourseDTO
>
allCourse
)
{
List
<
String
>
sonCourseIds
=
null
;
if
(
allCourse
!=
null
){
sonCourseIds
=
recursion
.
FindSons
(
firstPageQueryDTO
.
getCourseLevelOne
(),
allCourse
);
}
return
bLessonRepository
.
queryHomeBLesson
(
firstPageQueryDTO
,
sonCourseIds
);
}
@Override
public
PersistModel
closeBLesson
(
String
id
)
{
BLesson
bLesson
=
new
BLesson
();
bLesson
.
setBusinessId
(
id
);
UserUtil
.
setCurrentMergeOperation
(
bLesson
);
int
line
=
bLessonRepository
.
closeLesson
(
bLesson
);
//int line = bLessonRepository.deleteByPrimaryKey(id);
return
new
PersistModel
(
line
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
@Override
public
List
<
BLesson
>
findLessonTrain
(
PageUtil
pageUtil
,
LessonTrainDTO
lessonTrainDTO
)
{
return
null
;
}
private
Map
<
String
,
Object
>
queryParamHandler
(
BLesson
model
){
Map
param
=
new
HashMap
<
String
,
Object
>();
if
(
model
.
getLessonName
()!=
null
)
...
...
src/main/java/org/rcisoft/business/blesson/util/recursion.java
0 → 100644
View file @
2850edeb
package
org
.
rcisoft
.
business
.
blesson
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
public
class
recursion
{
/**
* 查找当前分类下 多级子分类
* @param fatherId
* @param allCourse
* @return
*/
public
static
List
<
String
>
FindSons
(
String
fatherId
,
List
<
AllCourseDTO
>
allCourse
){
List
<
String
>
sonList
=
new
ArrayList
<>();
for
(
AllCourseDTO
course:
allCourse
){
if
(
course
.
getPid
()
!=
null
&&
!(
"00000000"
.
equals
(
course
.
getPid
()))
&&
course
.
getPid
().
equals
(
fatherId
)){
sonList
.
add
(
course
.
getBusinessId
());
sonList
.
addAll
(
recursion
.
FindSons
(
course
.
getBusinessId
(),
allCourse
));
}
}
return
sonList
;
}
}
src/main/java/org/rcisoft/business/blessonperson/controller/BLessonPersonController.java
View file @
2850edeb
package
org
.
rcisoft
.
business
.
blessonperson
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.validation.Valid
;
@Api
(
tags
=
"9 学生-课程"
)
@RestController
@RequestMapping
(
"/BLessonPerson"
)
@Slf4j
...
...
@@ -32,7 +34,7 @@ public class BLessonPersonController extends PaginationController<BLesson> {
@Autowired
private
BLessonPersonService
bLessonPersonService
;
@ApiOperation
(
value
=
"退出课程"
,
notes
=
"根据ID停用一条记录"
)
@ApiOperation
(
value
=
"
901
退出课程"
,
notes
=
"根据ID停用一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"退出课程的选课id"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/quit"
)
public
Result
remove
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
...
...
@@ -43,7 +45,7 @@ public class BLessonPersonController extends PaginationController<BLesson> {
businessId
);
}
@ApiOperation
(
value
=
"分页查询我学习"
,
notes
=
"分页查询我学习"
)
@ApiOperation
(
value
=
"
902
分页查询我学习"
,
notes
=
"分页查询我学习"
)
@GetMapping
(
value
=
"/queryLearnBLessonsByPagination"
)
public
Result
queryLearnBLessonsByPagination
(
CurUser
curUser
,
@Valid
ILearnLessonDTO
param
,
BindingResult
bindingResult
)
{
String
userId
=
curUser
.
getUserId
();
...
...
src/main/java/org/rcisoft/business/blessonperson/dao/BLessonPersonRepository.java
View file @
2850edeb
...
...
@@ -25,7 +25,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and bl.release_state = '2' and blp.person_id = #{userId} "
+
// " and bl.release_state = '2' " +
" and blp.person_id = #{userId} "
+
" <if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> "
+
" <if test= \" param.lessonType !=null and param.lessonType != ''\">and bl.lesson_type = #{param.lessonType} </if> "
+
" order by blp.update_date desc</script>"
)
...
...
src/main/java/org/rcisoft/sys/user/controller/SysUserController.java
View file @
2850edeb
...
...
@@ -16,6 +16,7 @@ import org.rcisoft.core.util.UserUtil;
import
org.rcisoft.sys.menu.entity.SysMenu
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dao.SysUserMapper
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.service.SysUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -49,8 +50,8 @@ public class SysUserController extends PaginationController<SysUser> {
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"用户启用状态 0未启用 1启用"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"roleName"
,
value
=
"用户角色"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryUsers"
)
public
GridModel
queryUsers
(
CurUser
curUser
,
@Valid
SysUser
sysUser
,
BindingResult
br
)
{
userServiceImpl
.
queryUsersByPagination
(
getPaginationUtility
(),
sysUser
);
public
GridModel
queryUsers
(
CurUser
curUser
,
@Valid
QuerySysUserDTO
dto
,
BindingResult
br
)
{
userServiceImpl
.
queryUsersByPagination
(
getPaginationUtility
(),
dto
);
GridModel
gridModel
=
getGridModelResponse
();
return
gridModel
;
}
...
...
@@ -67,16 +68,16 @@ public class SysUserController extends PaginationController<SysUser> {
id
);
}
@ApiOperation
(
value
=
"703 删除用户"
,
notes
=
"删除用户"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"用户id"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@PostMapping
(
value
=
"/delete"
)
public
Result
roleDelete
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
int
line
=
userServiceImpl
.
removeUser
(
businessId
);
return
Result
.
builder
(
new
PersistModel
(
line
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//
@ApiOperation(value = "703 删除用户", notes = "删除用户")
//
@ApiImplicitParam(name = "businessId", value = "用户id", required = true, dataType = "varchar", paramType = "path")
//
@PostMapping(value = "/delete")
//
public Result roleDelete(CurUser curUser, @Valid String businessId, BindingResult br) {
//
int line = userServiceImpl.removeUser(businessId);
//
return Result.builder(new PersistModel(line),
//
MessageConstant.MESSAGE_ALERT_SUCCESS,
//
MessageConstant.MESSAGE_ALERT_ERROR,
//
businessId);
//
}
@ApiOperation
(
value
=
"704 停用用户"
,
notes
=
"停用用户"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"用户Id(批量操作时 id用,隔开)"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
...
...
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
View file @
2850edeb
...
...
@@ -3,6 +3,7 @@ package org.rcisoft.sys.user.dao;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.entity.UserRole
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -15,8 +16,7 @@ import java.util.List;
@Repository
public
interface
SysUserMapper
extends
BaseMapper
<
SysUser
>
{
@Select
(
"<script>select su.* ,sr.role_name as role_name from s_user as su "
+
@Select
(
"<script>select su.* ,sr.role_name as roleList from s_user as su "
+
"left join s_r_user_role as ru on su.business_id = ru.user_id "
+
"left join s_role as sr on ru.role_id = sr.business_id "
+
"where su.del_flag = 0"
+
...
...
@@ -24,7 +24,15 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"<if test=\"roleName!=null and roleName != ''\"> and sr.role_name = #{roleName}</if>"
+
"<if test=\"flag!=null and flag != ''\"> and su.flag = #{flag}</if></script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
SysUser
>
queryUsers
(
SysUser
sysUser
);
List
<
SysUser
>
queryUsers
(
QuerySysUserDTO
dto
);
@Select
(
"<script>SELECT sr.role_name AS roleList "
+
"FROM s_user AS su "
+
"LEFT JOIN s_r_user_role AS ru ON su.business_id = ru.user_id "
+
"LEFT JOIN s_role AS sr ON ru.role_id = sr.business_id "
+
"WHERE su.del_flag = 0 "
+
"AND su.business_id = #{businessId}</script>"
)
List
<
String
>
queryRoleByUserId
(
@Param
(
"businessId"
)
String
businessId
);
@Update
(
"<script> update s_user set flag = '1' where business_id in"
+
"<foreach item='item' index='index' collection='businessId' open='(' separator=',' close=')'> #{item} </foreach> "
+
...
...
src/main/java/org/rcisoft/sys/user/dto/QuerySysUserDTO.java
0 → 100644
View file @
2850edeb
package
org
.
rcisoft
.
sys
.
user
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
@Data
public
class
QuerySysUserDTO
{
@ApiModelProperty
(
value
=
"用户名(模糊查询条件)"
)
private
String
name
;
@ApiModelProperty
(
value
=
"用户启用状态 0未启用 1启用"
)
private
String
flag
;
@ApiModelProperty
(
value
=
"用户角色"
)
private
String
roleName
;
@ApiModelProperty
(
value
=
"部门(暂时不用)"
)
private
String
dept
;
}
src/main/java/org/rcisoft/sys/user/entity/SysUser.java
View file @
2850edeb
...
...
@@ -55,9 +55,6 @@ public class SysUser extends IdEntity<SysUser> {
@Transient
private
String
roleId
;
@Transient
private
String
roleName
;
@Transient
private
String
agencyName
;
...
...
src/main/java/org/rcisoft/sys/user/service/SysUserService.java
View file @
2850edeb
...
...
@@ -6,6 +6,7 @@ import org.rcisoft.core.aop.PageUtil;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.sys.menu.entity.SysMenu
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
java.util.List
;
...
...
@@ -18,7 +19,7 @@ public interface SysUserService {
String
checkPassword
(
String
userId
);
List
<
SysUser
>
queryUsersByPagination
(
PageUtil
pageUtil
,
SysUser
sysUser
);
List
<
SysUser
>
queryUsersByPagination
(
PageUtil
pageUtil
,
QuerySysUserDTO
dto
);
int
removeUser
(
String
id
);
...
...
src/main/java/org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
View file @
2850edeb
...
...
@@ -10,6 +10,7 @@ import org.rcisoft.sys.menu.dao.SysMenuRepository;
import
org.rcisoft.sys.menu.entity.SysMenu
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dao.SysUserMapper
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.entity.UserRole
;
import
org.rcisoft.sys.user.service.SysUserService
;
...
...
@@ -39,8 +40,8 @@ public class SysUserServiceImpl implements SysUserService {
private
Global
global
;
@Override
public
List
<
SysUser
>
queryUsersByPagination
(
PageUtil
pageUtil
,
SysUser
sysUser
)
{
return
sysUserMapper
.
queryUsers
(
sysUser
);
public
List
<
SysUser
>
queryUsersByPagination
(
PageUtil
pageUtil
,
QuerySysUserDTO
dto
)
{
return
sysUserMapper
.
queryUsers
(
dto
);
}
@Override
...
...
src/main/resources/application-dev.yml
View file @
2850edeb
...
...
@@ -14,7 +14,7 @@ server:
druid
:
# url: jdbc:mysql://127.0.0.1:3306/edu_db0917?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/
new_
edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
#url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
password
:
root
...
...
src/main/resources/mapper/business/bcourse.mapper/BCourseMapper.xml
View file @
2850edeb
...
...
@@ -24,4 +24,12 @@
<resultMap
id=
"ChildListResultMap"
type=
"org.rcisoft.business.bcourse.dto.QueryCourseResDTO"
extends=
"BaseResultMapDTO"
>
<association
column=
"business_id"
property=
"childList"
select=
"org.rcisoft.business.bcourse.dao.BCourseRepository.queryCoursesByPid"
></association>
</resultMap>
<resultMap
id=
"AllCourseResultMap"
type=
"org.rcisoft.business.bcourse.dto.AllCourseDTO"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"c_name"
jdbcType=
"VARCHAR"
property=
"cName"
/>
<result
column=
"pid"
jdbcType=
"VARCHAR"
property=
"pid"
/>
<result
column=
"course_level"
jdbcType=
"VARCHAR"
property=
"courseLevel"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapper/sys/user/mapper/UserMapper.xml
View file @
2850edeb
...
...
@@ -17,7 +17,11 @@
<result
column=
"FLAG"
property=
"flag"
jdbcType=
"VARCHAR"
/>
<result
column=
"update_date"
property=
"updateDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_date"
property=
"createDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"role_name"
property=
"roleName"
jdbcType=
"VARCHAR"
/>
<!-- <result column="role_name" property="roleName" jdbcType="VARCHAR" />-->
<collection
property=
"roleList"
ofType=
"org.rcisoft.sys.user.entity.SysUser"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.sys.user.dao.SysUserMapper.queryRoleByUserId"
column=
"business_id"
>
</collection>
</resultMap>
<select
id=
"selectByTeacherCode"
parameterType=
"java.util.List"
resultMap=
"BaseResultMap"
>
...
...
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