|
@@ -1,8 +1,10 @@
|
|
|
package shop.alien.store.service.impl;
|
|
package shop.alien.store.service.impl;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
@@ -590,7 +592,7 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public Integer addComment(MultipartRequest multipartRequest, Integer id, Integer businessId, Integer businessType, Integer storeId, Integer userId, Integer replyId, String commentContent, Double score, String otherScore, Integer isAnonymous, String evaluationTags, String phoneId) {
|
|
public Integer addComment(MultipartRequest multipartRequest, Integer id, Integer businessId, Integer businessType, Integer storeId, Integer userId, Integer replyId, String commentContent, Double score, String otherScore, Integer isAnonymous, String evaluationTags, String phoneId) {
|
|
|
- /* try {
|
|
|
|
|
|
|
+ try {
|
|
|
List<String> servicesList = Lists.newArrayList();
|
|
List<String> servicesList = Lists.newArrayList();
|
|
|
servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
|
servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
@@ -599,10 +601,10 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
|
|
|
return 2;
|
|
return 2;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- *//*Map<String, String> checkText = TextCheckUtil.check(commentContent);
|
|
|
|
|
|
|
+ /*Map<String, String> checkText = TextCheckUtil.check(commentContent);
|
|
|
if (null == checkText || checkText.get("result").equals("1")) {
|
|
if (null == checkText || checkText.get("result").equals("1")) {
|
|
|
return 2;
|
|
return 2;
|
|
|
- }*//*
|
|
|
|
|
|
|
+ }*/
|
|
|
StoreComment storeComment = new StoreComment();
|
|
StoreComment storeComment = new StoreComment();
|
|
|
storeComment.setId(id);
|
|
storeComment.setId(id);
|
|
|
storeComment.setStoreId(storeId);
|
|
storeComment.setStoreId(storeId);
|
|
@@ -628,10 +630,10 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
|
|
|
StringBuilder imgId = new StringBuilder();
|
|
StringBuilder imgId = new StringBuilder();
|
|
|
for (int i = 0; i < fileNameSet.size(); i++) {
|
|
for (int i = 0; i < fileNameSet.size(); i++) {
|
|
|
MultipartFile multipartFile = multipartRequest.getFileMap().get(fileNameSet.get(i));
|
|
MultipartFile multipartFile = multipartRequest.getFileMap().get(fileNameSet.get(i));
|
|
|
- //b
|
|
|
|
|
|
|
+ /*//b
|
|
|
System.out.println(multipartFile.getSize());
|
|
System.out.println(multipartFile.getSize());
|
|
|
//kb
|
|
//kb
|
|
|
- System.out.println(multipartFile.getSize() / 1024);
|
|
|
|
|
|
|
+ System.out.println(multipartFile.getSize() / 1024);*/
|
|
|
if (null != multipartFile && multipartFile.getSize() / 1024 > 0) {
|
|
if (null != multipartFile && multipartFile.getSize() / 1024 > 0) {
|
|
|
byte[] fileByte;
|
|
byte[] fileByte;
|
|
|
try {
|
|
try {
|
|
@@ -712,8 +714,7 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
|
|
|
log.error("StoreCommentService.userComment ERROR Msg={}", e.getMessage());
|
|
log.error("StoreCommentService.userComment ERROR Msg={}", e.getMessage());
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
-*/
|
|
|
|
|
- return 0;
|
|
|
|
|
|
|
+ // return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|