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,6 +209,7 @@ public class AppController { | ||
209 | Article temp = new Article(); | 209 | Article temp = new Article(); |
210 | temp.setId(idDto.getId()); | 210 | temp.setId(idDto.getId()); |
211 | temp.setLookNumber(article.getLookNumber()+1); | 211 | temp.setLookNumber(article.getLookNumber()+1); |
212 | + temp.setStatus(-1); | ||
212 | articleService.update(temp); | 213 | articleService.update(temp); |
213 | return result ; | 214 | return result ; |
214 | } | 215 | } |
@@ -221,6 +222,7 @@ public class AppController { | @@ -221,6 +222,7 @@ public class AppController { | ||
221 | Article temp = new Article(); | 222 | Article temp = new Article(); |
222 | temp.setId(idDto.getId()); | 223 | temp.setId(idDto.getId()); |
223 | temp.setGoodNumber(article.getGoodNumber()+1); | 224 | temp.setGoodNumber(article.getGoodNumber()+1); |
225 | + temp.setStatus(-1); | ||
224 | articleService.update(temp); | 226 | articleService.update(temp); |
225 | return result ; | 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,8 +67,10 @@ public class ConsultServiceImpl implements ConsultService { | ||
67 | @Override | 67 | @Override |
68 | public int update(UniversityConsult consult) { | 68 | public int update(UniversityConsult consult) { |
69 | universityConsultMapper.updateByPrimaryKeySelective(consult); | 69 | universityConsultMapper.updateByPrimaryKeySelective(consult); |
70 | + universityConsultDetailMapper.deleteByPrimaryKey(consult.getId()); | ||
70 | for(UniversityConsultDetail detail : consult.getList()){ | 71 | for(UniversityConsultDetail detail : consult.getList()){ |
71 | - universityConsultDetailMapper.updateByPrimaryKey(detail); | 72 | + detail.setConsultId(consult.getId()); |
73 | + universityConsultDetailMapper.insert(detail); | ||
72 | } | 74 | } |
73 | return 1 ; | 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,10 +40,6 @@ public class VideoServiceImpl implements VideoService { | ||
40 | 40 | ||
41 | PageHelper.startPage(dto.getPage(),dto.getPageSize()); | 41 | PageHelper.startPage(dto.getPage(),dto.getPageSize()); |
42 | List<Video> list = videoMapper.getList(dto); | 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 | page.setList(list); | 43 | page.setList(list); |
48 | page.setCount(videoMapper.getListCount(dto)); | 44 | page.setCount(videoMapper.getListCount(dto)); |
49 | return page; | 45 | return page; |
src/main/resources/mapper/MajorMapper.xml
@@ -52,6 +52,9 @@ | @@ -52,6 +52,9 @@ | ||
52 | <if test="majorCode!=null"> | 52 | <if test="majorCode!=null"> |
53 | major_code=#{majorCode}, | 53 | major_code=#{majorCode}, |
54 | </if> | 54 | </if> |
55 | + <if test="pid!=0"> | ||
56 | + p_id=#{pid}, | ||
57 | + </if> | ||
55 | </trim> | 58 | </trim> |
56 | where id = #{id} | 59 | where id = #{id} |
57 | </update> | 60 | </update> |
src/main/resources/mapper/VideoMapper.xml
@@ -123,6 +123,9 @@ | @@ -123,6 +123,9 @@ | ||
123 | <if test="videoUrl!=null and videoUrl != ''"> | 123 | <if test="videoUrl!=null and videoUrl != ''"> |
124 | video_url=#{videoUrl}, | 124 | video_url=#{videoUrl}, |
125 | </if> | 125 | </if> |
126 | + <if test="videoName!=null and videoName != ''"> | ||
127 | + video_name=#{videoName}, | ||
128 | + </if> | ||
126 | <if test="duration!=null and duration != ''"> | 129 | <if test="duration!=null and duration != ''"> |
127 | duration=#{duration}, | 130 | duration=#{duration}, |
128 | </if> | 131 | </if> |
@@ -132,9 +135,6 @@ | @@ -132,9 +135,6 @@ | ||
132 | <if test="columnType!=0"> | 135 | <if test="columnType!=0"> |
133 | column_type=#{columnType}, | 136 | column_type=#{columnType}, |
134 | </if> | 137 | </if> |
135 | - <if test="universityName!=null and universityName != ''"> | ||
136 | - university_name=#{universityName}, | ||
137 | - </if> | ||
138 | <if test="universityId!=0"> | 138 | <if test="universityId!=0"> |
139 | university_id=#{universityId}, | 139 | university_id=#{universityId}, |
140 | </if> | 140 | </if> |