Commit 82f10ab190c9195368824a6eff016e85610ecd9c

Authored by 陈浩
1 parent 543bc3d2

点播列表页表单spid换成spid简称

src/main/java/com/cnlive/shenhe/controller/VideosController.java
@@ -5,8 +5,10 @@ import com.alibaba.fastjson.JSONObject; @@ -5,8 +5,10 @@ import com.alibaba.fastjson.JSONObject;
5 import com.cnlive.shenhe.bean.ErrorEnum; 5 import com.cnlive.shenhe.bean.ErrorEnum;
6 import com.cnlive.shenhe.bean.ResponseBean; 6 import com.cnlive.shenhe.bean.ResponseBean;
7 import com.cnlive.shenhe.bean.SessionUser; 7 import com.cnlive.shenhe.bean.SessionUser;
  8 +import com.cnlive.shenhe.entity.ShySites;
8 import com.cnlive.shenhe.entity.ShyUsers; 9 import com.cnlive.shenhe.entity.ShyUsers;
9 import com.cnlive.shenhe.entity.ShyVideos; 10 import com.cnlive.shenhe.entity.ShyVideos;
  11 +import com.cnlive.shenhe.serviceImpl.SitesServiceImpl;
10 import com.cnlive.shenhe.serviceImpl.UsersServiceImpl; 12 import com.cnlive.shenhe.serviceImpl.UsersServiceImpl;
11 import com.cnlive.shenhe.serviceImpl.VideosServiceImpl; 13 import com.cnlive.shenhe.serviceImpl.VideosServiceImpl;
12 import com.cnlive.shenhe.utils.AuditPass; 14 import com.cnlive.shenhe.utils.AuditPass;
@@ -37,6 +39,8 @@ public class VideosController { @@ -37,6 +39,8 @@ public class VideosController {
37 VideosServiceImpl videosService; 39 VideosServiceImpl videosService;
38 @Autowired 40 @Autowired
39 UsersServiceImpl usersService; 41 UsersServiceImpl usersService;
  42 + @Autowired
  43 + SitesServiceImpl sitesService;
40 44
41 @Value("${qn_domain}") 45 @Value("${qn_domain}")
42 String qn_domain; 46 String qn_domain;
@@ -127,6 +131,9 @@ public class VideosController { @@ -127,6 +131,9 @@ public class VideosController {
127 } 131 }
128 videos.setAuditor(auditor); 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 model.addAttribute("videoPage", videoPage); 139 model.addAttribute("videoPage", videoPage);
@@ -146,10 +153,10 @@ public class VideosController { @@ -146,10 +153,10 @@ public class VideosController {
146 Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); 153 Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs());
147 String yuming = ""; 154 String yuming = "";
148 Integer plat = detailsContent.getPlat(); 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 model.addAttribute("images", images); 161 model.addAttribute("images", images);
155 model.addAttribute("avsampleImgs", avsampleImgs); 162 model.addAttribute("avsampleImgs", avsampleImgs);
src/main/java/com/cnlive/shenhe/entity/ShyVideos.java
@@ -131,6 +131,17 @@ public class ShyVideos { @@ -131,6 +131,17 @@ public class ShyVideos {
131 @Transient 131 @Transient
132 private String auditor; 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 public String getAuditor() { 145 public String getAuditor() {
135 return auditor; 146 return auditor;
136 } 147 }
src/main/java/com/cnlive/shenhe/serviceImpl/SitesServiceImpl.java
@@ -52,4 +52,13 @@ public class SitesServiceImpl { @@ -52,4 +52,13 @@ public class SitesServiceImpl {
52 List<ShySites> shySites = shySitesMapper.selectAll(); 52 List<ShySites> shySites = shySitesMapper.selectAll();
53 return shySites; 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,7 +137,7 @@
137 </th> 137 </th>
138 <th style="text-align: center; width: 6%; " data-field="sp_id_brief" 138 <th style="text-align: center; width: 6%; " data-field="sp_id_brief"
139 tabindex="0"> 139 tabindex="0">
140 - <div class="th-inner ">spid</div> 140 + <div class="th-inner ">spid简称</div>
141 <div class="fht-cell"></div> 141 <div class="fht-cell"></div>
142 </th> 142 </th>
143 <th style="text-align: center; width: 20%; " data-field="video_title" 143 <th style="text-align: center; width: 20%; " data-field="video_title"
@@ -177,7 +177,7 @@ @@ -177,7 +177,7 @@
177 <tr data-index="0" th:each="video : ${videoPage.list}"> 177 <tr data-index="0" th:each="video : ${videoPage.list}">
178 <td class="bs-checkbox "><input data-index="0" name="btSelectItem" 178 <td class="bs-checkbox "><input data-index="0" name="btSelectItem"
179 type="checkbox" th:value="${video.id}"></td> 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 <td style="text-align: center; width: 20%;" th:text="${video.video_title}"> 181 <td style="text-align: center; width: 20%;" th:text="${video.video_title}">
182 邓建国正面PK冯小刚 182 邓建国正面PK冯小刚
183 </td> 183 </td>