zhangjinli 3 years ago
parent 6db80701ec
commit 76e9c5e023

@ -30,6 +30,9 @@ import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
@ -133,6 +136,9 @@ public class VideoController {
public Result valid(@Validated @RequestBody VVParam param) {
int id = param.getId();
Video video = videoService.getById(id);
if(null == video){
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION, "未找到该视频");
}
Integer originEffectResult = video.getEffectResult() == null ? 0 : video.getEffectResult();
if (param.getStatus() == 3) {
String reason = param.getReason();
@ -190,10 +196,10 @@ public class VideoController {
String touser = userService.getById(video.getUserId()).getUserid();
if (touser != null) {
appMessage.setTouser(touser);
// List<JSONObject>
JSONObject content_item = new JSONObject();
// content_item.fluentPut("")
httpUtil.qywxMessage(httpUtil.qywxGetToken(),touser,"传播效果审核",null,appMessage.getUrl(),null);
List<JSONObject> content_item = new ArrayList<>();
content_item.add(new JSONObject().fluentPut("key","审核结果").fluentPut("value",appMessage.getDescription()));
content_item.add(new JSONObject().fluentPut("key","审核时间").fluentPut("value",LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))));
httpUtil.qywxMessage(httpUtil.qywxGetToken(),touser,"传播效果审核",null,appMessage.getUrl(),content_item);
}
AppMessageUtil.sendMessage(appMessage);
return Result.success("", "审核完成");

@ -11,6 +11,7 @@ import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
* http
@ -75,7 +76,7 @@ public class HttpUtil {
* @param wxAppUrl:1024
* @param content_item:10item
*/
public void qywxMessage(String access_token,String touser, String title,String description,String wxAppUrl,JSONObject content_item) {
public void qywxMessage(String access_token, String touser, String title, String description, String wxAppUrl, List content_item) {
JSONObject obj = new JSONObject();
obj.fluentPut("msgtype", "miniprogram_notice").fluentPut("agentid", agentid).fluentPut("touser", touser)
.fluentPut("miniprogram_notice",

Loading…
Cancel
Save