Browse Source

专题直播

tags/正式版本
雍文秀 2 years ago
parent
commit
decba0c791

+ 74
- 0
slive/src/main/java/com/xhkjedu/slive/controller/liveplay/CsController.java View File

@@ -0,0 +1,74 @@
1
+package com.xhkjedu.slive.controller.liveplay;
2
+
3
+import com.github.pagehelper.PageHelper;
4
+import com.github.pagehelper.PageInfo;
5
+import com.xhkjedu.slive.model.liveplay.LCourse;
6
+import com.xhkjedu.slive.service.liveplay.CsService;
7
+import com.xhkjedu.slive.vo.liveplay.CourseParams;
8
+import com.xhkjedu.slive.vo.liveplay.CourseVo;
9
+import com.xhkjedu.utils.N_Utils;
10
+import com.xhkjedu.utils.PageUtil;
11
+import com.xhkjedu.vo.PageResult;
12
+import com.xhkjedu.vo.ResultVo;
13
+import org.springframework.web.bind.annotation.PostMapping;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.annotation.Resource;
19
+import java.util.List;
20
+import java.util.Map;
21
+
22
+/**
23
+ * @author ywx
24
+ * @classname CsController
25
+ * @description 专题直播
26
+ * @date 2022/9/22 16:41
27
+ **/
28
+@RestController
29
+@RequestMapping("/cs")
30
+public class CsController {
31
+    @Resource
32
+    private CsService csService;
33
+
34
+    @PostMapping("/add")
35
+    public ResultVo add(@RequestBody LCourse course) {
36
+        N_Utils.validation(new Object[]{course.getSubjectid(), "科目id", 2});
37
+        if ("NaN-aN-aN".equals(course.getBegindate()) || "NaN-aN-aN".equals(course.getEnddate())) {
38
+            return new ResultVo(1, "日期格式不正确");
39
+        }
40
+        return csService.save(course);
41
+    }
42
+
43
+    @PostMapping("/list")
44
+    public ResultVo list(@RequestBody LCourse course) {
45
+        N_Utils.validation(new Object[]{course.getPage(), "显示页码", 1
46
+                , course.getPageSize(), "显示条数", 1, course.getCreateid(), "用户id", 1});
47
+        PageHelper.startPage(course.getPage(), course.getPageSize());
48
+        List<CourseVo> list = csService.listAll(course);
49
+        PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
50
+        return new ResultVo(0, "获取课程列表成功", pageResult);
51
+    }
52
+
53
+    @PostMapping("/list_class")
54
+    public ResultVo listClass(@RequestBody LCourse course) {
55
+        Integer courseid = course.getCourseid();
56
+        N_Utils.validation(new Object[]{courseid, "课程id", 1});
57
+        List<Map> list = csService.listClass(courseid);
58
+        return new ResultVo(0, "获取课程班级列表成功", list);
59
+    }
60
+
61
+    @PostMapping("/kj_mydate")
62
+    public ResultVo listMySectionDate(@RequestBody CourseParams params) {
63
+        N_Utils.validation(new Object[]{params.getTimestr(), "月份", 2, params.getTeacherid(), "用户id", 1});
64
+        List<Map> list = csService.listMySectionDate(params);
65
+        return new ResultVo(0, "获取月份下课节数量成功", list);
66
+    }
67
+
68
+    @PostMapping("/list_mydate")
69
+    public ResultVo listMyByDate(@RequestBody CourseParams params) {
70
+        N_Utils.validation(new Object[]{params.getTimestr(), "日期", 2, params.getTeacherid(), "用户id", 1});
71
+        List<Map> list = csService.listMySection(params);
72
+        return new ResultVo(0, "获取我的课节列表成功", list);
73
+    }
74
+}

+ 23
- 0
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CsMapper.java View File

@@ -0,0 +1,23 @@
1
+package com.xhkjedu.slive.mapper.liveplay;
2
+
3
+import com.xhkjedu.slive.model.liveplay.LCourse;
4
+import com.xhkjedu.slive.vo.liveplay.CourseParams;
5
+import com.xhkjedu.slive.vo.liveplay.CourseVo;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+public interface CsMapper {
12
+    //课程列表
13
+    List<CourseVo> listAll(@Param("course") LCourse course);
14
+
15
+    //课程班级
16
+    List<Map> listClass(@Param("courseid") Integer courseid);
17
+
18
+    //我的月份下日期课节数量
19
+    List<Map> listMySectionDate(@Param("section") CourseParams params);
20
+
21
+    //我的课程列表
22
+    List<Map> listMySection(@Param("section") CourseParams params);
23
+}

