Quellcode durchsuchen

Merge remote-tracking branch 'origin/sit' into sit

panzhilin vor 4 Tagen
Ursprung
Commit
792b163c59

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/StoreCommentAppeal.java

@@ -43,7 +43,7 @@ public class StoreCommentAppeal extends Model<StoreCommentAppeal> {
     @TableField("img_id")
     private String imgId;
 
-    @ApiModelProperty(value = "申诉状态: 0:待处理, 1:已驳回, 2:已同意")
+    @ApiModelProperty(value = "申诉状态: 0:待处理, 1:已驳回, 2:已同意, 3:处理中")
     @TableField("appeal_status")
     private Integer appealStatus;
 

+ 2 - 2
alien-entity/src/main/java/shop/alien/mapper/StoreCommentAppealMapper.java

@@ -76,13 +76,13 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
             "LEFT JOIN store_comment sc ON sca.comment_id = sc.id " +
             "LEFT JOIN store_img si ON sca.img_id = si.id " +
             "LEFT JOIN (SELECT sc.id id, si.img_url user_img_url FROM store_comment sc LEFT JOIN store_img si ON sc.img_id = si.id AND sc.delete_flag = 0) sci ON sci.id = sca.comment_id " +
-            "WHERE sca.appeal_status = 0 AND sca.delete_flag = 0")
+            "WHERE sca.appeal_status = 0 and record_id is null AND sca.delete_flag = 0")
     List<Map<String, Object>> getAppealList();
 
 
     @Select("SELECT sca.id, sca.appeal_status, sca.final_result, sca.comment_id, sca.record_id " +
             "FROM store_comment_appeal sca " +
-            "WHERE sca.appeal_status = 0")
+            "WHERE sca.appeal_status = 3")
     List<StoreCommentAppeal> getPendingAppeals();
 
     @Update("UPDATE store_comment_appeal " +

+ 7 - 7
alien-job/src/main/java/shop/alien/job/store/BadReviewAppealJob.java

@@ -56,20 +56,20 @@ public class BadReviewAppealJob {
 //    @Value("${third-party-login.base-url}")
 //    private String loginUrl;
 
-    private String loginUrl = "http://192.168.2.78:9000/ai/user-auth-core/api/v1/auth/login";
-
-
     @Value("${third-party-user-name.base-url}")
     private String userName;
 
     @Value("${third-party-pass-word.base-url}")
     private String passWord;
 
-    private String analyzeUrl = "http://192.168.2.78:9000/ai/auto-review/api/v1/analyze";
-
-    private String resultUrl = "http://192.168.2.78:9000/ai/auto-review";
+    @Value("${third-party-login.base-url}")
+    private String loginUrl;
 
+    @Value("${third-party-analyzeUrl.base-url}")
+    private String analyzeUrl;
 
+    @Value("${third-party-resultUrl.base-url}")
+    private String resultUrl;
 
     /**
      * 差评申述置信度分析接口地址
@@ -299,7 +299,7 @@ public class BadReviewAppealJob {
                 //修改评论状态为"处理中"
                 StoreCommentAppeal sCommentAppeal = new StoreCommentAppeal();
                 sCommentAppeal.setId((Integer) storeCommentAppeal.get("id"));
-                sCommentAppeal.setAppealStatus(0);
+                sCommentAppeal.setAppealStatus(3);
                 sCommentAppeal.setRecordId(recordId);
                 storeCommentAppealMapper.updateById(sCommentAppeal);
 

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/AiAuditController.java

@@ -109,7 +109,7 @@ public class AiAuditController {
 
     private R<JSONObject> getAiAuditContentCheck(String accessToken, String text) {
         JSONObject data = new JSONObject();
-        data.put("is_trade_related", true);
+        data.put("is_compliant", true);
 
         // 初始化请求体Map
         Map<String, Object> requestBody = new HashMap<>();

+ 3 - 3
alien-store/src/main/java/shop/alien/store/controller/LifeDiscountCouponStoreFriendController.java

@@ -165,9 +165,9 @@ public class LifeDiscountCouponStoreFriendController {
     @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "当前登录店铺id", dataType = "String", paramType = "query", required = true)
     })
     @GetMapping("/getRuleList")
-    private R<List<LifeDiscountCouponFriendRuleVo>> getRuleList(@RequestParam(value = "storeId") String storeId) {
-        log.info("LifeDiscountCouponStoreFriendController.getRuleList?storeId={}", storeId);
-        return R.data(lifeDiscountCouponStoreFriendService.getRuleList(storeId));
+    private R<List<LifeDiscountCouponFriendRuleVo>> getRuleList(@RequestParam(value = "storeId") String storeId, String acName, String status) {
+        log.info("LifeDiscountCouponStoreFriendController.getRuleList?storeId={},name={},status={}", storeId, acName, status);
+        return R.data(lifeDiscountCouponStoreFriendService.getRuleList(storeId, acName, status));
     }
 
     @ApiOperation("查询赠券记录")

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/LifeDiscountCouponStoreFriendService.java

@@ -55,7 +55,7 @@ public interface LifeDiscountCouponStoreFriendService extends IService<LifeDisco
 
     List<LifeDiscountCouponFriendRuleDetailVo> getReceivedFriendCouponList(String storeId,String friendStoreUserId);
 
-    List<LifeDiscountCouponFriendRuleVo> getRuleList(String storeId);
+    List<LifeDiscountCouponFriendRuleVo> getRuleList(String storeId, String acName, String status);
 
     LifeDiscountCouponFriendRuleVo getRuleById(String id);
 

+ 1 - 0
alien-store/src/main/java/shop/alien/store/service/LifeUserStoreService.java

@@ -226,6 +226,7 @@ public class LifeUserStoreService {
                 // 如果未找到打卡次数(有图片并且设置为可见的),则设置为0
                 if (null == storeMap.get("storeClockInCountWithCanLook")) {
                     storeMap.put("storeClockInCountWithCanLook", 0);
+                    continue;
                 }
                 // 将当前门店的信息添加到返回结果列表中
                 returnMaps.add(storeMap);

+ 7 - 1
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponStoreFriendServiceImpl.java

@@ -471,11 +471,17 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
     }
 
     @Override
-    public List<LifeDiscountCouponFriendRuleVo> getRuleList(String storeId) {
+    public List<LifeDiscountCouponFriendRuleVo> getRuleList(String storeId, String acName, String status) {
         List<LifeDiscountCouponFriendRuleVo> ruleList = lifeDiscountCouponFriendRuleDetailMapper.getRuleList(storeId);
         if (ObjectUtils.isNotEmpty(ruleList)) {
             ruleList.forEach(i -> i.setStatus(i.getEndDate().after(new Date()) ? "0" : "1"));
         }
+        if (StringUtils.isNotEmpty(acName)) {
+            ruleList = ruleList.stream().filter(i -> i.getAcName().contains(acName)).collect(Collectors.toList());
+        }
+        if (StringUtils.isNotEmpty(status)) {
+            ruleList = ruleList.stream().filter(i -> i.getStatus().equals(status)).collect(Collectors.toList());
+        }
         return ruleList;
     }
 

+ 10 - 1
alien-store/src/main/java/shop/alien/store/service/impl/StoreCommentAppealServiceImpl.java

@@ -94,9 +94,18 @@ public class StoreCommentAppealServiceImpl extends ServiceImpl<StoreCommentAppea
     public IPage<StoreCommentAppealVo> getAppealHistory(Integer pageNum, Integer pageSize, Integer storeId, String appealStatus) {
         QueryWrapper<StoreCommentAppealVo> wrapper = new QueryWrapper<>();
         wrapper.eq("a.store_id", storeId)
-                .eq(!appealStatus.isEmpty() && !"null".equals(appealStatus), "a.appeal_status", appealStatus)
+//                .eq(!appealStatus.isEmpty() && !"null".equals(appealStatus), "a.appeal_status", appealStatus)
                 .eq("a.delete_flag", 0)
                 .orderByDesc("a.created_time");
+
+        if (StringUtils.isNotEmpty(appealStatus) && !"null".equals(appealStatus)) {
+            if ("0".equals(appealStatus)) {
+                wrapper.in("a.appeal_status", 0, 3);
+            } else {
+                wrapper.eq("a.appeal_status", appealStatus);
+            }
+        }
+
         IPage<StoreCommentAppealVo> storeCommentAppealPage = storeCommentAppealMapper.getStoreCommentAppealPage(new Page<>(pageNum, pageSize), wrapper);
         storeCommentAppealPage.getRecords().forEach(item -> {
             String[] split = item.getImgId().split(",");