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
6cc7dd99
Commit
6cc7dd99
authored
Sep 25, 2019
by
王淑君
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
931cc1ee
b4e00f70
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
192 additions
and
65 deletions
+192
-65
BBannerController.java
...cisoft/business/bbanner/controller/BBannerController.java
+7
-8
BBannerRepository.java
...a/org/rcisoft/business/bbanner/dao/BBannerRepository.java
+2
-1
FindBannerPaginDTO.java
.../org/rcisoft/business/bbanner/dto/FindBannerPaginDTO.java
+1
-1
BChapterController.java
...soft/business/bchapter/controller/BChapterController.java
+5
-4
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+5
-0
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+4
-1
BCourseController.java
...cisoft/business/bcourse/controller/BCourseController.java
+7
-6
BFileController.java
...rg/rcisoft/business/bfile/controller/BFileController.java
+3
-1
BLabelController.java
.../rcisoft/business/blabel/controller/BLabelController.java
+9
-8
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+36
-10
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+36
-0
FirstPageQueryDTO.java
...a/org/rcisoft/business/blesson/dto/FirstPageQueryDTO.java
+18
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+15
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+9
-0
MvcConfig.java
src/main/java/org/rcisoft/config/MvcConfig.java
+9
-4
SysUserController.java
...va/org/rcisoft/sys/user/controller/SysUserController.java
+14
-14
SysUserMapper.java
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
+4
-2
SysUserServiceImpl.java
...org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
+8
-5
No files found.
src/main/java/org/rcisoft/business/bbanner/controller/BBannerController.java
View file @
6cc7dd99
...
@@ -31,7 +31,7 @@ import javax.validation.Valid;
...
@@ -31,7 +31,7 @@ import javax.validation.Valid;
* @date 2019/9/11
* @date 2019/9/11
*/
*/
@Api
(
tags
=
"Banner接口"
)
@Api
(
tags
=
"
1
Banner接口"
)
@RestController
@RestController
@RequestMapping
(
"/Banner"
)
@RequestMapping
(
"/Banner"
)
@Slf4j
@Slf4j
...
@@ -40,7 +40,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -40,7 +40,7 @@ public class BBannerController extends PaginationController<BBanner> {
@Autowired
@Autowired
private
BBannerService
bBannerService
;
private
BBannerService
bBannerService
;
@ApiOperation
(
value
=
"添加/编辑Banner"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiOperation
(
value
=
"
101
添加/编辑Banner"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
AddOrUpdateDTO
addOrUpdateDTO
,
BindingResult
bindingResult
)
{
public
Result
add
(
CurUser
curUser
,
@Valid
AddOrUpdateDTO
addOrUpdateDTO
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bBannerService
.
persist
(
addOrUpdateDTO
);
PersistModel
data
=
bBannerService
.
persist
(
addOrUpdateDTO
);
...
@@ -51,7 +51,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -51,7 +51,7 @@ public class BBannerController extends PaginationController<BBanner> {
}
}
@ApiOperation
(
value
=
"删除Banner"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"
102
删除Banner"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
public
Result
remove
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
...
@@ -63,7 +63,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -63,7 +63,7 @@ public class BBannerController extends PaginationController<BBanner> {
}
}
@ApiOperation
(
value
=
"唯一查找"
,
notes
=
"根据ID查找一条记录"
)
@ApiOperation
(
value
=
"
103
唯一查找"
,
notes
=
"根据ID查找一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/one"
)
@GetMapping
(
value
=
"/one"
)
public
Result
queryOne
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
public
Result
queryOne
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
...
@@ -74,7 +74,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -74,7 +74,7 @@ public class BBannerController extends PaginationController<BBanner> {
}
}
@ApiOperation
(
value
=
"分页获取banner"
,
notes
=
"根据条件分页查询"
)
@ApiOperation
(
value
=
"
104
分页获取banner"
,
notes
=
"根据条件分页查询"
)
@GetMapping
(
value
=
"/queryBBannerByPagination"
)
@GetMapping
(
value
=
"/queryBBannerByPagination"
)
public
Result
queryBBannerByPagination
(
CurUser
curUser
,
@Valid
FindBannerPaginDTO
param
,
BindingResult
bindingResult
)
{
public
Result
queryBBannerByPagination
(
CurUser
curUser
,
@Valid
FindBannerPaginDTO
param
,
BindingResult
bindingResult
)
{
bBannerService
.
queryBannerByPagination
(
getPaginationUtility
(),
param
);
bBannerService
.
queryBannerByPagination
(
getPaginationUtility
(),
param
);
...
@@ -86,7 +86,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -86,7 +86,7 @@ public class BBannerController extends PaginationController<BBanner> {
}
}
@ApiOperation
(
value
=
"Banner向上调顺序"
,
notes
=
"Banner向上调顺序"
)
@ApiOperation
(
value
=
"
105
Banner向上调顺序"
,
notes
=
"Banner向上调顺序"
)
@PostMapping
(
value
=
"/updateTopBanner"
)
@PostMapping
(
value
=
"/updateTopBanner"
)
public
Result
updateTopBanner
(
CurUser
curUser
,
@Valid
TopDownDTO
topDownDTO
,
BindingResult
bindingResult
){
public
Result
updateTopBanner
(
CurUser
curUser
,
@Valid
TopDownDTO
topDownDTO
,
BindingResult
bindingResult
){
int
data
=
bBannerService
.
updateTopChapter
(
topDownDTO
);
int
data
=
bBannerService
.
updateTopChapter
(
topDownDTO
);
...
@@ -97,7 +97,7 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -97,7 +97,7 @@ public class BBannerController extends PaginationController<BBanner> {
}
}
@ApiOperation
(
value
=
"Banner向下调顺序"
,
notes
=
"Banner向下调顺序"
)
@ApiOperation
(
value
=
"
106
Banner向下调顺序"
,
notes
=
"Banner向下调顺序"
)
@PostMapping
(
value
=
"/updateDownBanner"
)
@PostMapping
(
value
=
"/updateDownBanner"
)
public
Result
updateDownBanner
(
CurUser
curUser
,
@Valid
TopDownDTO
topDownDTO
,
BindingResult
bindingResult
){
public
Result
updateDownBanner
(
CurUser
curUser
,
@Valid
TopDownDTO
topDownDTO
,
BindingResult
bindingResult
){
int
data
=
bBannerService
.
updateDownChapter
(
topDownDTO
);
int
data
=
bBannerService
.
updateDownChapter
(
topDownDTO
);
...
@@ -107,5 +107,4 @@ public class BBannerController extends PaginationController<BBanner> {
...
@@ -107,5 +107,4 @@ public class BBannerController extends PaginationController<BBanner> {
topDownDTO
);
topDownDTO
);
}
}
}
}
src/main/java/org/rcisoft/business/bbanner/dao/BBannerRepository.java
View file @
6cc7dd99
...
@@ -52,7 +52,8 @@ public interface BBannerRepository extends BaseMapper<BBanner> {
...
@@ -52,7 +52,8 @@ public interface BBannerRepository extends BaseMapper<BBanner> {
* 获取sort最大值 +1
* 获取sort最大值 +1
* @return
* @return
*/
*/
@Select
(
"<script> </script>"
)
@Select
(
"<script>select DISTINCT IFNULL((select max(sort) from b_banner where "
+
"del_flag = 0 and flag = 1 ),0)+1 as sort</script>"
)
int
selectMaxSort
();
int
selectMaxSort
();
/**
/**
...
...
src/main/java/org/rcisoft/business/bbanner/dto/FindBannerPaginDTO.java
View file @
6cc7dd99
...
@@ -7,7 +7,7 @@ import lombok.Data;
...
@@ -7,7 +7,7 @@ import lombok.Data;
@Data
@Data
public
class
FindBannerPaginDTO
{
public
class
FindBannerPaginDTO
{
@ApiModelProperty
(
value
=
"主键bannerId"
,
required
=
tru
e
,
dataType
=
"varchar"
)
@ApiModelProperty
(
value
=
"主键bannerId"
,
required
=
fals
e
,
dataType
=
"varchar"
)
private
String
businessId
;
private
String
businessId
;
@ApiModelProperty
(
value
=
"标题"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiModelProperty
(
value
=
"标题"
,
required
=
false
,
dataType
=
"varchar"
)
...
...
src/main/java/org/rcisoft/business/bchapter/controller/BChapterController.java
View file @
6cc7dd99
...
@@ -48,6 +48,7 @@ import java.util.Map;
...
@@ -48,6 +48,7 @@ import java.util.Map;
/**
/**
* Created by gwf on 2017-7-21 15:08:47.
* Created by gwf on 2017-7-21 15:08:47.
*/
*/
@Api
(
tags
=
"2 章节"
)
@RestController
@RestController
@RequestMapping
(
"/BChapter"
)
@RequestMapping
(
"/BChapter"
)
@Slf4j
@Slf4j
...
@@ -63,7 +64,7 @@ public class BChapterController extends PaginationController<BChapter> {
...
@@ -63,7 +64,7 @@ public class BChapterController extends PaginationController<BChapter> {
@Autowired
@Autowired
private
Global
global
;
private
Global
global
;
@ApiOperation
(
value
=
"添加/编辑章节"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiOperation
(
value
=
"
201
添加/编辑章节"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程id 修改章节时传入"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程id 修改章节时传入"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"课程ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"课程ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"chapterName"
,
value
=
"章节名"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"chapterName"
,
value
=
"章节名"
,
required
=
true
,
dataType
=
"varchar"
),
...
@@ -80,7 +81,7 @@ public class BChapterController extends PaginationController<BChapter> {
...
@@ -80,7 +81,7 @@ public class BChapterController extends PaginationController<BChapter> {
}
}
@ApiOperation
(
value
=
"删除章节"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"
202
删除章节"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
...
@@ -91,7 +92,7 @@ public class BChapterController extends PaginationController<BChapter> {
...
@@ -91,7 +92,7 @@ public class BChapterController extends PaginationController<BChapter> {
id
);
id
);
}
}
@ApiOperation
(
value
=
"分页查询章节"
,
notes
=
"根据条件分页查询章节"
)
@ApiOperation
(
value
=
"
203
分页查询章节"
,
notes
=
"根据条件分页查询章节"
)
@PostMapping
(
value
=
"/queryBChaptersByPagination"
)
@PostMapping
(
value
=
"/queryBChaptersByPagination"
)
public
Result
queryBChaptersByPagination
(
CurUser
curUser
,
@Valid
QueryChapterListDTO
param
,
BindingResult
br
)
{
public
Result
queryBChaptersByPagination
(
CurUser
curUser
,
@Valid
QueryChapterListDTO
param
,
BindingResult
br
)
{
bChapterService
.
queryBChaptersByPagination
(
getPaginationUtility
(),
param
);
bChapterService
.
queryBChaptersByPagination
(
getPaginationUtility
(),
param
);
...
@@ -102,7 +103,7 @@ public class BChapterController extends PaginationController<BChapter> {
...
@@ -102,7 +103,7 @@ public class BChapterController extends PaginationController<BChapter> {
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"查询章节"
,
notes
=
"根据lessonId查询章节"
)
@ApiOperation
(
value
=
"
204
查询章节"
,
notes
=
"根据lessonId查询章节"
)
@GetMapping
(
value
=
"/queryBChaptersWithoutAuth"
)
@GetMapping
(
value
=
"/queryBChaptersWithoutAuth"
)
public
Result
queryBChapters
(
CurUser
curUser
,
@Valid
QueryChapterListDTO
param
,
BindingResult
br
)
{
public
Result
queryBChapters
(
CurUser
curUser
,
@Valid
QueryChapterListDTO
param
,
BindingResult
br
)
{
Map
<
String
,
Object
>
map
=
new
HashedMap
();
Map
<
String
,
Object
>
map
=
new
HashedMap
();
...
...
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
6cc7dd99
...
@@ -387,5 +387,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
...
@@ -387,5 +387,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
"where del_flag = 0 and flag = 1 "
+
"where del_flag = 0 and flag = 1 "
+
"and pid = #{pid} order by state desc</script>"
)
"and pid = #{pid} order by state desc</script>"
)
List
<
String
>
queryChapterStateByPid
(
String
pid
);
List
<
String
>
queryChapterStateByPid
(
String
pid
);
@Update
(
"update b_lesson set class_hour ="
+
"(select count(*) from b_chapter where lesson_id = #{lessonId} and chapter_level = 2 and del_flag != 1 and flag =1) "
+
"where business_id = #{lessonId}"
)
int
updateClassHourInLesson
(
@Param
(
"lessonId"
)
String
lessonId
);
}
}
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
6cc7dd99
...
@@ -99,12 +99,13 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -99,12 +99,13 @@ public class BChapterServiceImpl implements BChapterService {
/**
/**
* dto查询章节信息
* dto查询章节信息
*
* @param model
* @param model
* @return
* @return
*/
*/
public
List
<
QueryChapterListResDTO
>
queryChapterListResDTO
(
QueryChapterListDTO
model
)
{
public
List
<
QueryChapterListResDTO
>
queryChapterListResDTO
(
QueryChapterListDTO
model
)
{
Map
param
=
new
HashMap
<
String
,
Object
>();
Map
param
=
new
HashMap
<
String
,
Object
>();
if
(
model
.
getLessonId
()
!=
null
&&
!
""
.
equals
(
model
.
getLessonId
())){
if
(
model
.
getLessonId
()
!=
null
&&
!
""
.
equals
(
model
.
getLessonId
()))
{
param
.
put
(
"lessonId"
,
model
.
getLessonId
());
param
.
put
(
"lessonId"
,
model
.
getLessonId
());
}
}
return
bChapterRepository
.
queryBChapters
(
param
);
return
bChapterRepository
.
queryBChapters
(
param
);
...
@@ -131,7 +132,9 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -131,7 +132,9 @@ public class BChapterServiceImpl implements BChapterService {
}
}
int
sort
=
bChapterRepository
.
selectMaxSort
(
model
.
getPid
(),
model
.
getLessonId
());
int
sort
=
bChapterRepository
.
selectMaxSort
(
model
.
getPid
(),
model
.
getLessonId
());
model
.
setSort
(
sort
);
model
.
setSort
(
sort
);
line
=
bChapterRepository
.
insertSelective
(
model
);
line
=
bChapterRepository
.
insertSelective
(
model
);
bChapterRepository
.
updateClassHourInLesson
(
model
.
getLessonId
());
//更新b_lesson表中 class_hour
}
else
{
}
else
{
UserUtil
.
setCurrentMergeOperation
(
model
);
UserUtil
.
setCurrentMergeOperation
(
model
);
line
=
bChapterRepository
.
updateByPrimaryKeySelective
(
model
);
line
=
bChapterRepository
.
updateByPrimaryKeySelective
(
model
);
...
...
src/main/java/org/rcisoft/business/bcourse/controller/BCourseController.java
View file @
6cc7dd99
...
@@ -29,6 +29,7 @@ import java.util.ArrayList;
...
@@ -29,6 +29,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Api
(
tags
=
"3 分类接口"
)
@RestController
@RestController
@RequestMapping
(
"/BCourse"
)
@RequestMapping
(
"/BCourse"
)
public
class
BCourseController
extends
PaginationController
<
BCourse
>
{
public
class
BCourseController
extends
PaginationController
<
BCourse
>
{
...
@@ -38,7 +39,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -38,7 +39,7 @@ public class BCourseController extends PaginationController<BCourse> {
@Autowired
@Autowired
private
BCourseRepository
bCourseRepository
;
private
BCourseRepository
bCourseRepository
;
@ApiOperation
(
value
=
"查询课程分类"
,
notes
=
"查询课程分类"
)
@ApiOperation
(
value
=
"
301
查询课程分类"
,
notes
=
"查询课程分类"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"(课程名)模糊查询"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"(课程名)模糊查询"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/queryCourse"
)
@PostMapping
(
value
=
"/queryCourse"
)
public
Result
queryBCourse
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
public
Result
queryBCourse
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
...
@@ -52,7 +53,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -52,7 +53,7 @@ public class BCourseController extends PaginationController<BCourse> {
map
);
map
);
}
}
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiOperation
(
value
=
"
302
根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"(课程名)模糊查询"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"(课程名)模糊查询"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBCourseByPagination"
)
@GetMapping
(
value
=
"/queryBCourseByPagination"
)
public
GridModel
queryBCourseByPagination
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
public
GridModel
queryBCourseByPagination
(
CurUser
curUser
,
@Valid
String
cName
,
BindingResult
br
)
{
...
@@ -63,7 +64,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -63,7 +64,7 @@ public class BCourseController extends PaginationController<BCourse> {
return
gridModel
;
return
gridModel
;
}
}
@ApiOperation
(
value
=
"查询所有一级课程分类"
,
notes
=
"查询所有一级课程分类"
)
@ApiOperation
(
value
=
"
303
查询所有一级课程分类"
,
notes
=
"查询所有一级课程分类"
)
@PostMapping
(
value
=
"/queryFirstBCourse"
)
@PostMapping
(
value
=
"/queryFirstBCourse"
)
public
Result
queryFirstBCourse
(
CurUser
curUser
)
{
public
Result
queryFirstBCourse
(
CurUser
curUser
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
...
@@ -72,7 +73,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -72,7 +73,7 @@ public class BCourseController extends PaginationController<BCourse> {
bCourseRepository
.
queryFirstLevel
());
bCourseRepository
.
queryFirstLevel
());
}
}
@ApiOperation
(
value
=
"物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"
304
物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
public
Result
remove
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
...
@@ -83,7 +84,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -83,7 +84,7 @@ public class BCourseController extends PaginationController<BCourse> {
businessId
);
businessId
);
}
}
@ApiOperation
(
value
=
"修改课程分类名"
,
notes
=
"根据ID更新课程名"
)
@ApiOperation
(
value
=
"
305
修改课程分类名"
,
notes
=
"根据ID更新课程名"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程分类id"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"课程分类名称"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"课程分类名称"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/update"
)
@PostMapping
(
value
=
"/update"
)
...
@@ -95,7 +96,7 @@ public class BCourseController extends PaginationController<BCourse> {
...
@@ -95,7 +96,7 @@ public class BCourseController extends PaginationController<BCourse> {
bCourse
.
getBusinessId
());
bCourse
.
getBusinessId
());
}
}
@ApiOperation
(
value
=
"添加课程分类"
,
notes
=
"添加课程分类,不填parentId添加一级课程分类"
)
@ApiOperation
(
value
=
"
306
添加课程分类"
,
notes
=
"添加课程分类,不填parentId添加一级课程分类"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"上一级"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"上一级"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"课程分类名"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"cName"
,
value
=
"课程分类名"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
...
...
src/main/java/org/rcisoft/business/bfile/controller/BFileController.java
View file @
6cc7dd99
package
org
.
rcisoft
.
business
.
bfile
.
controller
;
package
org
.
rcisoft
.
business
.
bfile
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -28,6 +29,7 @@ import java.util.List;
...
@@ -28,6 +29,7 @@ import java.util.List;
/**
/**
* Created by gaowenfneg on 2017-10-9 14:34:56.
* Created by gaowenfneg on 2017-10-9 14:34:56.
*/
*/
@Api
(
tags
=
"4 文件"
)
@RestController
@RestController
@RequestMapping
(
"/BVideo"
)
@RequestMapping
(
"/BVideo"
)
public
class
BFileController
extends
PaginationController
<
BFile
>
{
public
class
BFileController
extends
PaginationController
<
BFile
>
{
...
@@ -102,7 +104,7 @@ public class BFileController extends PaginationController<BFile> {
...
@@ -102,7 +104,7 @@ public class BFileController extends PaginationController<BFile> {
// }
// }
@ApiOperation
(
value
=
"上传文件"
,
notes
=
"上传文件"
)
@ApiOperation
(
value
=
"
401
上传文件"
,
notes
=
"上传文件"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"chapterId"
,
value
=
"章节ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"chapterId"
,
value
=
"章节ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"0视频 1音频 2ppt 3pdf 4附件"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"0视频 1音频 2ppt 3pdf 4附件"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"章节所在课程id"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"章节所在课程id"
,
required
=
true
,
dataType
=
"varchar"
),
...
...
src/main/java/org/rcisoft/business/blabel/controller/BLabelController.java
View file @
6cc7dd99
package
org
.
rcisoft
.
business
.
blabel
.
controller
;
package
org
.
rcisoft
.
business
.
blabel
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -21,14 +22,14 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -21,14 +22,14 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
@Api
(
tags
=
"5 标签"
)
@RestController
@RestController
@RequestMapping
(
"/BLabel"
)
@RequestMapping
(
"/BLabel"
)
public
class
BLabelController
extends
PaginationController
<
BLabel
>
{
public
class
BLabelController
extends
PaginationController
<
BLabel
>
{
@Autowired
@Autowired
private
BLabelService
bLabelService
;
private
BLabelService
bLabelService
;
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiOperation
(
value
=
"
501
根据条件分页查询"
,
notes
=
"根据条件分页查询标签"
)
@ApiImplicitParam
(
name
=
"lName"
,
value
=
"(标签名)模糊查询条件"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"lName"
,
value
=
"(标签名)模糊查询条件"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBlabelsByPagination"
)
@GetMapping
(
value
=
"/queryBlabelsByPagination"
)
public
GridModel
queryBlabelsByPagination
(
CurUser
curUser
,
@Valid
String
lName
,
BindingResult
br
){
public
GridModel
queryBlabelsByPagination
(
CurUser
curUser
,
@Valid
String
lName
,
BindingResult
br
){
...
@@ -37,7 +38,7 @@ public class BLabelController extends PaginationController<BLabel> {
...
@@ -37,7 +38,7 @@ public class BLabelController extends PaginationController<BLabel> {
return
gridModel
;
return
gridModel
;
}
}
@ApiOperation
(
value
=
"物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"
502
物理删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"ID"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"ID"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
public
Result
remove
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
)
{
...
@@ -48,7 +49,7 @@ public class BLabelController extends PaginationController<BLabel> {
...
@@ -48,7 +49,7 @@ public class BLabelController extends PaginationController<BLabel> {
id
);
id
);
}
}
@ApiOperation
(
value
=
"更新标签名"
,
notes
=
"根据businessId更新标签名"
)
@ApiOperation
(
value
=
"
503
更新标签名"
,
notes
=
"根据businessId更新标签名"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"标签id"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"标签id"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lName"
,
value
=
"标签名"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"lName"
,
value
=
"标签名"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/update"
)
@PostMapping
(
value
=
"/update"
)
...
@@ -60,10 +61,10 @@ public class BLabelController extends PaginationController<BLabel> {
...
@@ -60,10 +61,10 @@ public class BLabelController extends PaginationController<BLabel> {
bLabel
.
getBusinessId
());
bLabel
.
getBusinessId
());
}
}
@ApiOperation
(
value
=
"
插入
新标签"
,
notes
=
"根据businessId插入新标签"
)
@ApiOperation
(
value
=
"
504 添加
新标签"
,
notes
=
"根据businessId插入新标签"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
id"
,
value
=
"businessI
d"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"
businessId"
,
value
=
"标签i
d"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"
name"
,
value
=
"lName
"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"
lName"
,
value
=
"标签名
"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/
insert
"
)
@PostMapping
(
value
=
"/
add
"
)
public
Result
insert
(
CurUser
curUser
,
@Valid
BLabel
bLabel
,
BindingResult
br
){
public
Result
insert
(
CurUser
curUser
,
@Valid
BLabel
bLabel
,
BindingResult
br
){
PersistModel
data
=
bLabelService
.
insertLabel
(
bLabel
);
PersistModel
data
=
bLabelService
.
insertLabel
(
bLabel
);
return
Result
.
builder
(
data
,
return
Result
.
builder
(
data
,
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
6cc7dd99
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.blesson.dto.AddLessonDTO
;
import
org.rcisoft.business.blesson.dto.AddLessonDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
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.BLesson
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.common.component.Global
;
...
@@ -30,7 +31,7 @@ import javax.validation.Valid;
...
@@ -30,7 +31,7 @@ import javax.validation.Valid;
/**
/**
* Created by CodeGenerator on 2017/07/12.
* Created by CodeGenerator on 2017/07/12.
*/
*/
@Api
(
tags
=
"课程"
)
@Api
(
tags
=
"
6
课程"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/BLesson"
)
@RequestMapping
(
"/BLesson"
)
...
@@ -42,7 +43,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -42,7 +43,7 @@ public class BLessonController extends PaginationController<BLesson> {
private
Global
global
;
private
Global
global
;
@ApiOperation
(
value
=
"添加/编辑课程"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiOperation
(
value
=
"
601
添加/编辑课程"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
AddLessonDTO
addLessonDTO
,
BindingResult
bindingResult
)
{
public
Result
add
(
CurUser
curUser
,
@Valid
AddLessonDTO
addLessonDTO
,
BindingResult
bindingResult
)
{
if
(
addLessonDTO
.
getCode
().
length
()>
if
(
addLessonDTO
.
getCode
().
length
()>
...
@@ -55,7 +56,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -55,7 +56,7 @@ public class BLessonController extends PaginationController<BLesson> {
addLessonDTO
);
addLessonDTO
);
}
}
@ApiOperation
(
value
=
"删除课程"
,
notes
=
"根据ID删除一条记录"
)
@ApiOperation
(
value
=
"
602
删除课程"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
public
Result
remove
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
...
@@ -67,7 +68,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -67,7 +68,7 @@ public class BLessonController extends PaginationController<BLesson> {
}
}
@ApiOperation
(
value
=
"唯一查找"
,
notes
=
"根据ID查找一条记录"
)
@ApiOperation
(
value
=
"
603
唯一查找"
,
notes
=
"根据ID查找一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/one"
)
@GetMapping
(
value
=
"/one"
)
public
Result
queryOne
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
public
Result
queryOne
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
...
@@ -78,7 +79,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -78,7 +79,7 @@ public class BLessonController extends PaginationController<BLesson> {
}
}
@ApiOperation
(
value
=
"分页查询我发布的课程"
,
notes
=
"分页查询我发布的课程"
)
@ApiOperation
(
value
=
"
604
分页查询我发布的课程"
,
notes
=
"分页查询我发布的课程"
)
@ApiImplicitParam
(
name
=
"releaseState"
,
value
=
"发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"releaseState"
,
value
=
"发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBLessonsByPagination"
)
@GetMapping
(
value
=
"/queryBLessonsByPagination"
)
public
Result
queryBLessonsByPagination
(
CurUser
curUser
,
String
releaseState
,
BindingResult
bindingResult
)
{
public
Result
queryBLessonsByPagination
(
CurUser
curUser
,
String
releaseState
,
BindingResult
bindingResult
)
{
...
@@ -90,7 +91,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -90,7 +91,7 @@ public class BLessonController extends PaginationController<BLesson> {
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"根据条件分页查询全部课程"
,
notes
=
"根据条件分页查询全部课程"
)
@ApiOperation
(
value
=
"
605
根据条件分页查询全部课程"
,
notes
=
"根据条件分页查询全部课程"
)
@GetMapping
(
value
=
"/queryAllBLessonsByPagination"
)
@GetMapping
(
value
=
"/queryAllBLessonsByPagination"
)
public
Result
queryBLessonsByPagination
(
CurUser
curUser
,
@Valid
FindAllLessonDTO
findAllLessonDTO
,
BindingResult
bindingResult
)
{
public
Result
queryBLessonsByPagination
(
CurUser
curUser
,
@Valid
FindAllLessonDTO
findAllLessonDTO
,
BindingResult
bindingResult
)
{
bLessonService
.
queryAllBLessonsByPagination
(
getPaginationUtility
(),
findAllLessonDTO
);
bLessonService
.
queryAllBLessonsByPagination
(
getPaginationUtility
(),
findAllLessonDTO
);
...
@@ -101,9 +102,9 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -101,9 +102,9 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"分页查询大家都在学"
,
notes
=
"分页查询大家都在学"
)
@ApiOperation
(
value
=
"
606
分页查询大家都在学"
,
notes
=
"分页查询大家都在学"
)
@GetMapping
(
value
=
"/queryPersonMoreByPagination"
)
@GetMapping
(
value
=
"/queryPersonMoreByPagination"
)
public
Result
queryPersonMoreByPagination
(
CurUser
curUser
)
{
public
Result
queryPersonMoreByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
());
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
());
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
...
@@ -112,9 +113,9 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -112,9 +113,9 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"分页查询推荐"
,
notes
=
"分页查询推荐"
)
@ApiOperation
(
value
=
"
607
分页查询推荐"
,
notes
=
"分页查询推荐"
)
@GetMapping
(
value
=
"/queryRecommendByPagination"
)
@GetMapping
(
value
=
"/queryRecommendByPagination"
)
public
Result
queryRecommendByPagination
(
CurUser
curUser
)
{
public
Result
queryRecommendByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
String
userId
=
curUser
.
getUserId
();
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryRecommendByPagination
(
getPaginationUtility
(),
userId
);
bLessonService
.
queryRecommendByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
...
@@ -123,4 +124,29 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -123,4 +124,29 @@ public class BLessonController extends PaginationController<BLesson> {
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"608 分页查询最受关注"
,
notes
=
"分页查询最受关注"
)
@GetMapping
(
value
=
"/queryConcernByPagination"
)
public
Result
queryConcernByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
// String userId = curUser.getUserId();
bLessonService
.
queryConcernByPagination
(
getPaginationUtility
());
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
}
@ApiOperation
(
value
=
"609 分页查询可能感兴趣"
,
notes
=
"分页查询可能感兴趣"
)
@GetMapping
(
value
=
"/queryInterestedByPagination"
)
public
Result
queryInterestedByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
// String userId = curUser.getUserId();
bLessonService
.
queryInterestedByPagination
(
getPaginationUtility
());
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 @
6cc7dd99
...
@@ -152,6 +152,42 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -152,6 +152,42 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryRecommend
(
String
userId
);
List
<
BLesson
>
queryRecommend
(
String
userId
);
/**
* 按学习人数降序查询
* @param
* @return
*/
@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 "
+
" order by bl.collect_number desc "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryConcern
();
@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 "
+
" order by bl.hot_number desc "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryInterested
();
//查询课程中的标签
//查询课程中的标签
@Select
(
" <script> select blb.business_id businessId,blb.l_name lName"
+
@Select
(
" <script> select blb.business_id businessId,blb.l_name lName"
+
...
...
src/main/java/org/rcisoft/business/blesson/dto/FirstPageQueryDTO.java
0 → 100644
View file @
6cc7dd99
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
@Data
public
class
FirstPageQueryDTO
{
@ApiModelProperty
(
value
=
"课程一级分类"
,
required
=
false
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
courseLevelOne
;
@ApiModelProperty
(
value
=
"查询参数"
,
required
=
false
)
private
String
viewParam
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
6cc7dd99
...
@@ -64,6 +64,21 @@ public interface BLessonService{
...
@@ -64,6 +64,21 @@ public interface BLessonService{
*/
*/
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
);
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
);
/**
* 分页查找最受关注
* @param pageUtil
* @param
* @return
*/
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
);
/**
* 分页查找可能感兴趣的
* @param pageUtil
* @param
* @return
*/
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
);
/**
/**
* 插入
* 插入
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
6cc7dd99
...
@@ -80,6 +80,15 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -80,6 +80,15 @@ public class BLessonServiceImpl implements BLessonService {
public
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
public
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
return
bLessonRepository
.
queryRecommend
(
userId
);
return
bLessonRepository
.
queryRecommend
(
userId
);
}
}
@Override
public
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
)
{
return
bLessonRepository
.
queryConcern
();
}
@Override
public
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
)
{
return
bLessonRepository
.
queryInterested
();
}
@Override
@Override
...
...
src/main/java/org/rcisoft/config/MvcConfig.java
View file @
6cc7dd99
...
@@ -17,10 +17,7 @@ import org.springframework.web.method.HandlerMethod;
...
@@ -17,10 +17,7 @@ import org.springframework.web.method.HandlerMethod;
import
org.springframework.web.servlet.HandlerExceptionResolver
;
import
org.springframework.web.servlet.HandlerExceptionResolver
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.NoHandlerFoundException
;
import
org.springframework.web.servlet.NoHandlerFoundException
;
import
org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer
;
import
org.springframework.web.servlet.config.annotation.*
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.ViewControllerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -226,5 +223,13 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
...
@@ -226,5 +223,13 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
}
}
@Override
public
void
addCorsMappings
(
CorsRegistry
registry
)
{
registry
.
addMapping
(
"/**"
)
.
allowedOrigins
(
"*"
)
.
allowedMethods
(
"POST"
,
"GET"
,
"PUT"
,
"OPTIONS"
,
"DELETE"
)
.
maxAge
(
3600
)
.
allowCredentials
(
true
);
}
}
}
src/main/java/org/rcisoft/sys/user/controller/SysUserController.java
View file @
6cc7dd99
...
@@ -33,7 +33,7 @@ import java.util.List;
...
@@ -33,7 +33,7 @@ import java.util.List;
/**
/**
* Created by Andrew on 2017/7/6.
* Created by Andrew on 2017/7/6.
*/
*/
@Api
(
tags
=
"用户管理"
)
@Api
(
tags
=
"
7
用户管理"
)
@RestController
@RestController
@RequestMapping
(
value
=
"/user"
)
@RequestMapping
(
value
=
"/user"
)
public
class
SysUserController
extends
PaginationController
<
SysUser
>
{
public
class
SysUserController
extends
PaginationController
<
SysUser
>
{
...
@@ -44,7 +44,7 @@ public class SysUserController extends PaginationController<SysUser> {
...
@@ -44,7 +44,7 @@ public class SysUserController extends PaginationController<SysUser> {
@Autowired
@Autowired
private
Global
global
;
private
Global
global
;
@ApiOperation
(
value
=
"分页查询用户"
,
notes
=
"分页查询用户"
)
@ApiOperation
(
value
=
"
701
分页查询用户"
,
notes
=
"分页查询用户"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"用户名(模糊查询条件)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"用户名(模糊查询条件)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"用户启用状态 0未启用 1启用"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"用户启用状态 0未启用 1启用"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"roleName"
,
value
=
"用户角色"
,
required
=
false
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"roleName"
,
value
=
"用户角色"
,
required
=
false
,
dataType
=
"varchar"
)})
...
@@ -55,9 +55,9 @@ public class SysUserController extends PaginationController<SysUser> {
...
@@ -55,9 +55,9 @@ public class SysUserController extends PaginationController<SysUser> {
return
gridModel
;
return
gridModel
;
}
}
@ApiOperation
(
value
=
"分配角色"
,
notes
=
"分配角色"
)
@ApiOperation
(
value
=
"
702
分配角色"
,
notes
=
"分配角色"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id
(可多选 用 ,分开传字符串)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id
(批量操作时 id用,隔开)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
),
@ApiImplicitParam
(
name
=
"roleId"
,
value
=
"角色id
(可多选 用 ,分开传字符串)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)})
@ApiImplicitParam
(
name
=
"roleId"
,
value
=
"角色id
(批量操作时 id用,隔开)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)})
@PostMapping
(
value
=
"/AssignRoles"
)
@PostMapping
(
value
=
"/AssignRoles"
)
public
Result
AssignRoles
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
,
String
roleId
)
{
public
Result
AssignRoles
(
CurUser
curUser
,
@Valid
String
id
,
BindingResult
br
,
String
roleId
)
{
int
line
=
userServiceImpl
.
AssignRoles
(
id
,
roleId
);
int
line
=
userServiceImpl
.
AssignRoles
(
id
,
roleId
);
...
@@ -67,19 +67,19 @@ public class SysUserController extends PaginationController<SysUser> {
...
@@ -67,19 +67,19 @@ public class SysUserController extends PaginationController<SysUser> {
id
);
id
);
}
}
@ApiOperation
(
value
=
"删除用户"
,
notes
=
"删除用户"
)
@ApiOperation
(
value
=
"
703
删除用户"
,
notes
=
"删除用户"
)
@ApiImplicitParam
(
name
=
"
i
d"
,
value
=
"用户id"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@ApiImplicitParam
(
name
=
"
businessI
d"
,
value
=
"用户id"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@PostMapping
(
value
=
"/delete"
)
@PostMapping
(
value
=
"/delete"
)
public
Result
roleDelete
(
CurUser
curUser
,
@Valid
String
i
d
,
BindingResult
br
)
{
public
Result
roleDelete
(
CurUser
curUser
,
@Valid
String
businessI
d
,
BindingResult
br
)
{
int
line
=
userServiceImpl
.
removeUser
(
i
d
);
int
line
=
userServiceImpl
.
removeUser
(
businessI
d
);
return
Result
.
builder
(
new
PersistModel
(
line
),
return
Result
.
builder
(
new
PersistModel
(
line
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
i
d
);
businessI
d
);
}
}
@ApiOperation
(
value
=
"停用用户"
,
notes
=
"停用用户"
)
@ApiOperation
(
value
=
"
704
停用用户"
,
notes
=
"停用用户"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"
businessId
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"
用户Id(批量操作时 id用,隔开)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@PostMapping
(
value
=
"/stop"
)
@PostMapping
(
value
=
"/stop"
)
public
Result
stop
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
public
Result
stop
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
int
line
=
userServiceImpl
.
stopUserByUserBusinessId
(
businessId
);
int
line
=
userServiceImpl
.
stopUserByUserBusinessId
(
businessId
);
...
@@ -89,8 +89,8 @@ public class SysUserController extends PaginationController<SysUser> {
...
@@ -89,8 +89,8 @@ public class SysUserController extends PaginationController<SysUser> {
businessId
);
businessId
);
}
}
@ApiOperation
(
value
=
"启用用户"
,
notes
=
"启用用户"
)
@ApiOperation
(
value
=
"
705
启用用户"
,
notes
=
"启用用户"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"
businessId
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"
用户Id(批量操作时 id用,隔开)
"
,
required
=
true
,
dataType
=
"varchar"
,
paramType
=
"path"
)
@PostMapping
(
value
=
"/start"
)
@PostMapping
(
value
=
"/start"
)
public
Result
Start
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
public
Result
Start
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
br
)
{
int
line
=
userServiceImpl
.
startUserByUserBusinessId
(
businessId
);
int
line
=
userServiceImpl
.
startUserByUserBusinessId
(
businessId
);
...
...
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
View file @
6cc7dd99
...
@@ -36,8 +36,10 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
...
@@ -36,8 +36,10 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"</script>"
)
"</script>"
)
int
stopFlag
(
@Param
(
"businessId"
)
List
<
String
>
businessId
);
int
stopFlag
(
@Param
(
"businessId"
)
List
<
String
>
businessId
);
@Select
(
"select ur.user_id from s_r_user_role ur left JOIN s_role sr on ur.role_id = sr.business_id where sr.role_name=#{roleName}"
)
@Select
(
"<script>select ur.user_id from s_r_user_role ur left JOIN s_role sr on ur.role_id = sr.business_id where sr.role_name in"
+
List
<
String
>
adminId
(
@Param
(
"roleName"
)
String
roleName
);
"<foreach item='item' index='index' collection='roleName' open='(' separator=',' close=')'> #{item} </foreach> "
+
"</script>"
)
List
<
String
>
adminId
(
@Param
(
"roleName"
)
List
<
String
>
roleName
);
@Select
(
"<script> select * from s_r_user_role where user_id in"
+
@Select
(
"<script> select * from s_r_user_role where user_id in"
+
" <foreach item='item' index='index' collection='userId' open='(' separator=',' close=')'> #{item} </foreach>"
+
" <foreach item='item' index='index' collection='userId' open='(' separator=',' close=')'> #{item} </foreach>"
+
...
...
src/main/java/org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
View file @
6cc7dd99
...
@@ -23,6 +23,8 @@ import java.util.ArrayList;
...
@@ -23,6 +23,8 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
static
java
.
util
.
Arrays
.
asList
;
@Service
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
public
class
SysUserServiceImpl
implements
SysUserService
{
public
class
SysUserServiceImpl
implements
SysUserService
{
...
@@ -52,13 +54,14 @@ public class SysUserServiceImpl implements SysUserService {
...
@@ -52,13 +54,14 @@ public class SysUserServiceImpl implements SysUserService {
@Override
@Override
public
int
AssignRoles
(
String
userId
,
String
roleId
)
{
public
int
AssignRoles
(
String
userId
,
String
roleId
)
{
List
<
String
>
adminIds
=
sysUserMapper
.
adminId
(
"主管理员"
);
List
<
String
>
adminRoleName
=
asList
(
"主管理员"
,
"子管理员"
);
List
<
String
>
adminIds
=
sysUserMapper
.
adminId
(
adminRoleName
);
if
(
adminIds
.
size
()
!=
0
)
{
if
(
adminIds
.
size
()
!=
0
)
{
for
(
int
i
=
0
;
i
<
adminIds
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
adminIds
.
size
();
i
++)
{
userId
=
userId
.
replace
(
adminIds
.
get
(
i
),
""
);
userId
=
userId
.
replace
(
adminIds
.
get
(
i
),
""
);
}
}
List
<
String
>
userIds
=
Arrays
.
asList
(
StringUtils
.
split
(
userId
,
","
));
List
<
String
>
userIds
=
asList
(
StringUtils
.
split
(
userId
,
","
));
List
<
String
>
roleIds
=
Arrays
.
asList
(
StringUtils
.
split
(
roleId
,
","
));
List
<
String
>
roleIds
=
asList
(
StringUtils
.
split
(
roleId
,
","
));
List
<
UserRole
>
userRoles
=
new
ArrayList
<>();
List
<
UserRole
>
userRoles
=
new
ArrayList
<>();
sysUserMapper
.
delUserRoleById
(
userIds
);
sysUserMapper
.
delUserRoleById
(
userIds
);
int
result
=
0
;
int
result
=
0
;
...
@@ -105,13 +108,13 @@ public class SysUserServiceImpl implements SysUserService {
...
@@ -105,13 +108,13 @@ public class SysUserServiceImpl implements SysUserService {
@Override
@Override
public
int
stopUserByUserBusinessId
(
String
businessId
)
{
public
int
stopUserByUserBusinessId
(
String
businessId
)
{
List
<
String
>
ids
=
Arrays
.
asList
(
StringUtils
.
split
(
businessId
,
","
));
List
<
String
>
ids
=
asList
(
StringUtils
.
split
(
businessId
,
","
));
return
sysUserMapper
.
stopFlag
(
ids
);
return
sysUserMapper
.
stopFlag
(
ids
);
}
}
@Override
@Override
public
int
startUserByUserBusinessId
(
String
businessId
)
{
public
int
startUserByUserBusinessId
(
String
businessId
)
{
List
<
String
>
ids
=
Arrays
.
asList
(
StringUtils
.
split
(
businessId
,
","
));
List
<
String
>
ids
=
asList
(
StringUtils
.
split
(
businessId
,
","
));
return
sysUserMapper
.
startFlag
(
ids
);
return
sysUserMapper
.
startFlag
(
ids
);
}
}
...
...
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