+ 3
- 0
slive/src/main/java/com/xhkjedu/slive/model/liveplay/LCourse.java View File

@@ -78,6 +78,9 @@ public class LCourse extends BaseBean {
78 78
     //课程类别0专题直播1行政直播
79 79
     private Integer courseclass;
80 80
 
81
+    //直播学校0单个1多个
82
+    private Integer courseschool;
83
+
81 84
     //直播课节详情id
82 85
     private Integer kjid;
83 86
 

+ 1
- 0
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseService.java View File

@@ -105,6 +105,7 @@ public class CourseService {
105 105
             model.setClassid(classid);
106 106
             model.setDeleted(1);
107 107
             model.setCourseclass(0);
108
+            model.setCourseschool(0);
108 109
             courseMapper.insertUseGeneratedKeys(model);
109 110
             List<ClassVo> classes = new ArrayList<>();
110 111
             if (model.getCoursetype() == 1) {

+ 218
- 0
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CsService.java View File

@@ -0,0 +1,218 @@
1
+package com.xhkjedu.slive.service.liveplay;
2
+
3
+import com.xhkjedu.slive.mapper.gradeclass.ClassTeacherMapper;
4
+import com.xhkjedu.slive.mapper.gradeclass.SchoolMapper;
5
+import com.xhkjedu.slive.mapper.liveplay.CourseClassMapper;
6
+import com.xhkjedu.slive.mapper.liveplay.CourseMapper;
7
+import com.xhkjedu.slive.mapper.liveplay.CsMapper;
8
+import com.xhkjedu.slive.mapper.system.UserMapper;
9
+import com.xhkjedu.slive.model.gradeclass.TClass;
10
+import com.xhkjedu.slive.model.gradeclass.TClassTeacher;
11
+import com.xhkjedu.slive.model.liveplay.LCourse;
12
+import com.xhkjedu.slive.model.liveplay.LCourseClass;
13
+import com.xhkjedu.slive.model.notice.TNotice;
14
+import com.xhkjedu.slive.service.gradeclass.ClassService;
15
+import com.xhkjedu.slive.service.notice.NoticeService;
16
+import com.xhkjedu.slive.vo.gradeclass.ClassVo;
17
+import com.xhkjedu.slive.vo.liveplay.CourseParams;
18
+import com.xhkjedu.slive.vo.liveplay.CourseVo;
19
+import com.xhkjedu.utils.N_Utils;
20
+import com.xhkjedu.vo.ResultVo;
21
+import lombok.extern.slf4j.Slf4j;
22
+import org.springframework.beans.BeansException;
23
+import org.springframework.stereotype.Service;
24
+import org.springframework.transaction.annotation.Transactional;
25
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
26
+
27
+import javax.annotation.Resource;
28
+import java.util.ArrayList;
29
+import java.util.List;
30
+import java.util.Map;
31
+
32
+/**
33
+ * @author ywx
34
+ * @classname CourseService
35
+ * @description
36
+ * @date 2021/1/15 12:33
37
+ **/
38
+@Service
39
+@Slf4j
40
+public class CsService {
41
+    @Resource
42
+    private CourseMapper courseMapper;
43
+    @Resource
44
+    private ClassService classService;
45
+    @Resource
46
+    private ClassTeacherMapper classTeacherMapper;
47
+    @Resource
48
+    private NoticeService noticeService;
49
+    @Resource
50
+    private SchoolMapper schoolMapper;
51
+    @Resource
52
+    private UserMapper userMapper;
53
+    @Resource
54
+    private CourseClassMapper courseClassMapper;
55
+    @Resource
56
+    private CsMapper csMapper;
57
+
58
+    //添加
59
+    @Transactional(rollbackFor = Exception.class)
60
+    public ResultVo save(LCourse model) {
61
+        try {
62
+            List<Map> users = new ArrayList<>();
63
+            if (model.getCoursetype() == 1) {
64
+                if (N_Utils.isListEmpty(model.getClassids())) {
65
+                    return new ResultVo(1, "班级id集合不能为空");
66
+                }
67
+                users = courseMapper.listUid(model.getClassids());//获取课程学生id集合
68
+                if (N_Utils.isListEmpty(users)) {
69
+                    return new ResultVo(1, "直播班级学生为空");
70
+                }
71
+            }
72
+            model.setStunum(0);
73
+            model.setCoursestate(0);
74
+            model.setCreatetime(N_Utils.getSecondTimestamp());
75
+            String coursename = model.getCoursename();
76
+            Integer createid = model.getCreateid();
77
+            Integer schoolid = model.getSchoolid();
78
+            Integer teacherid = model.getTeacherid();
79
+            //班级信息
80
+            TClass c = new TClass();
81
+            c.setClassname(coursename + "班");
82
+            c.setCreateid(createid);
83
+            c.setSchoolid(schoolid);
84
+            Integer year = schoolMapper.getYearById(schoolid);
85
+            c.setSchoolyear(year);
86
+            c.setYear(year);
87
+            c.setClassorder(999);
88
+            c.setGradeid(model.getGradeid());
89
+
90
+            if (model.getCoursetype() == 1) {
91
+                c.setClasstype(99);//已直播班级
92
+            } else {
93
+                c.setClasstype(3);//直播班(学生选班)
94
+            }
95
+
96
+            Integer classid = classService.save(c);
97
+            if (!N_Utils.isEmptyInteger(teacherid)) {
98
+                //班级教师
99
+                TClassTeacher teacher = new TClassTeacher();
100
+                teacher.setClassid(classid);
101
+                teacher.setTeacherid(teacherid);
102
+                teacher.setCreateid(createid);
103
+                teacher.setCreatetime(N_Utils.getSecondTimestamp());
104
+                teacher.setSchoolid(schoolid);
105
+
106
+                classTeacherMapper.insertSelective(teacher);
107
+            }
108
+            //课程信息
109
+            model.setClassid(classid);
110
+            model.setDeleted(1);
111
+            model.setCourseclass(0);
112
+            model.setCourseschool(1);
113
+            courseMapper.insertUseGeneratedKeys(model);
114
+            List<ClassVo> classes = new ArrayList<>();
115
+            if (model.getCoursetype() == 1) {
116
+                Integer courseid = model.getId();
117
+                List<Integer> studentids = new ArrayList<>();
118
+                users.forEach(userVo -> {
119
+                    studentids.add((Integer) userVo.get("userid"));
120
+                });
121
+
122
+                classService.batchSaveStu(createid, schoolid, classid, studentids);//批量添加报名学生
123
+                courseMapper.updateStuNum(courseid);//更新已报学生数量
124
+
125
+                //保存直播关联班级
126
+                List<LCourseClass> cclist = new ArrayList<>();
127
+                for(Integer cid : model.getClassids()){
128
+                    LCourseClass cc = new LCourseClass();
129
+                    cc.setCourseid(courseid);
130
+                    cc.setClassid(cid);
131
+                    cc.setCreateid(model.getCreateid());
132
+                    cc.setCreatetime(N_Utils.getSecondTimestamp());
133
+                    cclist.add(cc);
134
+                    //通知班级
135
+                    ClassVo classVo = new ClassVo();
136
+                    classVo.setClassid(cid);
137
+                    classes.add(classVo);
138
+                }
139
+                courseClassMapper.insertList(cclist);//保存原班级和直播的关联关系
140
+            }
141
+
142
+            //通知信息
143
+            StringBuffer sbcomm = new StringBuffer(); //通知消息体
144
+            sbcomm.append("同学你好:本次直播课程为《").append(model.getCoursename()).append("》,共有").append(model.getCoursenum());
145
+            sbcomm.append("节课程,每节").append(model.getDuration()).append("分钟");
146
+            sbcomm.append("\n开课日期:").append(model.getBegindate()).append(",");
147
+            sbcomm.append("上课时间:").append(model.getBegintime());
148
+            if (!N_Utils.isEmptyInteger(teacherid)) {
149
+                String teachername = userMapper.getUserNameById(model.getTeacherid());
150
+                sbcomm.append(",主讲教师为").append(teachername).append("。");
151
+            }
152
+            if(N_Utils.isNotEmpty(model.getComm())){
153
+                sbcomm.append("\n主要内容为:").append(model.getComm());
154
+            }
155
+
156
+            if(model.getCoursetype()==0){
157
+                String strtime = N_Utils.getStrtimeTimestamp(model.getStarttime(),"yyyy-MM-dd HH:mm");
158
+                String littime = N_Utils.getStrtimeTimestamp(model.getLimitstamp(),"yyyy-MM-dd HH:mm");
159
+                sbcomm.append("\n报名日期:").append(strtime).append("至").append(littime).append("  ");
160
+                sbcomm.append("\n请同学在规定时间内进行报名。");
161
+            }
162
+
163
+            TNotice n = new TNotice();
164
+            StringBuilder sb = new StringBuilder();
165
+            sb.append(coursename);
166
+            sb.append("(开课时间:");
167
+            sb.append(model.getBegindate()).append(" ").append(model.getBegintime());
168
+            sb.append(")");
169
+            n.setNoticetitle(sb.toString());
170
+            n.setNoticecontent(sbcomm.toString());
171
+            n.setNoticetxt(sbcomm.toString());
172
+            n.setNoticetype(1);
173
+
174
+            if(model.getCoursetype()==0){
175
+                //如果是学生选课,选择的有年级,则通知关联年级下所有班级
176
+                List<Integer> classids = classService.listClassidsByGradeid(model.getGradeid(),model.getSchoolid());
177
+                if(classids!=null && classids.size()>0){
178
+                    for(Integer cid : classids){
179
+                        ClassVo classVo = new ClassVo();
180
+                        classVo.setClassid(cid);
181
+                        classes.add(classVo);
182
+                    }
183
+                }
184
+            }
185
+
186
+            n.setClasses(classes);
187
+            n.setCreateid(createid);
188
+            n.setCreatetime(model.getCreatetime());
189
+            n.setSchoolid(schoolid);
190
+            noticeService.save(n);
191
+            return new ResultVo(0, "保存成功", model.getId());
192
+        } catch (BeansException e) {
193
+            log.error("添加课程失败", e.getMessage());
194
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
195
+            return new ResultVo(1, "保存失败");
196
+        }
197
+    }
198
+
199
+    //获取列表
200
+    public List<CourseVo> listAll(LCourse course) {
201
+        return csMapper.listAll(course);
202
+    }
203
+
204
+    //课程班级
205
+    public List<Map> listClass(Integer courseid) {
206
+        return csMapper.listClass(courseid);
207
+    }
208
+
209
+    //我的月份下日期课节数量
210
+    public List<Map> listMySectionDate(CourseParams params) {
211
+        return csMapper.listMySectionDate(params);
212
+    }
213
+
214
+    //我的课程列表
215
+    public List<Map> listMySection(CourseParams params) {
216
+        return csMapper.listMySection(params);
217
+    }
218
+}

+ 3
- 10
slive/src/main/java/com/xhkjedu/slive/service/xz/XzService.java View File

@@ -7,11 +7,7 @@ import com.xhkjedu.slive.mapper.liveplay.CourseMapper;
7 7
 import com.xhkjedu.slive.mapper.liveplay.CourseSectionMapper;
8 8
 import com.xhkjedu.slive.mapper.xz.XzKjMapper;
9 9
 import com.xhkjedu.slive.mapper.xz.XzMapper;
10
-import com.xhkjedu.slive.model.gradeclass.TClass;
11
-import com.xhkjedu.slive.model.gradeclass.TClassStudent;
12
-import com.xhkjedu.slive.model.gradeclass.TClassTeacher;
13
-import com.xhkjedu.slive.model.gradeclass.TGroup;
14
-import com.xhkjedu.slive.model.gradeclass.TGroupStudent;
10
+import com.xhkjedu.slive.model.gradeclass.*;
15 11
 import com.xhkjedu.slive.model.liveplay.LCourse;
16 12
 import com.xhkjedu.slive.model.liveplay.LCourseClass;
17 13
 import com.xhkjedu.slive.model.liveplay.LCourseSection;
@@ -23,11 +19,7 @@ import com.xhkjedu.slive.utils.PoiUtils;
23 19
 import com.xhkjedu.slive.vo.gradeclass.CStudentVo;
24 20
 import com.xhkjedu.slive.vo.gradeclass.CTeacherVo;
25 21
 import com.xhkjedu.slive.vo.liveplay.CourseVo;
26
-import com.xhkjedu.slive.vo.xz.XzClassVo;
27
-import com.xhkjedu.slive.vo.xz.XzDateKjTeaVo;
28
-import com.xhkjedu.slive.vo.xz.XzDateKjVo;
29
-import com.xhkjedu.slive.vo.xz.XzDateVo;
30
-import com.xhkjedu.slive.vo.xz.XzKjVo;
22
+import com.xhkjedu.slive.vo.xz.*;
31 23
 import com.xhkjedu.utils.N_Utils;
32 24
 import com.xhkjedu.vo.ResultVo;
33 25
 import lombok.extern.slf4j.Slf4j;
@@ -414,6 +406,7 @@ public class XzService {
414 406
             classTeacherMapper.insertSelective(teacher);
415 407
 
416 408
             //保存课程信息
409
+            course.setCourseschool(0);
417 410
             courseMapper.insertUseGeneratedKeys(course);
418 411
             courseid = course.getId();//课程id
419 412
 

+ 102
- 0
slive/src/main/resources/mapper/liveplay/CsMapper.xml View File

@@ -0,0 +1,102 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.xhkjedu.slive.mapper.liveplay.CsMapper">
4
+    <!--课程列表-->
5
+    <select id="listAll" resultType="com.xhkjedu.slive.vo.liveplay.CourseVo">
6
+        select
7
+        c.courseid,c.coursename,c.gradeid,c.begindate,c.enddate,c.coursenum,c.begintime,c.endtime,c.duration,c.limitstamp
8
+        ,c.limitstu,c.stunum,c.coursestate,c.courseselected,c.coursetype,c.comm,c.teacherid,c.classid,c.starttime,c.createid
9
+        ,c.subjectid,s.subjectname,ct.typename,c.ctypeid
10
+        ,count(distinct case when cs.sectionstate=3 then cs.sectionid else null end)sectionnum
11
+        ,count(distinct case when cs.sectionstate=2 then cs.sectionid else null end)insectionnum
12
+        ,concat('[',group_concat(distinct json_object('teachername',u.username,'headpic',u.headpic)),']')teachername
13
+        ,group_concat( date_format(cs.sectiondate ,'%m月%d日') separator '、')sectiondate
14
+        from l_course c left join l_course_section cs on cs.courseid=c.courseid
15
+        left join t_user u on cs.teacherid=u.userid
16
+        left join t_subject s on c.subjectid = s.subjectid
17
+        left join l_course_type ct on c.ctypeid = ct.ctypeid
18
+        <if test="course.classid!=null and course.classid!=0">
19
+            left join l_course_class cc on cc.courseid=c.courseid
20
+        </if>
21
+        where c.createid=#{course.createid} and c.deleted=1 and c.courseschool=1
22
+        <if test="course.subjectid!=null and course.subjectid!='0'.toString() and course.subjectid!=''">
23
+            and c.subjectid=#{course.subjectid}
24
+        </if>
25
+        <if test="course.coursename!=null and course.coursename!=''">
26
+            and c.coursename like '%${course.coursename}%'
27
+        </if>
28
+        <if test="course.coursestate!=null">
29
+            and c.coursestate=#{course.coursestate}
30
+        </if>
31
+        <if test="course.today!=null and course.today==1">
32
+            and cs.sectiondate=date_format(now(),'%Y-%m-%d')
33
+        </if>
34
+        <if test="course.coursetype!=null">
35
+            and c.coursetype=#{course.coursetype}
36
+        </if>
37
+        <if test="course.ctypeid!=null and course.ctypeid!=0">
38
+            and ct.ctypeid=#{course.ctypeid}
39
+        </if>
40
+        <if test="course.createid!=null and course.createid!=0">
41
+            and c.createid=#{course.createid}
42
+        </if>
43
+        <if test="course.classid!=null and course.classid!=0">
44
+            and cc.classid=#{course.classid}
45
+        </if>
46
+        <if test="course.teachername!=null and course.teachername!=''">
47
+            and u.username like '%${course.teachername}%'
48
+        </if>
49
+        group by c.courseid order by c.courseid desc
50
+    </select>
51
+    <!--课程班级-->
52
+    <resultMap id="classResult" type="java.util.Map">
53
+        <result property="schoolid" column="schoolid"></result>
54
+        <result property="schoolname" column="schoolname"></result>
55
+        <collection property="classes" ofType="java.util.Map" javaType="java.util.List">
56
+            <result property="classid" column="classid"></result>
57
+            <result property="gradeid" column="gradeid"></result>
58
+            <result property="classname" column="classname"></result>
59
+        </collection>
60
+    </resultMap>
61
+    <select id="listClass" resultMap="classResult">
62
+        select lcc.classid,tc.gradeid,tc.classname,ts.schoolid,ts.schoolname
63
+        from l_course_class lcc left join t_class tc on lcc.classid = tc.classid
64
+        left join t_school ts on tc.schoolid = ts.schoolid
65
+        where lcc.courseid=#{courseid}
66
+    </select>
67
+    <!--我的月份下日期课节数量-->
68
+    <select id="listMySectionDate" resultType="java.util.Map">
69
+        select cs.sectiondate as timestr,count(distinct cs.sectionid)as num
70
+        ,count(distinct case when cs.sectionstate=0 then cs.sectionid else null end)wksnum
71
+        ,count(distinct case when cs.sectionstate=2 then cs.sectionid else null end)jxznum
72
+        ,count(distinct case when cs.sectionstate=3 then cs.sectionid else null end)yjsnum
73
+        ,count(distinct case when cs.sectionstate=4 then cs.sectionid else null end)ygqnum
74
+        from l_course_section cs left join l_course c on cs.courseid = c.courseid
75
+        where cs.teacherid=#{section.teacherid} and c.deleted=1 and c.courseschool=1 and DATE_FORMAT(cs.sectiondate, '%Y-%m')=#{section.timestr}
76
+        <if test="section.cstate!=null and section.cstate!=-1">
77
+            and cs.sectionstate=#{section.cstate}
78
+        </if>
79
+        <if test="section.sectionname!=null and section.sectionname!=''">
80
+            and cs.sectionname like '%${section.sectionname}%'
81
+        </if>
82
+        group by cs.sectiondate order by cs.sectiondate asc
83
+    </select>
84
+    <!--我的课程列表-->
85
+    <select id="listMySection" resultType="java.util.Map">
86
+        select c.courseid,c.gradeid,c.stunum,c.comm,c.createid,c.classid
87
+        ,(select t.typename from l_course_type t where t.ctypeid=c.ctypeid)typename
88
+        ,cs.sectionid,cs.sectionname,cs.sectiondate,cs.teacherid,cs.stunum cynum
89
+        ,cs.planbegintime,cs.planendtime,cs.begintime,cs.endtime,cs.sectionstate
90
+        ,(UNIX_TIMESTAMP(CONCAT(cs.sectiondate,' ',cs.planendtime))-UNIX_TIMESTAMP(CONCAT(cs.sectiondate,' ',cs.planbegintime))) totaltime
91
+        ,(select count(*) from l_course_section_playback p where p.sectionid=cs.sectionid and p.pb is not null)playnum
92
+        from l_course_section cs left join l_course c on cs.courseid = c.courseid
93
+        where cs.teacherid=#{section.teacherid} and c.deleted=1 and c.courseschool=1 and cs.sectiondate=#{section.timestr}
94
+        <if test="section.cstate!=null and section.cstate!=-1">
95
+            and cs.sectionstate=#{section.cstate}
96
+        </if>
97
+        <if test="section.sectionname!=null and section.sectionname!=''">
98
+            and cs.sectionname like '%${section.sectionname}%'
99
+        </if>
100
+        order by cs.sectionstate,abs(UNIX_TIMESTAMP(concat(cs.sectiondate,' ',cs.planbegintime))-UNIX_TIMESTAMP(now())),cs.sectionid
101
+    </select>
102
+</mapper>

Loading…
Cancel
Save