瀏覽代碼

商户PC端 价目表 修改AI审核判断

qinxuyang 2 月之前
父節點
當前提交
5dbc9fe975

+ 2 - 2
alien-store/src/main/java/shop/alien/store/controller/StoreCuisineController.java

@@ -197,14 +197,14 @@ public class StoreCuisineController {
             // 执行AI审核
             if (StringUtils.isNotEmpty(textContent.toString()) || imageUrls.size() > 0) {
                 AiContentModerationUtil.AuditResult auditResult = aiContentModerationUtil.auditContent(textContent.toString(), imageUrls);
-                boolean allPassed = (auditResult != null);
+//                boolean allPassed = (auditResult != null);
                 
                 LambdaUpdateWrapper<StoreCuisine> auditUpdateWrapper = new LambdaUpdateWrapper<>();
                 auditUpdateWrapper.eq(StoreCuisine::getId, updatedCuisine.getId());
                 auditUpdateWrapper.set(StoreCuisine::getRejectionReason, null);
                 auditUpdateWrapper.set(StoreCuisine::getAuditTime, new Date());
                 
-                if (allPassed) {
+                if (auditResult.isPassed()) {
                     // 审核通过 审核状态为1 上架状态为1 已上架
                     auditUpdateWrapper.set(StoreCuisine::getStatus, 1);
                     auditUpdateWrapper.set(StoreCuisine::getShelfStatus, 1);

+ 2 - 2
alien-store/src/main/java/shop/alien/store/controller/StorePriceController.java

@@ -317,14 +317,14 @@ public class StorePriceController {
             // 执行AI审核
             if (StringUtils.isNotEmpty(textContent.toString()) || imageUrls.size() > 0) {
                 AiContentModerationUtil.AuditResult auditResult = aiContentModerationUtil.auditContent(textContent.toString(), imageUrls);
-                boolean allPassed = (auditResult != null);
+//                boolean allPassed = (auditResult != null);
                 
                 LambdaUpdateWrapper<StorePrice> auditUpdateWrapper = new LambdaUpdateWrapper<>();
                 auditUpdateWrapper.eq(StorePrice::getId, updatedPrice.getId());
                 auditUpdateWrapper.set(StorePrice::getRejectionReason, null);
                 auditUpdateWrapper.set(StorePrice::getAuditTime, new Date());
                 
-                if (allPassed) {
+                if (auditResult.isPassed()) {
                     // 审核通过 审核状态为1 上架状态为1 已上架
                     auditUpdateWrapper.set(StorePrice::getStatus, 1);
                     auditUpdateWrapper.set(StorePrice::getShelfStatus, 1);