Commit 82f10ab190c9195368824a6eff016e85610ecd9c
1 parent
543bc3d2
点播列表页表单spid换成spid简称
Showing
4 changed files
with
33 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -5,8 +5,10 @@ import com.alibaba.fastjson.JSONObject; |
| 5 | 5 | import com.cnlive.shenhe.bean.ErrorEnum; |
| 6 | 6 | import com.cnlive.shenhe.bean.ResponseBean; |
| 7 | 7 | import com.cnlive.shenhe.bean.SessionUser; |
| 8 | +import com.cnlive.shenhe.entity.ShySites; | |
| 8 | 9 | import com.cnlive.shenhe.entity.ShyUsers; |
| 9 | 10 | import com.cnlive.shenhe.entity.ShyVideos; |
| 11 | +import com.cnlive.shenhe.serviceImpl.SitesServiceImpl; | |
| 10 | 12 | import com.cnlive.shenhe.serviceImpl.UsersServiceImpl; |
| 11 | 13 | import com.cnlive.shenhe.serviceImpl.VideosServiceImpl; |
| 12 | 14 | import com.cnlive.shenhe.utils.AuditPass; |
| ... | ... | @@ -37,6 +39,8 @@ public class VideosController { |
| 37 | 39 | VideosServiceImpl videosService; |
| 38 | 40 | @Autowired |
| 39 | 41 | UsersServiceImpl usersService; |
| 42 | + @Autowired | |
| 43 | + SitesServiceImpl sitesService; | |
| 40 | 44 | |
| 41 | 45 | @Value("${qn_domain}") |
| 42 | 46 | String qn_domain; |
| ... | ... | @@ -127,6 +131,9 @@ public class VideosController { |
| 127 | 131 | } |
| 128 | 132 | videos.setAuditor(auditor); |
| 129 | 133 | } |
| 134 | + //显示spid简称 | |
| 135 | + ShySites shySites = sitesService.findspidDescByspid(videos.getSpid()); | |
| 136 | + videos.setSpid_desc(shySites.getName()); | |
| 130 | 137 | } |
| 131 | 138 | } |
| 132 | 139 | model.addAttribute("videoPage", videoPage); |
| ... | ... | @@ -146,10 +153,10 @@ public class VideosController { |
| 146 | 153 | Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); |
| 147 | 154 | String yuming = ""; |
| 148 | 155 | Integer plat = detailsContent.getPlat(); |
| 149 | - if(plat==CommonConst.QINIU_PLAT){ | |
| 150 | - yuming = qn_domain+"/"; | |
| 151 | - }else if(plat==CommonConst.KS_PLAT){ | |
| 152 | - yuming = ks_domain+"/"; | |
| 156 | + if (plat == CommonConst.QINIU_PLAT) { | |
| 157 | + yuming = qn_domain + "/"; | |
| 158 | + } else if (plat == CommonConst.KS_PLAT) { | |
| 159 | + yuming = ks_domain + "/"; | |
| 153 | 160 | } |
| 154 | 161 | model.addAttribute("images", images); |
| 155 | 162 | model.addAttribute("avsampleImgs", avsampleImgs); | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShyVideos.java
| ... | ... | @@ -131,6 +131,17 @@ public class ShyVideos { |
| 131 | 131 | @Transient |
| 132 | 132 | private String auditor; |
| 133 | 133 | |
| 134 | + @Transient | |
| 135 | + private String spid_desc; | |
| 136 | + | |
| 137 | + public String getSpid_desc() { | |
| 138 | + return spid_desc; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setSpid_desc(String spid_desc) { | |
| 142 | + this.spid_desc = spid_desc; | |
| 143 | + } | |
| 144 | + | |
| 134 | 145 | public String getAuditor() { |
| 135 | 146 | return auditor; |
| 136 | 147 | } | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/SitesServiceImpl.java
| ... | ... | @@ -52,4 +52,13 @@ public class SitesServiceImpl { |
| 52 | 52 | List<ShySites> shySites = shySitesMapper.selectAll(); |
| 53 | 53 | return shySites; |
| 54 | 54 | } |
| 55 | + | |
| 56 | + public ShySites findspidDescByspid(int spId) { | |
| 57 | + Example example = new Example(ShySites.class); | |
| 58 | + Example.Criteria criteria = example.createCriteria(); | |
| 59 | + if (CommonUtils.isNotNull(spId)) | |
| 60 | + criteria.andEqualTo("spid", spId); | |
| 61 | + List<ShySites> shySites = shySitesMapper.selectByExample(example); | |
| 62 | + return shySites.get(0); | |
| 63 | + } | |
| 55 | 64 | } | ... | ... |
src/main/resources/templates/page/video.html
| ... | ... | @@ -137,7 +137,7 @@ |
| 137 | 137 | </th> |
| 138 | 138 | <th style="text-align: center; width: 6%; " data-field="sp_id_brief" |
| 139 | 139 | tabindex="0"> |
| 140 | - <div class="th-inner ">spid</div> | |
| 140 | + <div class="th-inner ">spid简称</div> | |
| 141 | 141 | <div class="fht-cell"></div> |
| 142 | 142 | </th> |
| 143 | 143 | <th style="text-align: center; width: 20%; " data-field="video_title" |
| ... | ... | @@ -177,7 +177,7 @@ |
| 177 | 177 | <tr data-index="0" th:each="video : ${videoPage.list}"> |
| 178 | 178 | <td class="bs-checkbox "><input data-index="0" name="btSelectItem" |
| 179 | 179 | type="checkbox" th:value="${video.id}"></td> |
| 180 | - <td style="text-align: center; width: 6%;" th:text="${video.spid}"></td> | |
| 180 | + <td style="text-align: center; width: 6%;" th:text="${video.spid_desc}"></td> | |
| 181 | 181 | <td style="text-align: center; width: 20%;" th:text="${video.video_title}"> |
| 182 | 182 | 邓建国正面PK冯小刚 |
| 183 | 183 | </td> | ... | ... |