Commit 6f9b69ec24c7ca68cea2cdb1a81bd880ef47a832

Authored by 陈杰
1 parent 7cb89f74
Exists in master

bug 修复

src/main/java/com/sincere/student/controller/AdminController.java
... ... @@ -294,10 +294,10 @@ public class AdminController {
294 294 try{
295 295 String name = universityService.getById(video.getUniversityId()).getName();
296 296 dto.setName(name);
  297 + dto.setId(video.getUniversityId());
297 298 }catch (Exception e){
298 299  
299 300 }
300   - dto.setId(id);
301 301 result.setData(dto);
302 302 return result ;
303 303 }
... ...
src/main/java/com/sincere/student/controller/AppController.java
... ... @@ -280,7 +280,6 @@ public class AppController {
280 280 @RequestMapping(value = "/video/getList" , method = RequestMethod.POST)
281 281 public BaseDto<Page<Video>> getVideoList(@RequestBody VideoSearchDto videoSearchDto){
282 282 BaseDto<Page<Video>> result = new BaseDto<>() ;
283   - videoSearchDto.setStatus(1);
284 283 Page<Video> page = videoService.getUniversityList(videoSearchDto);
285 284 result.setData(page);
286 285 return result ;
... ... @@ -290,7 +289,6 @@ public class AppController {
290 289 @RequestMapping(value = "/video/getDetail" , method = RequestMethod.POST)
291 290 public BaseDto<Page<Video>> getVideoDetail(@RequestBody VideoSearchDto videoSearchDto){
292 291 BaseDto<Page<Video>> result = new BaseDto<>() ;
293   - videoSearchDto.setStatus(1);
294 292 Page<Video> page = videoService.getList(videoSearchDto);
295 293 result.setData(page);
296 294 return result ;
... ...
src/main/resources/mapper/UniversitySubmitFileMapper.xml
... ... @@ -28,6 +28,12 @@
28 28 <if test="universityName != null and universityName != '' ">
29 29 and p.university like #{universityName}
30 30 </if>
  31 + <if test="province != null and province != '' ">
  32 + and p.province = #{province}
  33 + </if>
  34 + <if test="city != null and city != '' ">
  35 + and p.city = #{city}
  36 + </if>
31 37 <if test="point != 0 ">
32 38 <![CDATA[ and p.grade > #{point}-5 and p.grade < #{point} +5 ]]>
33 39 </if>
... ... @@ -50,6 +56,12 @@
50 56 <if test="universityName != null and universityName != '' ">
51 57 and p.university like #{universityName}
52 58 </if>
  59 + <if test="province != null and province != '' ">
  60 + and p.province = #{province}
  61 + </if>
  62 + <if test="city != null and city != '' ">
  63 + and p.city = #{city}
  64 + </if>
53 65 <if test="point != 0 ">
54 66 <![CDATA[ and p.grade >= #{point}-5 and p.grade <= #{point} +5 ]]>
55 67 </if>
... ...
src/main/resources/mapper/VideoMapper.xml
... ... @@ -77,11 +77,8 @@
77 77 <if test="universityId != 0">
78 78 and info.id = #{universityId}
79 79 </if>
80   - <if test="status == 1">
81   - and status = 1
82   - </if>
83   - <if test="status != 1">
84   - and 1 = 1
  80 + <if test="status != -1">
  81 + and status = #{status}
85 82 </if>
86 83 </where>
87 84 </select>
... ... @@ -98,11 +95,8 @@
98 95 <if test="universityName != null and universityName != ''">
99 96 and info.name like #{universityName}
100 97 </if>
101   - <if test="status == 1">
102   - and status = 1
103   - </if>
104   - <if test="status != 1">
105   - and 1 = 1
  98 + <if test="status != -1">
  99 + and status = #{status}
106 100 </if>
107 101 </where>
108 102 order by sort
... ...