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
abe8ed99
Commit
abe8ed99
authored
Sep 30, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
4d06918d
47382c66
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
8 deletions
+26
-8
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+1
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+14
-5
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+8
-0
ResultExceptionEnum.java
...ain/java/org/rcisoft/core/result/ResultExceptionEnum.java
+2
-1
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
abe8ed99
...
@@ -270,7 +270,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -270,7 +270,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/release"
)
@PostMapping
(
value
=
"/release"
)
public
Result
release
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
public
Result
release
(
CurUser
curUser
,
String
businessId
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonService
.
clo
seBLesson
(
businessId
);
PersistModel
data
=
bLessonService
.
relea
seBLesson
(
businessId
);
return
Result
.
builder
(
data
,
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
abe8ed99
...
@@ -351,6 +351,15 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -351,6 +351,15 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"where business_id=#{businessId}"
,
"where business_id=#{businessId}"
,
"</script>"
})
"</script>"
})
int
closeLesson
(
BLesson
model
);
int
closeLesson
(
BLesson
model
);
/**
* 查询课程状态
* @param id
* @return
*/
@Select
(
" <script> select release_state from b_lesson where business_id = #{id} </script>"
)
int
findLessonReleaseState
(
String
id
);
/**
/**
* 根据课程id发布课程
* 根据课程id发布课程
*
*
...
@@ -373,7 +382,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -373,7 +382,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* @param param
* @param param
* @return
* @return
*/
*/
@Select
(
" <script> select
distinct
bl.* "
+
@Select
(
" <script> select bl.* "
+
// " ,su.name lecturerName " +
// " ,su.name lecturerName " +
// " ,suc.name createByName " +
// " ,suc.name createByName " +
" from b_lesson bl "
+
" from b_lesson bl "
+
...
@@ -515,18 +524,18 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -515,18 +524,18 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"b_lesson les "
+
"b_lesson les "
+
"LEFT JOIN b_course b1 ON b1.business_id = les.course_id "
+
"LEFT JOIN b_course b1 ON b1.business_id = les.course_id "
+
"AND b1.corp_id = #{corpId} "
+
"AND b1.corp_id = #{corpId} "
+
"and b1.del_flag != 1 and b1.flag = 1 "
+
"LEFT JOIN b_course b2 ON b2.business_id = b1.pid "
+
"LEFT JOIN b_course b2 ON b2.business_id = b1.pid "
+
"AND b2.corp_id = #{corpId} "
+
"AND b2.corp_id = #{corpId} "
+
"and b2.del_flag != 1 and b2.flag = 1 "
+
"LEFT JOIN b_course b3 ON b3.business_id = b2.pid "
+
"LEFT JOIN b_course b3 ON b3.business_id = b2.pid "
+
"AND b3.corp_id = #{corpId} "
+
"AND b3.corp_id = #{corpId} "
+
"and b3.del_flag != 1 and b3.flag = 1 "
+
"LEFT JOIN s_user u1 ON u1.business_id = les.lecturer_id "
+
"LEFT JOIN s_user u1 ON u1.business_id = les.lecturer_id "
+
"AND u1.corp_id = #{corpId}"
+
"AND u1.corp_id = #{corpId}"
+
"and u1.del_flag != 1 and u1.flag = 1 "
+
"WHERE 1=1 "
+
"WHERE 1=1 "
+
"and les.del_flag != 1 and les.flag = 1 "
+
"and les.del_flag != 1 and les.flag = 1 "
+
"and b1.del_flag != 1 and b1.flag = 1 "
+
"and b2.del_flag != 1 and b2.flag = 1 "
+
"and b3.del_flag != 1 and b3.flag = 1 "
+
"and u1.del_flag != 1 and u1.flag = 1 "
+
"AND les.corp_id = #{corpId}"
+
"AND les.corp_id = #{corpId}"
+
"<if test='!isAdmin'>"
+
"<if test='!isAdmin'>"
+
"AND les.lecturer_id IN"
+
"AND les.lecturer_id IN"
+
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
abe8ed99
...
@@ -17,7 +17,9 @@ import org.rcisoft.business.blesson.entity.BViewrange;
...
@@ -17,7 +17,9 @@ import org.rcisoft.business.blesson.entity.BViewrange;
import
org.rcisoft.business.blesson.entity.BViewrangeSon
;
import
org.rcisoft.business.blesson.entity.BViewrangeSon
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultExceptionEnum
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
...
@@ -240,6 +242,12 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -240,6 +242,12 @@ public class BLessonServiceImpl implements BLessonService {
@Override
@Override
public
PersistModel
releaseBLesson
(
String
id
)
{
public
PersistModel
releaseBLesson
(
String
id
)
{
int
state
=
bLessonRepository
.
findLessonReleaseState
(
id
);
if
(
state
!=
0
){
throw
new
ServiceException
(
ResultExceptionEnum
.
STATE_NOT_RELEASE
);
}
BLesson
bLesson
=
new
BLesson
();
BLesson
bLesson
=
new
BLesson
();
bLesson
.
setBusinessId
(
id
);
bLesson
.
setBusinessId
(
id
);
UserUtil
.
setCurrentMergeOperation
(
bLesson
);
UserUtil
.
setCurrentMergeOperation
(
bLesson
);
...
...
src/main/java/org/rcisoft/core/result/ResultExceptionEnum.java
View file @
abe8ed99
...
@@ -27,7 +27,8 @@ public enum ResultExceptionEnum {
...
@@ -27,7 +27,8 @@ public enum ResultExceptionEnum {
NO_DATA
(
4011
,
"该数据不存在"
),
NO_DATA
(
4011
,
"该数据不存在"
),
MUST_NOT_FILLED
(
4012
,
"必填未填写"
),
MUST_NOT_FILLED
(
4012
,
"必填未填写"
),
NOT_MORE_COUNT
(
4013
,
"添加超过规定个数"
),
NOT_MORE_COUNT
(
4013
,
"添加超过规定个数"
),
APPOINT_NOT_CLOSE
(
4014
,
"必修不能退出"
)
APPOINT_NOT_CLOSE
(
4014
,
"必修不能退出"
),
STATE_NOT_RELEASE
(
4015
,
"该课程状态不能发布"
)
;
;
private
Integer
code
;
private
Integer
code
;
...
...
src/main/resources/application-dev.yml
View file @
abe8ed99
...
@@ -13,7 +13,7 @@ server:
...
@@ -13,7 +13,7 @@ server:
# org.springframework.web: DEBUG
# org.springframework.web: DEBUG
druid
:
druid
:
# 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://127.0.0.1:3306/
edu_db2
?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://10.96.131.16:55558/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://10.96.131.16:55558/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
#url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
username
:
root
...
...
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