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
c9d18907
Commit
c9d18907
authored
Oct 11, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
479754df
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
243 additions
and
79 deletions
+243
-79
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+19
-9
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+4
-4
BRecommendRepository.java
...rg/rcisoft/business/blesson/dao/BRecommendRepository.java
+42
-12
BViewrangeRepository.java
...rg/rcisoft/business/blesson/dao/BViewrangeRepository.java
+9
-7
AppointLessonDTO.java
...va/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
+19
-0
RecommendLessonDTO.java
.../org/rcisoft/business/blesson/dto/RecommendLessonDTO.java
+5
-1
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+1
-1
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+8
-1
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+114
-43
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+1
-1
BRecommendMapper.xml
...urces/mapper/business/blesson/mapper/BRecommendMapper.xml
+20
-0
BViewrangeMapper.xml
...urces/mapper/business/blesson/mapper/BViewrangeMapper.xml
+1
-0
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
c9d18907
...
@@ -308,13 +308,23 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -308,13 +308,23 @@ public class BLessonController extends PaginationController<BLesson> {
}
}
// @ApiOperation(value="622 推荐课程", notes="根据ID推荐课程")
@ApiOperation
(
value
=
"622 推荐课程"
,
notes
=
"根据ID推荐课程"
)
// @PostMapping(value = "/recommend")
@PostMapping
(
value
=
"/recommend"
)
// public Result recommend(CurUser curUser,@Valid RecommendLessonDTO recommendLessonDTO,BindingResult bindingResult) {
public
Result
recommend
(
CurUser
curUser
,
@Valid
RecommendLessonDTO
recommendLessonDTO
,
BindingResult
bindingResult
)
{
// PersistModel data = bLessonService.recommendBLesson(curUser,recommendLessonDTO);
PersistModel
data
=
bLessonService
.
recommendBLesson
(
recommendLessonDTO
);
// return Result.builder(data,
return
Result
.
builder
(
data
,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
// MessageConstant.MESSAGE_ALERT_ERROR,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
// recommendLessonDTO);
recommendLessonDTO
);
// }
}
@ApiOperation
(
value
=
"623 指派课程"
,
notes
=
"根据ID指派课程"
)
@PostMapping
(
value
=
"/appointLessonToPerson"
)
public
Result
appointLessonToPerson
(
CurUser
curUser
,
@Valid
AppointLessonDTO
appointLessonDTO
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonService
.
appointLessonToPerson
(
appointLessonDTO
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
appointLessonDTO
);
}
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
c9d18907
...
@@ -79,12 +79,12 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -79,12 +79,12 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" blp.finish_date finishDate "
+
" blp.finish_date finishDate "
+
"from b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
"from b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
"left join s_user su on blp.person_id = su.business_id "
+
"left join s_user su on blp.person_id = su.business_id "
+
// "left join b_appoint ba on ba.business_id = ifnull(blp.appoint_id,'null') " +
"left join b_appoint ba on ba.business_id = blp.appoint_id "
+
"left join b_appoint ba on ba.lesson_id = bl.business_id "
+
"and ba.del_flag != 1 and ba.flag = 1 "
+
// "left join b_appoint ba on ba.lesson_id = bl.business_id " +
"where blp.del_flag != 1 and blp.flag = 1 "
+
"where blp.del_flag != 1 and blp.flag = 1 "
+
"and bl.del_flag != 1 and bl.flag = 1 "
+
"and bl.del_flag != 1 and bl.flag = 1 "
+
"and su.del_flag != 1 and su.flag = 1 "
+
"and su.del_flag != 1 and su.flag = 1 "
+
"and ba.del_flag != 1 and ba.flag = 1 "
+
"and bl.corp_id = #{param.corpId} "
+
"and bl.corp_id = #{param.corpId} "
+
// "and blp.corp_id = #{param.corpId} "+
// "and blp.corp_id = #{param.corpId} "+
...
...
src/main/java/org/rcisoft/business/blesson/dao/BRecommendRepository.java
View file @
c9d18907
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.blesson.entity.BRecommend
;
import
org.rcisoft.business.blesson.entity.BRecommend
;
import
org.rcisoft.business.blesson.entity.BRecommendSon
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -15,15 +15,45 @@ import java.util.List;
...
@@ -15,15 +15,45 @@ import java.util.List;
@Repository
@Repository
public
interface
BRecommendRepository
extends
BaseMapper
<
BRecommend
>
{
public
interface
BRecommendRepository
extends
BaseMapper
<
BRecommend
>
{
// /**
/**
// * 分页查询 bRecommend
* 分页查询 bRecommend
// *
*
// */
*/
// @Select("<script>select * from b_recommend where 1=1 "
@Select
(
"<script>select * from b_recommend where 1=1 "
// + "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+
"<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
// + "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+
"<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
// + "</script>")
+
"</script>"
)
// @ResultMap(value = "BaseResultMap" )
@ResultMap
(
value
=
"BaseResultMap"
)
// List<BRecommend> queryBRecommends(BRecommend bRecommend);
List
<
BRecommend
>
queryBRecommends
(
BRecommend
bRecommend
);
@Update
({
"<script>"
,
" update b_recommend"
,
" <set>"
,
" <if test='updateBy != null'>update_by=#{updateBy},</if> "
,
" <if test='updateDate != null'>update_date=#{updateDate},</if> "
,
" <if test='delFlag != null'>del_flag=#{delFlag},</if> "
,
" <if test='flag != null'>flag=#{flag},</if> "
,
" <if test='remarks != null'>remarks=#{remarks},</if> "
,
" <if test='recommend_person != null'>recommend_person=#{recommendPerson},</if> "
,
" <if test='lesson_id != null'>lesson_id=#{lessonId},</if> "
,
" <if test='type != null'>type=#{type},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp_id},</if> "
,
" </set>"
,
" where lesson_id=#{lessonId} "
,
"</script>"
})
int
updateByLessonId
(
BRecommend
bRecommend
);
@Delete
(
"<script>DELETE from b_recommend_son where recommend_id=#{businessId}</script>"
)
int
deleteRecommendSon
(
BRecommend
bRecommend
);
@Select
(
"<script>select business_id from b_recommend where lesson_id = #{lessonId}</script>"
)
List
<
String
>
selectIdByLessonId
(
String
lessonId
);
@Insert
(
"<script>INSERT INTO b_recommend_son"
+
"(business_id,recommend_id,type,target_id)VALUES"
+
"<foreach collection=\"list\" item=\"item\" separator=\",\">"
+
"(#{item.businessId},#{item.recommendId},#{item.type},#{item.targetId})"
+
"</foreach></script>"
)
int
insertBRecommendSons
(
List
<
BRecommendSon
>
bRecommendSons
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BViewrangeRepository.java
View file @
c9d18907
...
@@ -27,14 +27,16 @@ public interface BViewrangeRepository extends BaseMapper<BViewrange> {
...
@@ -27,14 +27,16 @@ public interface BViewrangeRepository extends BaseMapper<BViewrange> {
List
<
BViewrange
>
queryBViewranges
(
BViewrange
bViewrange
);
List
<
BViewrange
>
queryBViewranges
(
BViewrange
bViewrange
);
@Update
({
"<script>"
,
@Update
({
"<script>"
,
"update b_
banner
"
,
"update b_
viewrange
"
,
" <set>"
,
" <set>"
,
" <if test='updateBy != null'>update_by=#{updateBy},</if>"
,
" <if test='updateBy != null'>update_by=#{updateBy},</if> "
,
" <if test='updateDate != null'>update_date=#{updateDate},</if>"
,
" <if test='updateDate != null'>update_date=#{updateDate},</if> "
,
" <if test='delFlag != null'>del_flag=#{delFlag},</if>"
,
" <if test='delFlag != null'>del_flag=#{delFlag},</if> "
,
" <if test='flag != null'>flag=#{flag},</if>"
,
" <if test='flag != null'>flag=#{flag},</if> "
,
" <if test='remarks != null'>remarks=#{remarks},</if>"
,
" <if test='remarks != null'>remarks=#{remarks},</if> "
,
" <if test='type != null'>title=#{type},</if>"
,
" <if test='lesson_id != null'>lesson_id=#{lessonId},</if> "
,
" <if test='type != null'>type=#{type},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp_id},</if> "
,
" </set>"
,
" </set>"
,
"where lesson_id=#{lessonId}"
,
"where lesson_id=#{lessonId}"
,
"</script>"
})
"</script>"
})
...
...
src/main/java/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
0 → 100644
View file @
c9d18907
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
AppointLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
@ApiModelProperty
(
value
=
"推荐范围(人)多人之间用','隔开"
,
required
=
true
)
private
String
appointPerson
;
private
String
userId
;
private
String
corpId
;
}
src/main/java/org/rcisoft/business/blesson/dto/RecommendLessonDTO.java
View file @
c9d18907
...
@@ -6,7 +6,7 @@ import lombok.Data;
...
@@ -6,7 +6,7 @@ import lombok.Data;
@Data
@Data
public
class
RecommendLessonDTO
{
public
class
RecommendLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
)
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
String
lessonId
;
@ApiModelProperty
(
value
=
"推荐范围(人)多人之间用','隔开"
)
@ApiModelProperty
(
value
=
"推荐范围(人)多人之间用','隔开"
)
...
@@ -14,4 +14,8 @@ public class RecommendLessonDTO {
...
@@ -14,4 +14,8 @@ public class RecommendLessonDTO {
@ApiModelProperty
(
value
=
"推荐范围(部门)多人之间用','隔开"
)
@ApiModelProperty
(
value
=
"推荐范围(部门)多人之间用','隔开"
)
private
String
recommendDepart
;
private
String
recommendDepart
;
private
String
userId
;
private
String
corpId
;
}
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
c9d18907
...
@@ -47,7 +47,7 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -47,7 +47,7 @@ public class BLesson extends IdEntity<BLesson> {
private
String
defaultUrl
;
private
String
defaultUrl
;
@ApiModelProperty
(
value
=
"课时"
)
@ApiModelProperty
(
value
=
"课时"
)
@Length
(
min
=
1
,
max
=
8
,
message
=
"长度最小为1,最大为5"
)
//
@Length(min = 1,max = 8,message = "长度最小为1,最大为5")
private
String
classHour
;
private
String
classHour
;
@ApiModelProperty
(
value
=
"讲师id"
)
@ApiModelProperty
(
value
=
"讲师id"
)
...
...
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
c9d18907
...
@@ -116,7 +116,14 @@ public interface BLessonService{
...
@@ -116,7 +116,14 @@ public interface BLessonService{
* @param recommendLessonDTO
* @param recommendLessonDTO
* @return
* @return
*/
*/
PersistModel
recommendBLesson
(
CurUser
curUser
,
RecommendLessonDTO
recommendLessonDTO
);
PersistModel
recommendBLesson
(
RecommendLessonDTO
recommendLessonDTO
);
/**
* 指派课程
* @param appointLessonDTO
* @return
*/
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
);
/**
/**
* 课程培训条件查询
* 课程培训条件查询
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
c9d18907
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
c9d18907
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<result
column=
"collect_number"
jdbcType=
"VARCHAR"
property=
"collectNumber"
/>
<result
column=
"collect_number"
jdbcType=
"VARCHAR"
property=
"collectNumber"
/>
<result
column=
"hot_number"
jdbcType=
"VARCHAR"
property=
"hotNumber"
/>
<result
column=
"hot_number"
jdbcType=
"VARCHAR"
property=
"hotNumber"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.bl
esson.entity.BLesson
"
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.bl
abel.dto.QueryLabelResDTO
"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"
column=
"business_id"
>
column=
"business_id"
>
</collection>
</collection>
...
...
src/main/resources/mapper/business/blesson/mapper/BRecommendMapper.xml
0 → 100644
View file @
c9d18907
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.rcisoft.business.blesson.dao.BRecommendRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.blesson.entity.BRecommend"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"recommend_person"
jdbcType=
"VARCHAR"
property=
"recommendPerson"
/>
<result
column=
"lesson_id"
jdbcType=
"VARCHAR"
property=
"lessonId"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"corp_id"
jdbcType=
"VARCHAR"
property=
"corpId"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
src/main/resources/mapper/business/blesson/mapper/BViewrangeMapper.xml
View file @
c9d18907
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"lesson_id"
jdbcType=
"VARCHAR"
property=
"lessonId"
/>
<result
column=
"lesson_id"
jdbcType=
"VARCHAR"
property=
"lessonId"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"corp_id"
jdbcType=
"VARCHAR"
property=
"corpId"
/>
</resultMap>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
...
...
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