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
8d0c3167
Commit
8d0c3167
authored
Sep 19, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
course
parent
d639b6c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
BCourseRepository.java
...a/org/rcisoft/business/bcourse/dao/BCourseRepository.java
+1
-1
BCourse.java
...ain/java/org/rcisoft/business/bcourse/entity/BCourse.java
+5
-0
BCourseMapper.xml
...esources/mapper/business/bcourse.mapper/BCourseMapper.xml
+3
-0
No files found.
src/main/java/org/rcisoft/business/bcourse/dao/BCourseRepository.java
View file @
8d0c3167
...
@@ -18,7 +18,7 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
...
@@ -18,7 +18,7 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
@Select
(
"<script>SELECT * FROM b_course where del_flag != 1 and flag = 1 "
+
@Select
(
"<script>SELECT * FROM b_course where del_flag != 1 and flag = 1 "
+
"<if test=\"condition!=null and condition != ''\"> and c_name like CONCAT('%',#{condition},'%') </if>"
+
"<if test=\"condition!=null and condition != ''\"> and c_name like CONCAT('%',#{condition},'%') </if>"
+
"ORDER BY order_by</script>"
)
"ORDER BY order_by</script>"
)
@ResultMap
(
value
=
"
Base
ResultMap"
)
@ResultMap
(
value
=
"
ChildList
ResultMap"
)
List
<
BCourse
>
selectCourses
(
BCourse
bCourse
);
List
<
BCourse
>
selectCourses
(
BCourse
bCourse
);
...
...
src/main/java/org/rcisoft/business/bcourse/entity/BCourse.java
View file @
8d0c3167
...
@@ -4,11 +4,13 @@ import lombok.AllArgsConstructor;
...
@@ -4,11 +4,13 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
javax.persistence.Transient
;
import
java.util.List
;
@Entity
@Entity
@Table
(
name
=
"b_course"
)
@Table
(
name
=
"b_course"
)
...
@@ -29,4 +31,7 @@ public class BCourse extends IdEntity<BCourse> {
...
@@ -29,4 +31,7 @@ public class BCourse extends IdEntity<BCourse> {
@Transient
@Transient
private
String
condition
;
//模糊查询条件
private
String
condition
;
//模糊查询条件
@Transient
private
List
<
BCourseRepository
>
childList
;
}
}
src/main/resources/mapper/business/bcourse.mapper/BCourseMapper.xml
View file @
8d0c3167
...
@@ -15,4 +15,7 @@
...
@@ -15,4 +15,7 @@
<result
column=
"order_by"
jdbcType=
"VARCHAR"
property=
"orderBy"
/>
<result
column=
"order_by"
jdbcType=
"VARCHAR"
property=
"orderBy"
/>
</resultMap>
</resultMap>
<resultMap
id=
"ChildListResultMap"
type=
"org.rcisoft.business.bcourse.entity.BCourse"
extends=
"BaseResultMap"
>
<association
column=
"business_id"
property=
"childList"
select=
"org.rcisoft.business.bcourse.dao.BCourseRepository.selectCourses"
></association>
</resultMap>
</mapper>
</mapper>
\ No newline at end of file
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