Browse Source

预习列表返回创建人id

tags/正式3.9.0
雍文秀 1 year ago
parent
commit
29753ea1e7

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/resource/GuideVo.java View File

20
 
20
 
21
     private Integer createtime;//创建时间
21
     private Integer createtime;//创建时间
22
 
22
 
23
+    private Integer createid;//创建人id
24
+
23
     private String createname;//发布人姓名
25
     private String createname;//发布人姓名
24
 
26
 
25
     private Integer costtime;//用时
27
     private Integer costtime;//用时

+ 4
- 3
sstudy/src/main/resources/mapper/resource/GuideMapper.xml View File

9
         <result column="createtime" property="createtime"></result>
9
         <result column="createtime" property="createtime"></result>
10
         <result column="costtime" property="costtime"></result>
10
         <result column="costtime" property="costtime"></result>
11
         <result column="subjectname" property="subjectname"></result>
11
         <result column="subjectname" property="subjectname"></result>
12
+        <result column="createid" property="createid"></result>
12
         <collection property="resources" ofType="java.util.Map"
13
         <collection property="resources" ofType="java.util.Map"
13
                     javaType="java.util.List" select="listResourcesByGuideid" column="{guideid=guideid}">
14
                     javaType="java.util.List" select="listResourcesByGuideid" column="{guideid=guideid}">
14
         </collection>
15
         </collection>
16
 
17
 
17
     <!--学生预习列表教师网页端-->
18
     <!--学生预习列表教师网页端-->
18
     <select id="listGuidesForTeacherWeb" resultMap="guidesForMap">
19
     <select id="listGuidesForTeacherWeb" resultMap="guidesForMap">
19
-        select distinct g.guideid,g.guidename,g.createtime,g.schoolid
20
+        select distinct g.guideid,g.guidename,g.createtime,g.schoolid,g.createid
20
         ,(select u.username from t_user u where g.createid=u.userid)createname
21
         ,(select u.username from t_user u where g.createid=u.userid)createname
21
         from t_guide g left join t_guide_resource gr on g.guideid=gr.guideid
22
         from t_guide g left join t_guide_resource gr on g.guideid=gr.guideid
22
         left join t_guide_group gg on g.guideid = gg.guideid
23
         left join t_guide_group gg on g.guideid = gg.guideid
130
 
131
 
131
     <!--根据预习id获取预习详情-->
132
     <!--根据预习id获取预习详情-->
132
     <select id="getGuideByGuideid" resultMap="guidesForMap">
133
     <select id="getGuideByGuideid" resultMap="guidesForMap">
133
-      select g.guideid,g.guidename,g.createtime,g.schoolid,u.username as createname
134
+      select g.guideid,g.guidename,g.createtime,g.schoolid,g.createid,u.username as createname
134
         from t_guide g
135
         from t_guide g
135
         left join t_user u on g.createid=u.userid
136
         left join t_user u on g.createid=u.userid
136
         where g.guideid=#{guideid}
137
         where g.guideid=#{guideid}
185
     </select>
186
     </select>
186
     <!--获取年级下教师发布学生预习列表-->
187
     <!--获取年级下教师发布学生预习列表-->
187
     <select id="listPreview" resultMap="guidesForMap">
188
     <select id="listPreview" resultMap="guidesForMap">
188
-        select g.guideid,g.guidename,g.createtime,g.schoolid,count(distinct gr.grid)as filenum
189
+        select g.guideid,g.guidename,g.createtime,g.schoolid,g.createid,count(distinct gr.grid)as filenum
189
         ,(select u.username from t_user u where u.userid=g.createid)createname
190
         ,(select u.username from t_user u where u.userid=g.createid)createname
190
         from t_guide g
191
         from t_guide g
191
         left join t_guide_group gg on gg.guideid=g.guideid
192
         left join t_guide_group gg on gg.guideid=g.guideid

Loading…
Cancel
Save