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
6b21b775
Commit
6b21b775
authored
Oct 22, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
e2b15ac2
df3713b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
BCourseRepository.java
...a/org/rcisoft/business/bcourse/dao/BCourseRepository.java
+11
-11
BCourseServiceImpl.java
...oft/business/bcourse/service/impl/BCourseServiceImpl.java
+2
-2
No files found.
src/main/java/org/rcisoft/business/bcourse/dao/BCourseRepository.java
View file @
6b21b775
...
...
@@ -17,28 +17,28 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
@Select
(
"<script>SELECT * FROM b_course where del_flag != 1 and flag = 1 and course_level = 1 "
+
"
and corp_id = #{corpId}
"
+
"
and corp_id = #{corpId}
"
+
"<if test=\"cName!=null and cName != ''\"> and c_name like CONCAT('%',#{cName},'%') </if>"
+
"ORDER BY sort</script>"
)
@ResultMap
(
value
=
"ChildListResultMap"
)
List
<
QueryCourseResDTO
>
queryCourses
(
Map
<
String
,
Object
>
param
);
@Select
(
"select *from b_course where del_flag != 1 and pid = #{pid} ORDER BY sort"
)
@Select
(
"select *from b_course where del_flag != 1 and pid = #{pid} ORDER BY sort
"
)
@ResultMap
(
value
=
"ChildListResultMap"
)
List
<
QueryCourseResDTO
>
queryCoursesByPid
(
String
parentId
);
@Select
(
"SELECT * from b_course WHERE del_flag
='0' AND flag='1'
"
+
@Select
(
"SELECT * from b_course WHERE del_flag
!= 1 AND flag = 1
"
+
"
and corp_id = #{corpId}
"
+
"
and corp_id = #{corpId}
"
+
"
AND c_name=#{cName}
"
)
"
AND c_name=#{cName}
"
)
List
<
BCourse
>
selectOneByName
(
@Param
(
"cName"
)
String
id
,
@Param
(
"corpId"
)
String
corpId
);
// @Update("UPDATE b_course SET del_flag='1' WHERE business_id = #{businessId}")
@Update
(
"<script>"
+
"<foreach collection=\"courseIds\" item=\"item\" separator=\";\">"
+
"UPDATE b_course SET del_flag
=
'1' WHERE business_id = #{item}"
+
"UPDATE b_course SET del_flag
=
'1' WHERE business_id = #{item}"
+
"</foreach>"
+
"</script>"
)
int
removeCourse
(
@Param
(
"courseIds"
)
List
<
String
>
courseIds
);
...
...
@@ -48,22 +48,22 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
@Select
(
"select DISTINCT course_level from b_course where business_id = #{pid} "
+
"and corp_id = #{corpId}"
"and corp_id = #{corpId}
"
)
int
queryParentLevel
(
@Param
(
"pid"
)
String
pid
,
@Param
(
"corpId"
)
String
corpId
);
@Select
(
"select * from b_course where course_level = 1 and del_flag != '1' and flag ='1' "
+
"
and corp_id = #{corpId}
"
+
"
and corp_id = #{corpId}
"
+
"ORDER BY sort limit #{num}"
)
"
ORDER BY sort limit #{num}"
)
@ResultMap
(
value
=
"BaseResultMapDTO"
)
List
<
QueryCourseResDTO
>
queryFirstLevel
(
@Param
(
"corpId"
)
String
corpId
,
@Param
(
"num"
)
int
num
);
@Select
(
"select DISTINCT IFNULL(("
+
"select max(sort) from b_course where pid = #{pid} "
+
"
and corp_id = #{corpId}
"
+
"
and corp_id = #{corpId}
"
+
"and del_flag = 0 and flag = 1),0)+1 as sort"
)
int
getSort
(
@Param
(
"pid"
)
String
pid
,
@Param
(
"corpId"
)
String
corpId
);
...
...
@@ -77,7 +77,7 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
"and corp_id = #{corpId} "
+
"and flag ='1'"
)
"and flag ='1'
"
)
@ResultMap
(
value
=
"AllCourseResultMap"
)
List
<
AllCourseDTO
>
findAllCourse
(
@Param
(
"corpId"
)
String
corpId
);
...
...
src/main/java/org/rcisoft/business/bcourse/service/impl/BCourseServiceImpl.java
View file @
6b21b775
...
...
@@ -92,7 +92,7 @@ public class BCourseServiceImpl implements BCourseService {
List
<
AllCourseDTO
>
allCourse
=
null
;
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotEmpty
(
id
))
{
if
(
StringUtils
.
isNotEmpty
(
id
))
{
allCourse
=
this
.
findAllCourse
(
corpId
);
}
List
<
String
>
courseIds
=
null
;
...
...
@@ -113,7 +113,7 @@ public class BCourseServiceImpl implements BCourseService {
throw
new
ServiceException
(
ResultServiceEnums
.
NAME_IS_EXISTS
);
}
UserUtil
.
setCurrentMergeOperation
(
bCourse
);
return
new
PersistModel
(
bCourseRepository
.
update
ByPrimaryKeySelectiv
e
(
bCourse
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
return
new
PersistModel
(
bCourseRepository
.
update
Cours
e
(
bCourse
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
@Override
...
...
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