From 0d7d874912d0147376826b55667a1deb6547ed91 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 21 五月 2026 15:25:27 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' into dev_宁夏_英泽防锈
---
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java | 55 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
index e895ea6..9019c61 100644
--- a/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
+++ b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -6,18 +6,19 @@
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.domain.R;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.purchase.dto.PaymentHistoryRecordVo;
import com.ruoyi.purchase.dto.PaymentLedgerDto;
import com.ruoyi.purchase.dto.PaymentRegistrationDto;
import com.ruoyi.purchase.pojo.PaymentRegistration;
import com.ruoyi.purchase.service.IPaymentRegistrationService;
+import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@@ -29,8 +30,8 @@
*/
@RestController
@RequestMapping("/purchase/paymentRegistration")
+@AllArgsConstructor
public class PaymentRegistrationController extends BaseController {
- @Autowired
private IPaymentRegistrationService paymentRegistrationService;
/**
@@ -61,8 +62,8 @@
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id) {
- return success(paymentRegistrationService.selectPaymentRegistrationById(id));
+ public R<?> getInfo(@PathVariable("id") Long id) {
+ return R.ok(paymentRegistrationService.selectPaymentRegistrationById(id));
}
/**
@@ -71,8 +72,9 @@
@Log(title = "浠樻鐧昏", businessType = BusinessType.INSERT)
@PostMapping
@Transactional(rollbackFor = Exception.class)
- public AjaxResult add(@RequestBody List<PaymentRegistration> paymentRegistration) {
- return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
+ public R<?> add(@RequestBody List<PaymentRegistration> paymentRegistration) {
+ paymentRegistrationService.insertPaymentRegistration(paymentRegistration);
+ return R.ok();
}
/**
@@ -81,8 +83,9 @@
@Log(title = "浠樻鐧昏", businessType = BusinessType.UPDATE)
@PutMapping
@Transactional(rollbackFor = Exception.class)
- public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
- return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
+ public R<?> edit(@RequestBody PaymentRegistration paymentRegistration) {
+ paymentRegistrationService.updatePaymentRegistration(paymentRegistration);
+ return R.ok();
}
/**
@@ -90,8 +93,9 @@
*/
@Log(title = "浠樻鐧昏", businessType = BusinessType.DELETE)
@DeleteMapping("/del")
- public AjaxResult remove(@RequestBody Long[] ids) {
- return toAjax(paymentRegistrationService.deletePaymentRegistrationByIds(ids));
+ public R<?> remove(@RequestBody Long[] ids) {
+ paymentRegistrationService.deletePaymentRegistrationByIds(ids);
+ return R.ok();
}
/**
@@ -99,51 +103,52 @@
*/
@Log(title = "浠樻鐧昏", businessType = BusinessType.DELETE)
@DeleteMapping("/delete")
- public AjaxResult delete(@RequestBody Long[] ids) {
- return toAjax(paymentRegistrationService.delete(ids));
+ public R<?> delete(@RequestBody Long[] ids) {
+ paymentRegistrationService.delete(ids);
+ return R.ok();
}
/**
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/byPurchaseId/{id}")
- public AjaxResult getPurchaseInfo(@PathVariable("id") Long id) {
- return success(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
+ public R<?> getPurchaseInfo(@PathVariable("id") Long id) {
+ return R.ok(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
}
/**
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/paymentLedgerList")
- public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
+ public R<?> paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
Integer detailPageNum,
Integer detailPageSize) {
IPage<Map<String, Object>> mapIPage = paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto, page, detailPageNum, detailPageSize);
- return success(mapIPage);
+ return R.ok(mapIPage);
}
/**
* 渚涘簲鍟嗗線鏉ュ垎椤垫帴鍙�
*/
@GetMapping("/supplierNameListPage")
- public AjaxResult supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
- return success(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
+ public R<?> supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
+ return R.ok(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
}
/**
* 渚涘簲鍟嗗線鏉ュ垎椤垫帴鍙�
*/
@GetMapping("/supplierNameListPageDetails")
- public AjaxResult supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
- return success(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
+ public R<?> supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
+ return R.ok(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
}
/**
* 鑾峰彇鏈湀搴斾粯淇℃伅
*/
@GetMapping(value = "/paymentMonthList")
- public AjaxResult paymentMonthList() {
- return success(paymentRegistrationService.paymentMonthList());
+ public R<?> paymentMonthList() {
+ return R.ok(paymentRegistrationService.paymentMonthList());
}
/**
@@ -165,9 +170,9 @@
* @return
*/
@GetMapping("/getPaymentRecordList/{supplierId}")
- public AjaxResult getPaymentRecordList(@PathVariable Long supplierId) {
+ public R<?> getPaymentRecordList(@PathVariable Long supplierId) {
List<PaymentHistoryRecordVo> paymentRecordList = paymentRegistrationService.getPaymentRecordList(supplierId);
- return success(paymentRecordList);
+ return R.ok(paymentRecordList);
}
/**
--
Gitblit v1.9.3