|
@@ -25,10 +25,8 @@ import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
import org.jeecg.modules.ctop.entity.ByteDanceCleanMaterialReport;
|
|
import org.jeecg.modules.ctop.entity.ByteDanceCleanMaterialReport;
|
|
import org.jeecg.modules.ctop.entity.KuaiShouCleanMaterialReport;
|
|
import org.jeecg.modules.ctop.entity.KuaiShouCleanMaterialReport;
|
|
-import org.jeecg.modules.ctop.service.IByteDanceCleanMaterialReportService;
|
|
|
|
-import org.jeecg.modules.ctop.service.IKuaiShouCleanMaterialReportService;
|
|
|
|
-import org.jeecg.modules.ctop.service.IKuaiShouUploadService;
|
|
|
|
-import org.jeecg.modules.ctop.service.IProjectMemberService;
|
|
|
|
|
|
+import org.jeecg.modules.ctop.entity.Project;
|
|
|
|
+import org.jeecg.modules.ctop.service.*;
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
@@ -334,6 +332,9 @@ public class MaterialInfoController {
|
|
* @param materialInfo
|
|
* @param materialInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Autowired
|
|
|
|
+ private IProjectService projectService;
|
|
|
|
+
|
|
@AutoLog(value = "素材信息-编辑")
|
|
@AutoLog(value = "素材信息-编辑")
|
|
@ApiOperation(value = "素材信息-编辑", notes = "素材信息-编辑")
|
|
@ApiOperation(value = "素材信息-编辑", notes = "素材信息-编辑")
|
|
@PutMapping(value = "/edit")
|
|
@PutMapping(value = "/edit")
|
|
@@ -351,22 +352,29 @@ public class MaterialInfoController {
|
|
materialInfo.setUrl(url);
|
|
materialInfo.setUrl(url);
|
|
}
|
|
}
|
|
|
|
|
|
- if (!Check.isNull(materialInfo.getStatus())) {
|
|
|
|
- Integer status = materialInfo.getStatus();
|
|
|
|
- if (status == 1) {
|
|
|
|
- Thread thread = new Thread() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- log.info("开始自动同步素材,code:{}", materialInfoEntity.getCode());
|
|
|
|
- uploadService.upload(materialInfoEntity);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- thread.start();
|
|
|
|
|
|
|
|
|
|
+ Long projectId = materialInfoEntity.getProjectId();
|
|
|
|
+ Project project = projectService.getById(projectId);
|
|
|
|
+ if (!Check.isNull(projectId)) {
|
|
|
|
+ if ("2".equals(project.getMediaId())) {
|
|
|
|
+ if (!Check.isNull(materialInfo.getStatus())) {
|
|
|
|
+ Integer status = materialInfo.getStatus();
|
|
|
|
+ if (status == 1) {
|
|
|
|
+ Thread thread = new Thread() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ log.info("开始自动同步素材,code:{}", materialInfoEntity.getCode());
|
|
|
|
+ uploadService.upload(materialInfoEntity);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ thread.start();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
boolean ok = materialInfoService.updateById(materialInfo);
|
|
boolean ok = materialInfoService.updateById(materialInfo);
|
|
if (ok) {
|
|
if (ok) {
|
|
result.success("修改成功!");
|
|
result.success("修改成功!");
|