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