Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
engine-class-work
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
liuchengjiu
engine-class-work
Commits
c8f99abc
Commit
c8f99abc
authored
Jan 27, 2022
by
Mindfaker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init data
parent
68cdb58f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
SpecialSqlMapper.java
...a/cn/exploring/engine/server/db/dao/SpecialSqlMapper.java
+8
-0
No files found.
server-db/src/main/java/cn/exploring/engine/server/db/dao/SpecialSqlMapper.java
View file @
c8f99abc
...
...
@@ -203,6 +203,14 @@ public interface SpecialSqlMapper {
)
Map
selectUnfinishLessonCount
(
@Param
(
"userId"
)
Integer
userId
);
/**
* 随机选择一个的学生
* @param classId
* @return
*/
@Select
(
"SELECT * FROM (SELECT * FROM student_info WHERE deleted = FALSE AND class_id = ${classId}) a1 LEFT JOIN ( SELECT (RAND() * max(id) ) as nid FROM student_info WHERE deleted = FALSE AND class_id = ${classId}) a2 ON a1.id > a2.nid LIMIT 1"
)
Map
<
String
,
Object
>
selectRandomStudentInfo
(
@Param
(
"classId"
)
Integer
classId
);
@Select
(
"<script> "
+
"SELECT count(*) as count_info FROM user_reduce_info WHERE deleted = FALSE"
+
"<if test='lesson_average_point != null'> AND lesson_average_point > ${lesson_average_point} </if>"
+
...
...
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