Commit 4a51395c9c1e4689f647e756798c6aa0db8f8dda
1 parent
6a097230
Exists in
master
bug 修复
Showing
5 changed files
with
11 additions
and
8 deletions
Show diff stats
src/main/java/com/sincere/student/controller/AppController.java
| ... | ... | @@ -209,6 +209,7 @@ public class AppController { |
| 209 | 209 | Article temp = new Article(); |
| 210 | 210 | temp.setId(idDto.getId()); |
| 211 | 211 | temp.setLookNumber(article.getLookNumber()+1); |
| 212 | + temp.setStatus(-1); | |
| 212 | 213 | articleService.update(temp); |
| 213 | 214 | return result ; |
| 214 | 215 | } |
| ... | ... | @@ -221,6 +222,7 @@ public class AppController { |
| 221 | 222 | Article temp = new Article(); |
| 222 | 223 | temp.setId(idDto.getId()); |
| 223 | 224 | temp.setGoodNumber(article.getGoodNumber()+1); |
| 225 | + temp.setStatus(-1); | |
| 224 | 226 | articleService.update(temp); |
| 225 | 227 | return result ; |
| 226 | 228 | } | ... | ... |
src/main/java/com/sincere/student/service/impl/ConsultServiceImpl.java
| ... | ... | @@ -67,8 +67,10 @@ public class ConsultServiceImpl implements ConsultService { |
| 67 | 67 | @Override |
| 68 | 68 | public int update(UniversityConsult consult) { |
| 69 | 69 | universityConsultMapper.updateByPrimaryKeySelective(consult); |
| 70 | + universityConsultDetailMapper.deleteByPrimaryKey(consult.getId()); | |
| 70 | 71 | for(UniversityConsultDetail detail : consult.getList()){ |
| 71 | - universityConsultDetailMapper.updateByPrimaryKey(detail); | |
| 72 | + detail.setConsultId(consult.getId()); | |
| 73 | + universityConsultDetailMapper.insert(detail); | |
| 72 | 74 | } |
| 73 | 75 | return 1 ; |
| 74 | 76 | } | ... | ... |
src/main/java/com/sincere/student/service/impl/VideoServiceImpl.java
| ... | ... | @@ -40,10 +40,6 @@ public class VideoServiceImpl implements VideoService { |
| 40 | 40 | |
| 41 | 41 | PageHelper.startPage(dto.getPage(),dto.getPageSize()); |
| 42 | 42 | List<Video> list = videoMapper.getList(dto); |
| 43 | - for(Video video : list){ | |
| 44 | - String fileName = video.getVideoUrl().substring(video.getVideoUrl().lastIndexOf("/")+1); | |
| 45 | - video.setVideoName(fileName); | |
| 46 | - } | |
| 47 | 43 | page.setList(list); |
| 48 | 44 | page.setCount(videoMapper.getListCount(dto)); |
| 49 | 45 | return page; | ... | ... |
src/main/resources/mapper/MajorMapper.xml
src/main/resources/mapper/VideoMapper.xml
| ... | ... | @@ -123,6 +123,9 @@ |
| 123 | 123 | <if test="videoUrl!=null and videoUrl != ''"> |
| 124 | 124 | video_url=#{videoUrl}, |
| 125 | 125 | </if> |
| 126 | + <if test="videoName!=null and videoName != ''"> | |
| 127 | + video_name=#{videoName}, | |
| 128 | + </if> | |
| 126 | 129 | <if test="duration!=null and duration != ''"> |
| 127 | 130 | duration=#{duration}, |
| 128 | 131 | </if> |
| ... | ... | @@ -132,9 +135,6 @@ |
| 132 | 135 | <if test="columnType!=0"> |
| 133 | 136 | column_type=#{columnType}, |
| 134 | 137 | </if> |
| 135 | - <if test="universityName!=null and universityName != ''"> | |
| 136 | - university_name=#{universityName}, | |
| 137 | - </if> | |
| 138 | 138 | <if test="universityId!=0"> |
| 139 | 139 | university_id=#{universityId}, |
| 140 | 140 | </if> | ... | ... |