Commit 7ef1ddf1aa1cdccd86cbed58431004e042fcdc0a

Authored by 王言钊
1 parent abf85067

图文审核页面添加显示数据

src/main/java/com/cnlive/shenhe/api/YiDunControllerApi.java
@@ -66,7 +66,6 @@ public class YiDunControllerApi { @@ -66,7 +66,6 @@ public class YiDunControllerApi {
66 params.put("checkFlags", "1,2"); 66 params.put("checkFlags", "1,2");
67 //不是必传参数 67 //不是必传参数
68 params.put("callback", UUID.randomUUID().toString()); 68 params.put("callback", UUID.randomUUID().toString());
69 -  
70 // 3.生成签名信息 69 // 3.生成签名信息
71 String signature = YiDunAntiFraudUtil.genSignature(SECRETKEY, params); 70 String signature = YiDunAntiFraudUtil.genSignature(SECRETKEY, params);
72 params.put("signature", signature); 71 params.put("signature", signature);
@@ -90,6 +89,5 @@ public class YiDunControllerApi { @@ -90,6 +89,5 @@ public class YiDunControllerApi {
90 shyYidun.setCreate_time(new Date()); 89 shyYidun.setCreate_time(new Date());
91 yiDunServiceImpl.addYiDunMsg(shyYidun); 90 yiDunServiceImpl.addYiDunMsg(shyYidun);
92 } 91 }
93 -  
94 } 92 }
95 } 93 }
src/main/java/com/cnlive/shenhe/utils/HttpClientUtils.java
@@ -26,18 +26,22 @@ import java.util.Map; @@ -26,18 +26,22 @@ import java.util.Map;
26 26
27 public class HttpClientUtils { 27 public class HttpClientUtils {
28 public static String post(String url, Map<String, Object> map) { 28 public static String post(String url, Map<String, Object> map) {
29 - HttpPost post = new HttpPost(url);// 创建post请求 29 + // 创建post请求
  30 + HttpPost post = new HttpPost(url);
30 String text = "请求失败"; 31 String text = "请求失败";
31 try { 32 try {
32 - HttpClient client = HttpClients.createDefault();// 创建http访问的客户端 33 + // 创建http访问的客户端
  34 + HttpClient client = HttpClients.createDefault();
33 List<NameValuePair> param = new ArrayList<>(); 35 List<NameValuePair> param = new ArrayList<>();
34 if(map!=null&&map.size()>0){ 36 if(map!=null&&map.size()>0){
35 for (Map.Entry<String, Object> entry : map.entrySet()) { 37 for (Map.Entry<String, Object> entry : map.entrySet()) {
36 param.add(new BasicNameValuePair(entry.getKey(), entry.getValue().toString())); 38 param.add(new BasicNameValuePair(entry.getKey(), entry.getValue().toString()));
37 } 39 }
38 } 40 }
39 - HttpEntity postEntity = new UrlEncodedFormEntity(param, "utf-8");// 用参数构造请求实体  
40 - post.setEntity(postEntity);// 把请求实体放到post请求中 41 + // 用参数构造请求实体
  42 + HttpEntity postEntity = new UrlEncodedFormEntity(param, "utf-8");
  43 + // 把请求实体放到post请求中
  44 + post.setEntity(postEntity);
41 HttpResponse response = client.execute(post); // 执行post请求 45 HttpResponse response = client.execute(post); // 执行post请求
42 HttpEntity entity = response.getEntity();// 从响应中取得一个响应实体 46 HttpEntity entity = response.getEntity();// 从响应中取得一个响应实体
43 text = EntityUtils.toString(entity);// 把响应实体转成文本信息 47 text = EntityUtils.toString(entity);// 把响应实体转成文本信息
src/main/resources/templates/page/content.html
@@ -111,6 +111,8 @@ @@ -111,6 +111,8 @@
111 <option value="">全部</option> 111 <option value="">全部</option>
112 <option value="content">图文发布</option> 112 <option value="content">图文发布</option>
113 <option value="moment">朋友圈</option> 113 <option value="moment">朋友圈</option>
  114 + <option value="cms_photoalbum">家庭相册</option>
  115 + <option value="edu_works">作业作品</option>
114 </select> 116 </select>
115 <!-- <input class="form-control" name="content_tag" type="text" id="content_tag"> --> 117 <!-- <input class="form-control" name="content_tag" type="text" id="content_tag"> -->
116 </div> 118 </div>
@@ -247,14 +249,15 @@ @@ -247,14 +249,15 @@
247 <!-- <span th:text="${content.source}"></span> --> 249 <!-- <span th:text="${content.source}"></span> -->
248 朋友圈发布无标题内容 250 朋友圈发布无标题内容
249 </span> 251 </span>
250 - <span th:if="${content.title != ''}"> 252 + <span th:if="${content.title != ''}"></span>
251 <span th:text="${content.title}"></span> 253 <span th:text="${content.title}"></span>
252 - </span>  
253 </a> 254 </a>
254 </td> 255 </td>
255 <td style="text-align: center; width: 6%;"> 256 <td style="text-align: center; width: 6%;">
256 <span th:if="${content.content_tag=='content'}">图文发布</span> 257 <span th:if="${content.content_tag=='content'}">图文发布</span>
257 <span th:if="${content.content_tag=='moment'}">朋友圈</span> 258 <span th:if="${content.content_tag=='moment'}">朋友圈</span>
  259 + <span th:if="${content.content_tag=='cms_photoalbum'}">家庭相册</span>
  260 + <span th:if="${content.content_tag=='edu_works'}">作业作品</span>
258 </td> 261 </td>
259 <td style="text-align: center; width: 3%;"> 262 <td style="text-align: center; width: 3%;">
260 <span class="btn btn-sm btn-warning" th:if="${content.content_status==0}">待发布</span> 263 <span class="btn btn-sm btn-warning" th:if="${content.content_status==0}">待发布</span>