|
@@ -15,6 +15,7 @@ import com.caimei365.user.service.ShopService;
|
|
import com.caimei365.user.utils.DateUtil;
|
|
import com.caimei365.user.utils.DateUtil;
|
|
import com.caimei365.user.utils.GenerateUtils;
|
|
import com.caimei365.user.utils.GenerateUtils;
|
|
import com.caimei365.user.utils.ImageUtils;
|
|
import com.caimei365.user.utils.ImageUtils;
|
|
|
|
+import com.caimei365.user.utils.OssUtil;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -565,11 +566,12 @@ public class ShopServiceImpl implements ShopService {
|
|
baikeProductMapper.updateBaikeProduct(baikeProductPo);
|
|
baikeProductMapper.updateBaikeProduct(baikeProductPo);
|
|
}
|
|
}
|
|
Integer productId = baikeProductPo.getProductId();
|
|
Integer productId = baikeProductPo.getProductId();
|
|
- // 删除原先的图片/参数/问题数据
|
|
|
|
|
|
+ // 删除原先的图片/参数/问题/视频文件数据
|
|
if (!newProductFlag) {
|
|
if (!newProductFlag) {
|
|
baikeProductMapper.deleteParamsByProductId(productId);
|
|
baikeProductMapper.deleteParamsByProductId(productId);
|
|
baikeProductMapper.deleteImagesByProductId(productId);
|
|
baikeProductMapper.deleteImagesByProductId(productId);
|
|
baikeProductMapper.deleteQuestionsByProductId(productId);
|
|
baikeProductMapper.deleteQuestionsByProductId(productId);
|
|
|
|
+ baikeProductMapper.deleteFilesByProductId(productId);
|
|
}
|
|
}
|
|
// 保存参数
|
|
// 保存参数
|
|
JSONArray paramArray = JSONArray.parseArray(baikeProductDto.getParamList());
|
|
JSONArray paramArray = JSONArray.parseArray(baikeProductDto.getParamList());
|
|
@@ -605,6 +607,19 @@ public class ShopServiceImpl implements ShopService {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ // 保存视频文件
|
|
|
|
+ JSONArray videoArray = JSONArray.parseArray(baikeProductDto.getVideoList());
|
|
|
|
+ if (null != videoArray) {
|
|
|
|
+ videoArray.forEach(videoObject->{
|
|
|
|
+ Map<String,String> videoMap = (Map<String,String>) videoObject;
|
|
|
|
+ String fileTitle = videoMap.get("fileTitle");
|
|
|
|
+ String fileName = videoMap.get("fileName");
|
|
|
|
+ String ossName = videoMap.get("ossName");
|
|
|
|
+ if (StringUtils.isNotEmpty(ossName)) {
|
|
|
|
+ baikeProductMapper.insertProductFile(fileTitle, fileName, ossName, productId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
return ResponseJson.success(null);
|
|
return ResponseJson.success(null);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -630,6 +645,10 @@ public class ShopServiceImpl implements ShopService {
|
|
// 问题列表
|
|
// 问题列表
|
|
List<BaikeProductQuestionPo> questionList = baikeProductMapper.getQuestionList(productId);
|
|
List<BaikeProductQuestionPo> questionList = baikeProductMapper.getQuestionList(productId);
|
|
baikeProduct.setQuestionList(questionList);
|
|
baikeProduct.setQuestionList(questionList);
|
|
|
|
+ // 视频列表
|
|
|
|
+ List<BaikeProductFilePo> videoList = baikeProductMapper.getVideoList(productId);
|
|
|
|
+ videoList.forEach(video -> video.setFileUrl(OssUtil.getOssUrl(video.getOssName())));
|
|
|
|
+ baikeProduct.setVideoList(videoList);
|
|
return ResponseJson.success(baikeProduct);
|
|
return ResponseJson.success(baikeProduct);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -668,4 +687,10 @@ public class ShopServiceImpl implements ShopService {
|
|
return ResponseJson.success(null);
|
|
return ResponseJson.success(null);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public ResponseJson<String> getSensitiveWords(Integer checkPoint) {
|
|
|
|
+ String sensitiveWords = baseMapper.getSensitiveWords(checkPoint);
|
|
|
|
+ return ResponseJson.success(sensitiveWords);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|