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
ccc83c92
Commit
ccc83c92
authored
Sep 29, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
308318ee
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
50 deletions
+59
-50
BBannerRepository.java
...a/org/rcisoft/business/bbanner/dao/BBannerRepository.java
+2
-2
BDictionaryController.java
...usiness/bdictionary/controller/BDictionaryController.java
+24
-26
BDictionaryRepository.java
...isoft/business/bdictionary/dao/BDictionaryRepository.java
+2
-2
BDictionaryService.java
...soft/business/bdictionary/service/BDictionaryService.java
+1
-1
BDictionaryServiceImpl.java
...ness/bdictionary/service/impl/BDictionaryServiceImpl.java
+5
-5
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+23
-12
FindAllLessonDTO.java
...va/org/rcisoft/business/blesson/dto/FindAllLessonDTO.java
+1
-1
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/bbanner/dao/BBannerRepository.java
View file @
ccc83c92
...
...
@@ -61,8 +61,8 @@ public interface BBannerRepository extends BaseMapper<BBanner> {
* 获取sort最大值 +1
* @return
*/
@Select
(
"<script>select DISTINCT IFNULL((select max(sort) from b_banner where "
+
"del_flag = 0 and flag = 1 ),0)+1 as sort</script>"
)
@Select
(
"<script>select DISTINCT IFNULL((select max(
banner_
sort) from b_banner where "
+
"del_flag = 0 and flag = 1 ),0)+1 as
banner_
sort</script>"
)
int
selectMaxSort
();
/**
...
...
src/main/java/org/rcisoft/business/bdictionary/controller/BDictionaryController.java
View file @
ccc83c92
...
...
@@ -22,8 +22,6 @@ import javax.validation.Valid;
import
org.rcisoft.business.bdictionary.entity.BDictionary
;
import
org.rcisoft.business.bdictionary.service.BDictionaryService
;
import
java.util.List
;
/**
* Created by on 2019-9-29 16:21:48.
*/
...
...
@@ -36,29 +34,29 @@ public class BDictionaryController extends PaginationController<BDictionary> {
private
BDictionaryService
bDictionaryServiceImpl
;
@ApiOperation
(
value
=
"添加"
,
notes
=
"添加"
)
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
BDictionary
bDictionary
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bDictionaryServiceImpl
.
save
(
bDictionary
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bDictionary
);
}
@ApiOperation
(
value
=
"逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
false
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{id:\\w+}"
)
public
Result
delete
(
@PathVariable
String
id
)
{
BDictionary
bDictionary
=
new
BDictionary
();
bDictionary
.
setBusinessId
(
id
);
PersistModel
data
=
bDictionaryServiceImpl
.
remove
(
bDictionary
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
id
);
}
//
@ApiOperation(value="添加", notes="添加")
//
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
//
@PostMapping(value = "/add")
//
public Result add(CurUser curUser,@Valid BDictionary bDictionary, BindingResult bindingResult) {
//
PersistModel data = bDictionaryServiceImpl.save(bDictionary);
//
return Result.builder(data,
//
MessageConstant.MESSAGE_ALERT_SUCCESS,
//
MessageConstant.MESSAGE_ALERT_ERROR,
//
bDictionary);
//
}
//
//
@ApiOperation(value="逻辑删除", notes="逻辑删除")
//
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", required = false, dataType = "varchar")})
//
@DeleteMapping("/delete/{id:\\w+}")
//
public Result delete(@PathVariable String id) {
//
BDictionary bDictionary = new BDictionary();
//
bDictionary.setBusinessId(id);
//
PersistModel data = bDictionaryServiceImpl.remove(bDictionary);
//
return Result.builder(data,
//
MessageConstant.MESSAGE_ALERT_SUCCESS,
//
MessageConstant.MESSAGE_ALERT_ERROR,
//
id);
//
}
// @ApiOperation(value="修改", notes="修改")
// @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
...
...
@@ -79,7 +77,7 @@ public class BDictionaryController extends PaginationController<BDictionary> {
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bDictionaryServiceImpl
.
findAll
(
curUser
));
bDictionaryServiceImpl
.
findAll
ColumnConfig
(
curUser
));
}
@ApiOperation
(
value
=
"1102 更新栏目配置"
,
notes
=
"查看栏目配置"
)
...
...
src/main/java/org/rcisoft/business/bdictionary/dao/BDictionaryRepository.java
View file @
ccc83c92
...
...
@@ -24,11 +24,11 @@ public interface BDictionaryRepository extends BaseMapper<BDictionary> {
@Select
(
"<script>"
+
" select * from b_dictionary where 1=1 "
+
" and del_flag = !1 and flag = 1 "
+
" <if test=\"configList != null and configList.size()>0 \">and
name
in "
+
" <if test=\"configList != null and configList.size()>0 \">and
business_id
in "
+
" <foreach item='item' index='index' collection='configList' open='(' separator=',' close=')'> #{item} </foreach> "
+
" </if>"
+
" </script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BDictionary
>
queryBDictionarys
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"configList"
)
List
<
String
>
configList
);
List
<
BDictionary
>
findAllColumnConfig
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"configList"
)
List
<
String
>
configList
);
}
src/main/java/org/rcisoft/business/bdictionary/service/BDictionaryService.java
View file @
ccc83c92
...
...
@@ -46,7 +46,7 @@ public interface BDictionaryService {
* @param curUser
* @return
*/
List
<
BDictionary
>
findAll
(
CurUser
curUser
);
List
<
BDictionary
>
findAll
ColumnConfig
(
CurUser
curUser
);
/**
...
...
src/main/java/org/rcisoft/business/bdictionary/service/impl/BDictionaryServiceImpl.java
View file @
ccc83c92
...
...
@@ -94,12 +94,12 @@ public class BDictionaryServiceImpl implements BDictionaryService {
* @param curUser
* @return
*/
public
List
<
BDictionary
>
findAll
(
CurUser
curUser
){
public
List
<
BDictionary
>
findAll
ColumnConfig
(
CurUser
curUser
){
List
<
String
>
configList
=
new
ArrayList
<>();
configList
.
add
(
"
关注人数"
);
configList
.
add
(
"
总裁读书会"
);
configList
.
add
(
"
在学人数"
);
List
<
BDictionary
>
DictList
=
bDictionaryRepository
.
queryBDictionarys
(
curUser
,
configList
);
configList
.
add
(
"
3e3feb5a66244652a1c052b369a7b68a"
);
//关注人数
configList
.
add
(
"
3e3feb5a66244652a1c052b369a7b68b"
);
//总裁读书会
configList
.
add
(
"
3e3feb5a66244652a1c052b369a7b68c"
);
//在学人数
List
<
BDictionary
>
DictList
=
bDictionaryRepository
.
findAllColumnConfig
(
curUser
,
configList
);
return
DictList
;
}
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
ccc83c92
...
...
@@ -27,12 +27,15 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* @param releaseState
* @return
*/
@Select
(
"<script>select * from b_lesson "
+
"where del_flag != 1 and flag = 1 and lecturer_id = #{curUser.userId}"
+
@Select
(
"<script>select b.*,su.name lecturerName "
+
" from b_lesson b "
+
" left join s_user su on b.lecturer_id = su.business_id "
+
" where b.del_flag != 1 and b.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 and b.lecturer_id = #{curUser.userId}"
+
// " and corp_id = #{curUser.corpId} "+
// " and
b.
corp_id = #{curUser.corpId} "+
"<if test=\"releaseState!=null and releaseState != ''\">and release_state = #{releaseState} </if>"
+
"
<if test=\"releaseState!=null and releaseState != ''\">and release_state = #{releaseState} </if>"
+
"order by update_date desc</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryBLessons
(
@Param
(
"releaseState"
)
String
releaseState
,
@Param
(
"curUser"
)
CurUser
curUser
);
...
...
@@ -358,14 +361,22 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* @return
*/
@Select
({
"<script>"
,
" select (select COUNT(1) from b_lesson where lecturer_id = #{userId} ) publishAllCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '2') finishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '1') notFinishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '0') notStartCount "
+
" select (select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lecturer_id = #{userId} ) publishAllCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 "
+
" and person_id = #{userId} ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 "
+
" and person_id = #{userId} and is_finish = '2') finishCount, "
+
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 "
+
" and person_id = #{userId} and is_finish = '1') notFinishCount, "
+
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 "
+
" and person_id = #{userId} and is_finish = '0') notStartCount "
+
"</script>"
})
ILessonCountDTO
iLessonCount
(
String
userId
);
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindAllLessonDTO.java
View file @
ccc83c92
...
...
@@ -35,7 +35,7 @@ public class FindAllLessonDTO {
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
recommend
;
@ApiModelProperty
(
value
=
"
教
师姓名"
)
@ApiModelProperty
(
value
=
"
讲
师姓名"
)
private
String
lecturerName
;
@ApiModelProperty
(
value
=
"标签集合"
)
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
ccc83c92
...
...
@@ -110,7 +110,7 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
learnProgress
;
@ApiModelProperty
(
value
=
"
教
师姓名"
)
@ApiModelProperty
(
value
=
"
讲
师姓名"
)
@Transient
private
String
lecturerName
;
...
...
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