Browse Source

学生电子书列表开放时间接口不限制

tags/正式3.2.0
雍文秀 2 years ago
parent
commit
ce08b04348

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/service/itemtool/ReadService.java View File

143
      */
143
      */
144
     public List<TRead> listReadsForAndr(TRead read) {
144
     public List<TRead> listReadsForAndr(TRead read) {
145
         List<TRead> reads = readMapper.listReadsForAndr(read);
145
         List<TRead> reads = readMapper.listReadsForAndr(read);
146
-        //readDateService.setReads(reads);//关联阅读开放时间
146
+        readDateService.setReads(reads);//关联阅读开放时间
147
         return reads;
147
         return reads;
148
     }
148
     }
149
 
149
 

+ 2
- 6
sapi/src/main/resources/mapper/itemtool/ReadMapper.xml View File

35
     <!-- 获取分页资源(android) -->
35
     <!-- 获取分页资源(android) -->
36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
37
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath
37
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath
38
-        FROM t_read r left join t_read_date rd on r.readid=rd.readid
38
+        FROM t_read r
39
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
39
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
40
-        and rd.weeknum=DATE_FORMAT(CURDATE(),'%w') and CURRENT_TIME() between rd.begintime and concat(rd.endtime,':59')
41
-        group by r.readid
42
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
40
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
43
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
41
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
44
          limit #{read.page},#{read.pageSize}
42
          limit #{read.page},#{read.pageSize}
99
     <!--电子书列表-->
97
     <!--电子书列表-->
100
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
98
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
101
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath,readcomm
99
         SELECT r.readid,readname,readthumb,readauthor,readcount,createtime,readpath,readcomm
102
-        FROM t_read r left join t_read_date rd on r.readid=rd.readid
100
+        FROM t_read r
103
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
101
         WHERE (belong=2 or schoolid=#{read.schoolid}) and readstate=1
104
-        and rd.weeknum=DATE_FORMAT(CURDATE(),'%w') and CURRENT_TIME() between rd.begintime and concat(rd.endtime,':59')
105
-        group by r.readid
106
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
102
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
107
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
103
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
108
     </select>
104
     </select>

Loading…
Cancel
Save