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

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

@@ -35,10 +35,8 @@
35 35
     <!-- 获取分页资源(android) -->
36 36
     <select id="listReadsForAndr" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
37 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 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 40
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
43 41
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
44 42
          limit #{read.page},#{read.pageSize}
@@ -99,10 +97,8 @@
99 97
     <!--电子书列表-->
100 98
     <select id="listReadForStuWeb" resultType="com.xhkjedu.sapi.model.itemtool.TRead">
101 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 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 102
         <if test="read.rorder=='createtime'">ORDER BY createtime DESC</if>
107 103
         <if test="read.rorder=='readcount'">ORDER BY readcount DESC</if>
108 104
     </select>

Loading…
Cancel
Save