Browse Source

试题、资源列表返回学校id

资源详情返回分享集团校数量
tags/正式3.11.0
雍文秀 1 year ago
parent
commit
953f1b0497

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

106
 
106
 
107
     //资源关联章节
107
     //资源关联章节
108
     private List<DirectorVo> directors;
108
     private List<DirectorVo> directors;
109
+
110
+    private Integer sharenum;//分享集团校数量
109
 }
111
 }

+ 2
- 2
sstudy/src/main/resources/mapper/question/QuestionMapper.xml View File

120
     </select>
120
     </select>
121
     <!--管理端试题列表-->
121
     <!--管理端试题列表-->
122
     <select id="findAll" resultType="java.util.Map">
122
     <select id="findAll" resultType="java.util.Map">
123
-        select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong,q.createid
123
+        select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong,q.createid,q.schoolid
124
         ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname,q.hashear,q.hearfile,q.qlevel
124
         ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname,q.hashear,q.hearfile,q.qlevel
125
         ,(select count(*) from t_question q2 where q2.shareqid=q.questionid and q2.qstate=1 and q.schoolid=#{question.schoolid})sharenum
125
         ,(select count(*) from t_question q2 where q2.shareqid=q.questionid and q2.qstate=1 and q.schoolid=#{question.schoolid})sharenum
126
         from t_question q
126
         from t_question q
194
     <select id="listForSelect" resultType="java.util.Map">
194
     <select id="listForSelect" resultType="java.util.Map">
195
         select q.questionid,q.score,q.complexity,q.qstem,q.qstemtxt,q.qoption,q.qanswer,q.qanalyze
195
         select q.questionid,q.score,q.complexity,q.qstem,q.qstemtxt,q.qoption,q.qanswer,q.qanalyze
196
         ,q.qtypeid,q.qtypename,q.count,q.ctype,q.source,q.year,q.region,q.schoolname
196
         ,q.qtypeid,q.qtypename,q.count,q.ctype,q.source,q.year,q.region,q.schoolname
197
-        ,q.qlevel,q.hearfile,q.hashear,q.belong,q.createid
197
+        ,q.qlevel,q.hearfile,q.hashear,q.belong,q.createid,q.schoolid
198
         ,(select count(*) from t_question q2 where q2.shareqid=q.questionid and q2.qstate=1 and q.schoolid=#{question.schoolid})sharenum
198
         ,(select count(*) from t_question q2 where q2.shareqid=q.questionid and q2.qstate=1 and q.schoolid=#{question.schoolid})sharenum
199
         from t_question q
199
         from t_question q
200
         <if test="question.pointid!=null and question.pointid!='0'.toString() and question.pointid!=''">
200
         <if test="question.pointid!=null and question.pointid!='0'.toString() and question.pointid!=''">

+ 3
- 1
sstudy/src/main/resources/mapper/resource/ResourceMapper.xml View File

12
     <select id="findAll" resultType="java.util.Map">
12
     <select id="findAll" resultType="java.util.Map">
13
         select r.resourceid,r.resourcename,r.createtime,r.suffix,u.username createname,r.resourceurl,rd.lsbid,
13
         select r.resourceid,r.resourcename,r.createtime,r.suffix,u.username createname,r.resourceurl,rd.lsbid,
14
         rd.directorid,r.resourceclass,r.resourcetype,r.readcount,r.downcount,r.pdfurl,r.converted,r.resourcecover
14
         rd.directorid,r.resourceclass,r.resourcetype,r.readcount,r.downcount,r.pdfurl,r.converted,r.resourcecover
15
-        ,r.comm,r.duration,r.resourcesize,r.mp4code,r.createid,r.belong
15
+        ,r.comm,r.duration,r.resourcesize,r.mp4code,r.createid,r.belong,r.schoolid
16
         ,r.resourcegrade,r.source,r.year,r.region,r.schoolname
16
         ,r.resourcegrade,r.source,r.year,r.region,r.schoolname
17
         ,(select count(*) from t_resource r2 where r2.resourcepid=r.resourceid and r.resourcestate=1)sharenum
17
         ,(select count(*) from t_resource r2 where r2.resourcepid=r.resourceid and r.resourcestate=1)sharenum
18
         from t_resource r left join t_user u on u.userid=r.createid
18
         from t_resource r left join t_user u on u.userid=r.createid
140
         <result property="lsbnum" column="lsbnum"/>
140
         <result property="lsbnum" column="lsbnum"/>
141
         <result property="directornum" column="directornum"/>
141
         <result property="directornum" column="directornum"/>
142
         <result property="areaall" column="areaall"/>
142
         <result property="areaall" column="areaall"/>
143
+        <result property="sharenum" column="sharenum"/>
143
         <collection property="directors" ofType="com.xhkjedu.sstudy.vo.subjectbook.DirectorVo" javaType="java.util.List">
144
         <collection property="directors" ofType="com.xhkjedu.sstudy.vo.subjectbook.DirectorVo" javaType="java.util.List">
144
             <result property="lsbid" column="lsbid"/>
145
             <result property="lsbid" column="lsbid"/>
145
             <result property="directorid" column="directorid"/>
146
             <result property="directorid" column="directorid"/>
155
         select r.*,u.username createname,rd.lsbid,rd.directorid,d.directorall as directorname
156
         select r.*,u.username createname,rd.lsbid,rd.directorid,d.directorall as directorname
156
         ,sb.level,sb.subjectid,s.subjectname,v.versionname,sb.lsbname
157
         ,sb.level,sb.subjectid,s.subjectname,v.versionname,sb.lsbname
157
         ,(select a.areaall from t_areazone a where a.areacode=r.region)areaall
158
         ,(select a.areaall from t_areazone a where a.areacode=r.region)areaall
159
+        ,(select count(*) from t_resource r2 where r2.resourcepid=r.resourceid and r.resourcestate=1)sharenum
158
         from t_resource r left join t_user u on u.userid=r.createid
160
         from t_resource r left join t_user u on u.userid=r.createid
159
         left join t_resource_director rd on r.resourceid = rd.resourceid
161
         left join t_resource_director rd on r.resourceid = rd.resourceid
160
         left join t_director d on rd.directorid = d.directorid
162
         left join t_director d on rd.directorid = d.directorid

Loading…
Cancel
Save