Browse Source

优化举报接口

zhangchen 3 weeks ago
parent
commit
c55d552763

+ 3 - 4
alien-lawyer/src/main/java/shop/alien/lawyer/controller/LawyerUserViolationController.java

@@ -117,11 +117,10 @@ public class LawyerUserViolationController {
     public R<IPage<LawyerUserViolationDto>> getViolationPage(
             @RequestParam(defaultValue = "1") int pageNum,
             @RequestParam(defaultValue = "10") int pageSize,
-            @RequestParam(required = false) String nickname,
-            @RequestParam(required = false) String phone,
+            @RequestParam(required = false) String orderId,
             @RequestParam(required = false) String processingStatus) {
-        log.info("LawyerUserViolationController.getViolationPage?pageNum={},pageSize={},nickName={},phone={},processingStatus={}", pageNum, pageSize, nickname, phone, processingStatus);
-        return R.data(lawyerUserViolationService.getViolationPage(pageNum, pageSize, nickname, phone, processingStatus));
+        log.info("LawyerUserViolationController.getViolationPage?pageNum={},pageSize={},orderId={},processingStatus={}", pageNum, pageSize, orderId, processingStatus);
+        return R.data(lawyerUserViolationService.getViolationPage(pageNum, pageSize, orderId, processingStatus));
     }
 
     @ApiOperation(value = "举报审核")

+ 1 - 1
alien-lawyer/src/main/java/shop/alien/lawyer/service/LawyerUserViolationService.java

@@ -33,7 +33,7 @@ public interface LawyerUserViolationService extends IService<LawyerUserViolation
 
     Map<String, Object> reportListById(String id);
 
-    IPage<LawyerUserViolationDto> getViolationPage(int page, int size, String nickName, String phone, String processingStatus);
+    IPage<LawyerUserViolationDto> getViolationPage(int page, int size, String orderId, String processingStatus);
 
     void approve(int id, String processingStatus, String reportResult);
 

+ 5 - 7
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerUserViolationServiceImpl.java

@@ -632,18 +632,16 @@ public class LawyerUserViolationServiceImpl extends ServiceImpl<LawyerUserViolat
     }
 
     @Override
-    public IPage<LawyerUserViolationDto> getViolationPage(int page, int size, String nickName, String phone, String processingStatus) {
+    public IPage<LawyerUserViolationDto> getViolationPage(int page, int size, String orderId, String processingStatus) {
         IPage<LawyerUserViolationVo> pageRequest = new Page<>(page, size);
         QueryWrapper<LawyerUserViolationVo> queryWrapper = new QueryWrapper<>();
 
         // 基础查询条件
         queryWrapper.eq("luv.delete_flag", 0)
-                .in("luv.report_context_type", Arrays.asList("1", "2", "3"));
+                .eq("luv.report_context_type", 6);
 
         // 动态查询条件
-        queryWrapper.like(StringUtils.isNotEmpty(nickName), "ui.nick_name", nickName)
-                .like(StringUtils.isNotEmpty(phone), "ui.phone", phone);
-
+        queryWrapper.like(StringUtils.isNotEmpty(orderId), "luv.order_id", orderId);
         if (StringUtils.isNotEmpty(processingStatus)) {
             queryWrapper.eq("luv.processing_status", processingStatus);
         }
@@ -805,9 +803,9 @@ public class LawyerUserViolationServiceImpl extends ServiceImpl<LawyerUserViolat
         NotificationInfo notificationInfo = new NotificationInfo();
         String orderId = violation.getOrderId();
         String message = String.format("用户对编号为%s的订单进行申诉,经核实,用户举报属实,"
-                + "订单金额将会退还给用户。触发条件:平台审核点击同意按钮时触发", orderId);
+                + "订单金额将会退还给用户。", orderId);
         notificationInfo.setMessage(message);
-        notificationInfo.setTitle("订单举报成功通知");
+        notificationInfo.setTitle("咨询订单举报成功通知");
         return notificationInfo;
     }