Commit 7ef1ddf1aa1cdccd86cbed58431004e042fcdc0a

Authored by 王言钊
1 parent abf85067

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

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