|
@@ -132,7 +132,7 @@ public class KuaishouLiveBroadcastServiceImpl implements IKuaishouLiveBroadcastS
|
|
|
KuaishouLiveBroadcast checkOne = kuaishouLiveBroadcastMapper.getOne(broadcast);
|
|
|
if (checkOne == null) {
|
|
|
KuaishouLiveBroadcast copy = new KuaishouLiveBroadcast();
|
|
|
- BeanUtils.copyProperties(broadcast,copy);
|
|
|
+ BeanUtils.copyProperties(broadcast, copy);
|
|
|
copy.setId(null);
|
|
|
if (kuaishouLiveBroadcastMapper.getOne(copy) != null) {
|
|
|
return ResultResponse.error("当前时间段已存在直播!");
|
|
@@ -201,9 +201,11 @@ public class KuaishouLiveBroadcastServiceImpl implements IKuaishouLiveBroadcastS
|
|
|
}
|
|
|
//上传到cos的文件夹名称 (操盘手)
|
|
|
String upFileName = "CaoPanShou";
|
|
|
- KuaishouLiveBroadcastFiles file = new KuaishouLiveBroadcastFiles();
|
|
|
+ KuaishouLiveBroadcastFiles file = null;
|
|
|
//上传数据大盘
|
|
|
if (Check.isNotNull(dapanUrls) && !"[]".equals(dapanUrls)) {
|
|
|
+ file = new KuaishouLiveBroadcastFiles();
|
|
|
+ file.setId(id);
|
|
|
List<String> urls = JSONArray.parseArray(dapanUrls, String.class);
|
|
|
HashSet<String> set = new HashSet<>(urls);
|
|
|
String urlFix = "";
|
|
@@ -227,6 +229,8 @@ public class KuaishouLiveBroadcastServiceImpl implements IKuaishouLiveBroadcastS
|
|
|
|
|
|
//画像分析上传
|
|
|
if (Check.isNotNull(portraitUrls) && !"[]".equals(portraitUrls)) {
|
|
|
+ file = new KuaishouLiveBroadcastFiles();
|
|
|
+ file.setId(id);
|
|
|
List<String> urls = JSONArray.parseArray(portraitUrls, String.class);
|
|
|
HashSet<String> set = new HashSet<>(urls);
|
|
|
String urlFix = "";
|
|
@@ -248,20 +252,23 @@ public class KuaishouLiveBroadcastServiceImpl implements IKuaishouLiveBroadcastS
|
|
|
file.setPortraitMsg("success");
|
|
|
}
|
|
|
KuaishouLiveBroadcastFiles one = filesMapper.selectKuaishouLiveBroadcastFilesById(id);
|
|
|
- file.setId(id);
|
|
|
- if (Check.isNull(one)) {
|
|
|
- filesMapper.insertKuaishouLiveBroadcastFiles(file);
|
|
|
- } else {
|
|
|
- filesMapper.updateKuaishouLiveBroadcastFiles(file);
|
|
|
+ int uploadPictureCount = 0;
|
|
|
+ if (Check.isNotNull(file)) {
|
|
|
+ if (Check.isNull(one)) {
|
|
|
+ filesMapper.insertKuaishouLiveBroadcastFiles(file);
|
|
|
+ } else {
|
|
|
+ filesMapper.updateKuaishouLiveBroadcastFiles(file);
|
|
|
+ }
|
|
|
+ Integer dapanCount = Check.isNotNull(file.getDapanCount()) ? file.getDapanCount() : 0;
|
|
|
+ Integer portraitCount = Check.isNotNull(file.getPortraitCount()) ? file.getPortraitCount() : 0;
|
|
|
+ uploadPictureCount = dapanCount + portraitCount;
|
|
|
}
|
|
|
|
|
|
//更新直播表
|
|
|
KuaishouLiveBroadcast updateEntity = new KuaishouLiveBroadcast();
|
|
|
updateEntity.setId(id);
|
|
|
updateEntity.setUploadFileCount(count);
|
|
|
- int dapanCount = Check.isNotNull(file.getDapanCount()) ? file.getDapanCount() : 0;
|
|
|
- int portraitCount = Check.isNotNull(file.getPortraitCount()) ? file.getPortraitCount() : 0;
|
|
|
- updateEntity.setUploadPictureCount(dapanCount + portraitCount);
|
|
|
+ updateEntity.setUploadPictureCount(uploadPictureCount);
|
|
|
updateEntity.setActualGmv(actualGmv);
|
|
|
kuaishouLiveBroadcastMapper.updateKuaishouLiveBroadcast(updateEntity);
|
|
|
|