|
@@ -6,10 +6,8 @@ import cn.com.ctop.common.module.entity.*;
|
|
import cn.com.ctop.common.module.enums.MaterialSupplierEnum;
|
|
import cn.com.ctop.common.module.enums.MaterialSupplierEnum;
|
|
import cn.com.ctop.common.module.service.*;
|
|
import cn.com.ctop.common.module.service.*;
|
|
import cn.com.ctop.common.module.utils.*;
|
|
import cn.com.ctop.common.module.utils.*;
|
|
-
|
|
|
|
import cn.com.ctop.toutiao.modules.material.entity.BytedanceVideoSlogenInfo;
|
|
import cn.com.ctop.toutiao.modules.material.entity.BytedanceVideoSlogenInfo;
|
|
import cn.com.ctop.toutiao.modules.material.service.IBytedanceVideoSlogenInfoService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IBytedanceVideoSlogenInfoService;
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -150,7 +148,7 @@ public class MaterialInfoController {
|
|
public Result<Object> watermarkVideo(@RequestParam(name = "id") String id, @RequestParam(name = "watermarkTemplateId") Long watermarkTemplateId) {
|
|
public Result<Object> watermarkVideo(@RequestParam(name = "id") String id, @RequestParam(name = "watermarkTemplateId") Long watermarkTemplateId) {
|
|
Result<Object> result = new Result<>();
|
|
Result<Object> result = new Result<>();
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
- Thread thread = new Thread(()-> materialInfoService.watermarkVideo(id, watermarkTemplateId, sysUser.getId()));
|
|
|
|
|
|
+ Thread thread = new Thread(() -> materialInfoService.watermarkVideo(id, watermarkTemplateId, sysUser.getId()));
|
|
thread.start();
|
|
thread.start();
|
|
result.setCode(200);
|
|
result.setCode(200);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
@@ -288,6 +286,7 @@ public class MaterialInfoController {
|
|
@GetMapping(value = "/listV2")
|
|
@GetMapping(value = "/listV2")
|
|
public Map<String, Object> queryPageList(String type, Integer status, Long productId, String materialName, String code,
|
|
public Map<String, Object> queryPageList(String type, Integer status, Long productId, String materialName, String code,
|
|
String startDate, String endDate, String tagCode,
|
|
String startDate, String endDate, String tagCode,
|
|
|
|
+ Long projectId, String clipId, String shotId, String planId,
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
@@ -303,7 +302,7 @@ public class MaterialInfoController {
|
|
productIds = new ArrayList<>();
|
|
productIds = new ArrayList<>();
|
|
productIds.add(productId);
|
|
productIds.add(productId);
|
|
}
|
|
}
|
|
- return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, null, pageNo, pageSize);
|
|
|
|
|
|
+ return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, null, projectId, clipId, shotId, planId, pageNo, pageSize);
|
|
} else if ("designTeamLeader".equals(roleCode) || "planeLeader".equals(roleCode) || "plane".equals(roleCode) || "plan".equals(roleCode) || "shot".equals(roleCode)) {
|
|
} else if ("designTeamLeader".equals(roleCode) || "planeLeader".equals(roleCode) || "plane".equals(roleCode) || "plan".equals(roleCode) || "shot".equals(roleCode)) {
|
|
//查询自己所在项目下的数据
|
|
//查询自己所在项目下的数据
|
|
if (null == productId || productId == 0) {
|
|
if (null == productId || productId == 0) {
|
|
@@ -313,14 +312,14 @@ public class MaterialInfoController {
|
|
productIds = new ArrayList<>();
|
|
productIds = new ArrayList<>();
|
|
productIds.add(productId);
|
|
productIds.add(productId);
|
|
}
|
|
}
|
|
- return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, null, pageNo, pageSize);
|
|
|
|
|
|
+ return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, null, projectId, clipId, shotId, planId, pageNo, pageSize);
|
|
} else {
|
|
} else {
|
|
//查询自己上传的视频
|
|
//查询自己上传的视频
|
|
if (null != productId && productId != 0) {
|
|
if (null != productId && productId != 0) {
|
|
productIds = new ArrayList<>();
|
|
productIds = new ArrayList<>();
|
|
productIds.add(productId);
|
|
productIds.add(productId);
|
|
}
|
|
}
|
|
- return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, userId, pageNo, pageSize);
|
|
|
|
|
|
+ return materialInfoService.getListByParams(tagCode, type, status, productIds, materialName, code, startDate, endDate, userId, projectId, clipId, shotId, planId, pageNo, pageSize);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -445,6 +444,7 @@ public class MaterialInfoController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 头条素材信息编辑
|
|
* 头条素材信息编辑
|
|
|
|
+ *
|
|
* @param materialInfo
|
|
* @param materialInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -507,11 +507,11 @@ public class MaterialInfoController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//添加视频文案信息
|
|
//添加视频文案信息
|
|
- if(!Check.isNull(materialInfo.getSlogans())){
|
|
|
|
|
|
+ if (!Check.isNull(materialInfo.getSlogans())) {
|
|
JSONArray slogans = materialInfo.getSlogans();
|
|
JSONArray slogans = materialInfo.getSlogans();
|
|
- if(null!=slogans&&!slogans.isEmpty()){
|
|
|
|
|
|
+ if (null != slogans && !slogans.isEmpty()) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
- slogenInfoService.insertSlogans(materialInfoEntity.getCode(),slogans,user.getId());
|
|
|
|
|
|
+ slogenInfoService.insertSlogans(materialInfoEntity.getCode(), slogans, user.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
boolean ok = materialInfoService.updateById(materialInfo);
|
|
boolean ok = materialInfoService.updateById(materialInfo);
|
|
@@ -532,6 +532,7 @@ public class MaterialInfoController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 头条素材信息编辑 -- 批量通过审核
|
|
* 头条素材信息编辑 -- 批量通过审核
|
|
|
|
+ *
|
|
* @param materialInfo
|
|
* @param materialInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -543,9 +544,11 @@ public class MaterialInfoController {
|
|
for (String id : ids) {
|
|
for (String id : ids) {
|
|
materialInfo.setId(id);
|
|
materialInfo.setId(id);
|
|
Result<MaterialInfo> materialInfoResult = bytedanceEdit(materialInfo);
|
|
Result<MaterialInfo> materialInfoResult = bytedanceEdit(materialInfo);
|
|
- if(materialInfoResult.getCode().equals(CommonConstant.SC_OK_200)){ successNum++;}
|
|
|
|
|
|
+ if (materialInfoResult.getCode().equals(CommonConstant.SC_OK_200)) {
|
|
|
|
+ successNum++;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- return result.success("批量修改成功"+successNum+"个");
|
|
|
|
|
|
+ return result.success("批量修改成功" + successNum + "个");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -615,9 +618,9 @@ public class MaterialInfoController {
|
|
result.error500("未找到对应实体");
|
|
result.error500("未找到对应实体");
|
|
} else {
|
|
} else {
|
|
//查询素材下关联的头条文案信息
|
|
//查询素材下关联的头条文案信息
|
|
- List<BytedanceVideoSlogenInfo>slogenInfos = slogenInfoService.listByParams(materialInfo.getCode(),1);
|
|
|
|
|
|
+ List<BytedanceVideoSlogenInfo> slogenInfos = slogenInfoService.listByParams(materialInfo.getCode(), 1);
|
|
JSONArray slogenArray = new JSONArray();
|
|
JSONArray slogenArray = new JSONArray();
|
|
- if(null!=slogenInfos&&!slogenInfos.isEmpty()){
|
|
|
|
|
|
+ if (null != slogenInfos && !slogenInfos.isEmpty()) {
|
|
slogenArray.addAll(slogenInfos);
|
|
slogenArray.addAll(slogenInfos);
|
|
}
|
|
}
|
|
materialInfo.setSlogans(slogenArray);
|
|
materialInfo.setSlogans(slogenArray);
|