You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.1 KiB
62 lines
2.1 KiB
package com.example.demo.controller;
|
|
|
|
import com.example.demo.domain.vo.AuditRequest;
|
|
import com.example.demo.domain.vo.Page;
|
|
import com.example.demo.domain.vo.RechargeAudit;
|
|
import com.example.demo.domain.vo.RefundAudit;
|
|
import com.example.demo.service.AuditService;
|
|
import com.github.pagehelper.PageInfo;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
/**
|
|
* @program: gold-java
|
|
* @ClassName AuditController
|
|
* @description: 审核模块
|
|
* @author: Ethan
|
|
* @create: 2025−06-19 17:30
|
|
* @Version 1.0
|
|
**/
|
|
|
|
@RestController
|
|
@RequestMapping("/audit")
|
|
@RequiredArgsConstructor
|
|
@Slf4j
|
|
@Transactional
|
|
@CrossOrigin
|
|
public class AuditController {
|
|
|
|
@Autowired
|
|
private AuditService auditService;
|
|
|
|
//审核订单
|
|
@PostMapping("audit")
|
|
public ResponseEntity<Boolean> auditOrder(
|
|
@RequestBody AuditRequest request) {
|
|
boolean result = auditService.auditOrder(request.getToken(),request.getOrderCode(), request.getAuditId(), request.getAction(),request.getRejectReason());
|
|
return ResponseEntity.ok(result);
|
|
}
|
|
//多条件查询充值审核订单列表
|
|
@PostMapping("selectRecharge")
|
|
public PageInfo<RechargeAudit> searchRechargeAudit(
|
|
@RequestBody Page page) {
|
|
Integer pageNum = page.getPageNum();
|
|
Integer pageSize = page.getPageSize();
|
|
RechargeAudit rechargeAudit = page.getRechargeAudit();
|
|
|
|
return auditService.selectRechargeBy(pageNum, pageSize, rechargeAudit);
|
|
} //多条件查询退款审核订单列表
|
|
@PostMapping("selectRefund")
|
|
public PageInfo<RefundAudit> searchRefundAudit(
|
|
@RequestBody Page page) {
|
|
Integer pageNum = page.getPageNum();
|
|
Integer pageSize = page.getPageSize();
|
|
RefundAudit refundAudit = page.getRefundAudit();
|
|
|
|
return auditService.selectRefundBy(pageNum, pageSize, refundAudit);
|
|
}
|
|
}
|