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
ff702fa7
Commit
ff702fa7
authored
Nov 13, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
6998932c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
9 deletions
+20
-9
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+1
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+2
-1
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+10
-6
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+6
-0
ResultServiceEnums.java
...main/java/org/rcisoft/core/result/ResultServiceEnums.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
ff702fa7
...
@@ -613,7 +613,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -613,7 +613,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @return
* @return
* @author: zhangqingle
* @author: zhangqingle
*/
*/
@ApiOperation
(
value
=
"637 分页查询我
我关注"
,
notes
=
"分页查询我
我关注"
,
response
=
BLessonPerson
.
class
)
@ApiOperation
(
value
=
"637 分页查询我
关注"
,
notes
=
"分页查询
我关注"
,
response
=
BLessonPerson
.
class
)
@ApiImplicitParam
(
name
=
"lessonType"
,
value
=
"课程类型 0 课程 1培训"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"lessonType"
,
value
=
"课程类型 0 课程 1培训"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryCollectByPagination"
)
@GetMapping
(
value
=
"/queryCollectByPagination"
)
public
Result
queryCollectByPagination
(
CurUser
curUser
,
@Valid
String
lessonType
,
BindingResult
bindingResult
)
{
public
Result
queryCollectByPagination
(
CurUser
curUser
,
@Valid
String
lessonType
,
BindingResult
bindingResult
)
{
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
ff702fa7
...
@@ -690,7 +690,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -690,7 +690,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
*/
*/
@Update
(
"<script>update b_lesson set hot_number = "
+
@Update
(
"<script>update b_lesson set hot_number = "
+
"(select count(1) from b_hot where 1=1 "
+
"(select count(1) from b_hot where 1=1 "
+
" and lesson_id = #{lessonId})"
+
" and lesson_id = #{lessonId}) where 1=1 "
+
" and business_id = #{lessonId} "
+
" </script>"
)
" </script>"
)
int
hotNumberReCount
(
String
lessonId
);
int
hotNumberReCount
(
String
lessonId
);
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
ff702fa7
...
@@ -206,6 +206,13 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -206,6 +206,13 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
throw
new
ServiceException
(
ResultServiceEnums
.
NOT_TRAIN_TYPE
);
throw
new
ServiceException
(
ResultServiceEnums
.
NOT_TRAIN_TYPE
);
}
}
//添加至b_hot表 并重新统计热度
int
count
=
bHotRepository
.
selectCountByPersonId
(
addMyLearnLessonDTO
.
getUserId
(),
addMyLearnLessonDTO
.
getLessonId
());
if
(
count
<
1
){
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
addMyLearnLessonDTO
.
getUserId
(),
addMyLearnLessonDTO
.
getLessonId
()));
bLessonRepository
.
hotNumberReCount
(
addMyLearnLessonDTO
.
getLessonId
());
}
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
BLessonPerson
bLessonPerson
;
BLessonPerson
bLessonPerson
;
int
line
=
0
;
int
line
=
0
;
...
@@ -235,6 +242,8 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -235,6 +242,8 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setIsFinish
(
"1"
);
bLessonPerson
.
setIsFinish
(
"1"
);
//添加报名时间
bLessonPerson
.
setApplyDate
(
new
Date
());
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPerson
.
setPersonId
(
addMyLearnLessonDTO
.
getUserId
());
bLessonPerson
.
setPersonId
(
addMyLearnLessonDTO
.
getUserId
());
line
=
bLessonPersonRepository
.
insertBLessonPerson
(
bLessonPerson
);
line
=
bLessonPersonRepository
.
insertBLessonPerson
(
bLessonPerson
);
...
@@ -246,12 +255,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -246,12 +255,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
// line = 1;
// line = 1;
// return new PersistModel(line);
// return new PersistModel(line);
// }
// }
//添加至b_hot表 并重新统计热度
int
count
=
bHotRepository
.
selectCountByPersonId
(
addMyLearnLessonDTO
.
getUserId
(),
addMyLearnLessonDTO
.
getLessonId
());
if
(
count
<
1
){
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
addMyLearnLessonDTO
.
getUserId
(),
addMyLearnLessonDTO
.
getLessonId
()));
bLessonRepository
.
hotNumberReCount
(
addMyLearnLessonDTO
.
getLessonId
());
}
return
new
PersistModel
(
1
);
return
new
PersistModel
(
1
);
}
}
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
ff702fa7
...
@@ -1187,6 +1187,12 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1187,6 +1187,12 @@ public class BLessonServiceImpl implements BLessonService {
}
}
//判断报名、签到是否开始
//判断报名、签到是否开始
setDateState
(
bLesson
);
setDateState
(
bLesson
);
//添加至b_hot表 并重新统计热度
int
count
=
bHotRepository
.
selectCountByPersonId
(
curUser
.
getUserId
(),
lessonId
);
if
(
count
<
1
){
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
curUser
.
getUserId
(),
lessonId
));
bLessonRepository
.
hotNumberReCount
(
lessonId
);
}
return
bLesson
;
return
bLesson
;
}
}
...
...
src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
View file @
ff702fa7
...
@@ -235,7 +235,7 @@ public enum ResultServiceEnums {
...
@@ -235,7 +235,7 @@ public enum ResultServiceEnums {
CHAPTER_ONLY_ONE
(
135
,
"当前课程仅有一节,不能被删除"
),
CHAPTER_ONLY_ONE
(
135
,
"当前课程仅有一节,不能被删除"
),
LESSON_NO_CHAPTER
(
136
,
"当前课程暂无章节,不能被发布"
),
LESSON_NO_CHAPTER
(
136
,
"当前课程暂无章节,不能被发布"
),
ROLE_IS_NULL
(
137
,
"当前未勾选角色,请勾选角色"
),
ROLE_IS_NULL
(
137
,
"当前未勾选角色,请勾选角色"
),
ILLEGAL_URL
(
138
,
"网址不合法
(http(s)://xxxx.xx)
"
),
ILLEGAL_URL
(
138
,
"网址不合法
,需输入:http(s)://xxx.xx
"
),
PARAM_NOT_NULL
(
139
,
"参数不能为空"
),
PARAM_NOT_NULL
(
139
,
"参数不能为空"
),
NOT_TRAIN_TYPE
(
140
,
"课程类型不正确"
),
NOT_TRAIN_TYPE
(
140
,
"课程类型不正确"
),
;
;
...
...
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