|
@@ -1,39 +1,14 @@
|
|
|
package cn.com.ctop.common.module.service.impl;
|
|
package cn.com.ctop.common.module.service.impl;
|
|
|
|
|
|
|
|
import cn.com.ctop.common.module.constant.CosConstant;
|
|
import cn.com.ctop.common.module.constant.CosConstant;
|
|
|
-import cn.com.ctop.common.module.entity.MaterialAscription;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialCutFrame;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialImageInfo;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialParameter;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialTag;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.MaterialTagInfo;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.Project;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.SupplierWatermark;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.TagInfo;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.TencentWatermarkTemplate;
|
|
|
|
|
-import cn.com.ctop.common.module.entity.VideoWatermarkTask;
|
|
|
|
|
|
|
+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.mapper.MaterialAscriptionMapper;
|
|
import cn.com.ctop.common.module.mapper.MaterialAscriptionMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
|
|
import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
|
|
import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialTagMapper;
|
|
import cn.com.ctop.common.module.mapper.MaterialTagMapper;
|
|
|
-import cn.com.ctop.common.module.service.IMaterialCutFrameService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.IMaterialImageInfoService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.IMaterialInfoService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.IMaterialTagInfoService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.IProjectService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.ISupplierWatermarkService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.ITagInfoService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.ITencentWatermarkTemplateService;
|
|
|
|
|
-import cn.com.ctop.common.module.service.IVideoWatermarkTaskService;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.AesEncryptUtil;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.Check;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.LoadFileUtil;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
|
|
|
-import cn.com.ctop.common.module.utils.StatusCode;
|
|
|
|
|
|
|
+import cn.com.ctop.common.module.service.*;
|
|
|
|
|
+import cn.com.ctop.common.module.utils.*;
|
|
|
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;
|
|
@@ -57,11 +32,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
|
import java.net.URLDecoder;
|
|
import java.net.URLDecoder;
|
|
|
import java.nio.channels.FileChannel;
|
|
import java.nio.channels.FileChannel;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
|
@@ -635,19 +606,22 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void insertTagList(String code, String userId, JSONArray tagList) {
|
|
private void insertTagList(String code, String userId, JSONArray tagList) {
|
|
|
- if (null != tagList && !tagList.isEmpty()) {
|
|
|
|
|
- for (int m = 0; m < tagList.size(); m++) {
|
|
|
|
|
- Long tagId = tagList.getLong(m);
|
|
|
|
|
- TagInfo tagInfo = tagInfoService.getById(tagId);
|
|
|
|
|
- MaterialTagInfo setTag = new MaterialTagInfo(code, tagInfo, userId);
|
|
|
|
|
- setTag.setCategoryId(tagInfo.getTagCategoryId());
|
|
|
|
|
- materialTagInfoService.save(setTag);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (null != tagList && !tagList.isEmpty()) {
|
|
|
|
|
+ for (int m = 0; m < tagList.size(); m++) {
|
|
|
|
|
+ Long tagId = tagList.getLong(m);
|
|
|
|
|
+ TagInfo tagInfo = tagInfoService.getById(tagId);
|
|
|
|
|
+ MaterialTagInfo setTag = new MaterialTagInfo(code, tagInfo, userId);
|
|
|
|
|
+ setTag.setCategoryId(tagInfo.getTagCategoryId());
|
|
|
|
|
+ materialTagInfoService.save(setTag);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|