ソースを参照

教师教研相关、预习作业相关

tags/正式3.10.0
王宁 1年前
コミット
3461eb85c9

+ 2
- 1
sapi/src/main/java/com/xhkjedu/sapi/controller/research/ResearchUserController.java ファイルの表示

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
18 18
 import org.springframework.web.bind.annotation.RestController;
19 19
 
20 20
 import java.util.List;
21
+import java.util.Map;
21 22
 
22 23
 /**
23 24
  * @ClassName ResearchUserController
@@ -66,7 +67,7 @@ public class ResearchUserController {
66 67
                 researchUser.getPage(),"显示页码",1,researchUser.getPageSize(),"显示条数",1,
67 68
                 researchUser.getUserid(),"教师id",1,researchUser.getRorder(),"排序",2});
68 69
         PageHelper.startPage(researchUser.getPage(), researchUser.getPageSize());
69
-        List<ResearchVo> list = researchUserService.listUserResearchs(researchUser.getUserid(),researchUser.getRorder(),researchUser.getRustate());
70
+        List<Map> list = researchUserService.listUserResearchs(researchUser.getUserid(), researchUser.getRorder(), researchUser.getRustate());
70 71
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
71 72
         return new ResultVo(0,"获取教师教研列表成功",pageResult);
72 73
     }

+ 2
- 1
sapi/src/main/java/com/xhkjedu/sapi/mapper/research/ResearchUserMapper.java ファイルの表示

@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
8 8
 import org.springframework.stereotype.Repository;
9 9
 
10 10
 import java.util.List;
11
+import java.util.Map;
11 12
 
12 13
 /**
13 14
  * @ClassName ResearchUserMapper
@@ -65,7 +66,7 @@ public interface ResearchUserMapper extends TkMapper<TResearchUser> {
65 66
      * @param timestamp
66 67
      * @return java.util.List<com.xhkjedu.vo.research.ResearchVo>
67 68
      */
68
-    List<ResearchVo> listUserResearchs(@Param("userid") Integer userid, @Param("rorder") String rorder
69
+    List<Map> listUserResearchs(@Param("userid") Integer userid, @Param("rorder") String rorder
69 70
             , @Param("rustate") Integer rustate, @Param("timestamp") int timestamp);
70 71
 
71 72
     /**

+ 2
- 1
sapi/src/main/java/com/xhkjedu/sapi/service/research/ResearchUserService.java ファイルの表示

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
11 11
 import org.springframework.stereotype.Service;
12 12
 
13 13
 import java.util.List;
14
+import java.util.Map;
14 15
 
15 16
 /**
16 17
  * @ClassName ResearchUserService
@@ -46,7 +47,7 @@ public class ResearchUserService {
46 47
      * @param rorder
47 48
      * @return java.util.List<com.xhkjedu.vo.research.ResearchVo>
48 49
      */
49
-    public List<ResearchVo> listUserResearchs(Integer userid,String rorder,Integer rustate){
50
+    public List<Map> listUserResearchs(Integer userid, String rorder, Integer rustate){
50 51
         return researchUserMapper.listUserResearchs(userid,rorder,rustate,N_Utils.getSecondTimestamp());
51 52
     }
52 53
 

+ 3
- 3
sapi/src/main/resources/mapper/research/ResearchUserMapper.xml ファイルの表示

@@ -30,14 +30,14 @@
30 30
     </select>
31 31
 
32 32
     <!-- 教师参与教研列表 -->
33
-    <select id="listUserResearchs" resultType="com.xhkjedu.sapi.vo.research.ResearchVo">
33
+    <select id="listUserResearchs" resultType="java.util.Map">
34 34
          SELECT r.researchid,r.researchname,r.researchcover,r.duration,r.filesize,r.starttime,r.stoptime,r.mp4code,
35
-        r.createid,r.createtime,u.username AS createname,r.readnum,r.researchpath,ru.rustate
35
+        r.createid,r.createtime,u.username AS createname,r.readnum,r.researchpath,r.publiced,ru.rustate,ru.schoolid
36 36
         FROM t_research_user ru LEFT JOIN t_research r ON ru.researchid=r.researchid
37 37
         LEFT JOIN t_user u ON r.createid=u.userid
38 38
         WHERE ru.userid=#{userid} and r.starttime&lt;=#{timestamp}
39 39
         <if test="rustate!=null"> and ru.rustate=#{rustate}</if>
40
-        GROUP BY r.researchid ORDER BY ru.rustate
40
+        GROUP BY r.researchid ORDER BY ru.rustate,r.createtime desc
41 41
         <if test="rorder=='stoptime'">,r.stoptime DESC</if>
42 42
         <if test="rorder=='readnum'">,r.readnum DESC</if>
43 43
         <if test="rorder=='createtime'">,r.createtime DESC</if>

読み込み中…
キャンセル
保存