|
|
|
@ -136,10 +136,14 @@ public class VideoController {
|
|
|
|
|
public Result valid(@Validated @RequestBody VVParam param) {
|
|
|
|
|
int id = param.getId();
|
|
|
|
|
Video video = videoService.getById(id);
|
|
|
|
|
if(null == video){
|
|
|
|
|
if (null == video) {
|
|
|
|
|
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION, "未找到该视频");
|
|
|
|
|
}
|
|
|
|
|
Integer originEffectResult = video.getEffectResult() == null ? 0 : video.getEffectResult();
|
|
|
|
|
String touser = userService.getById(video.getUserId()).getUserid();
|
|
|
|
|
AppMessage appMessage = new AppMessage().setTitle("传播效果审核结果")
|
|
|
|
|
.setUrl("pages/quest/subpage/detail/detail?id=" + video.getTaskId())
|
|
|
|
|
.setReceiverId(video.getUserId());
|
|
|
|
|
if (param.getStatus() == 3) {
|
|
|
|
|
String reason = param.getReason();
|
|
|
|
|
if (reason == null) {
|
|
|
|
@ -151,8 +155,16 @@ public class VideoController {
|
|
|
|
|
if (!op) {
|
|
|
|
|
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION, "无效操作");
|
|
|
|
|
}
|
|
|
|
|
AppMessageUtil.sendMessage(new AppMessage().setTitle("传播效果审核结果").setDescription("您的抖音传播效果审核未通过,未通过原因:" + param.getReason() + "。")
|
|
|
|
|
.setUrl("pages/quest/subpage/detail/detail?id=" + video.getTaskId()).setReceiverId(video.getUserId()));
|
|
|
|
|
appMessage.setDescription("您的抖音传播效果审核未通过,未通过原因:" + param.getReason() + "。");
|
|
|
|
|
// 企业微信消息通知
|
|
|
|
|
if (touser != null) {
|
|
|
|
|
appMessage.setTouser(touser);
|
|
|
|
|
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("", "审核拒绝完成");
|
|
|
|
|
}
|
|
|
|
|
UpdateWrapper<Video> up = new UpdateWrapper<>();
|
|
|
|
@ -188,18 +200,14 @@ public class VideoController {
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
}
|
|
|
|
|
AppMessage appMessage = new AppMessage().setTitle("传播效果审核结果")
|
|
|
|
|
.setDescription("恭喜您," + platForm + "传播效果审核通过,平台评定传播值为" + effectResult + "。")
|
|
|
|
|
.setUrl("pages/quest/subpage/detail/detail?id=" + video.getTaskId())
|
|
|
|
|
.setReceiverId(video.getUserId());
|
|
|
|
|
appMessage.setDescription("恭喜您," + platForm + "传播效果审核通过,平台评定传播值为" + effectResult + "。");
|
|
|
|
|
// 企业微信消息通知
|
|
|
|
|
String touser = userService.getById(video.getUserId()).getUserid();
|
|
|
|
|
if (touser != null) {
|
|
|
|
|
appMessage.setTouser(touser);
|
|
|
|
|
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);
|
|
|
|
|
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("", "审核完成");
|
|
|
|
|