From e966cf01f201b48dc453d03a2b4bb49e7081d74e Mon Sep 17 00:00:00 2001 From: ronger Date: Tue, 28 Dec 2021 23:22:52 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=93=B6=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E5=A2=9E=E5=8A=A0=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9F=A5=E7=9C=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/api/bank/BankAccountController.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/com/rymcu/forest/web/api/bank/BankAccountController.java b/src/main/java/com/rymcu/forest/web/api/bank/BankAccountController.java index ab81e25..fd399ab 100644 --- a/src/main/java/com/rymcu/forest/web/api/bank/BankAccountController.java +++ b/src/main/java/com/rymcu/forest/web/api/bank/BankAccountController.java @@ -6,10 +6,13 @@ import com.rymcu.forest.core.result.GlobalResult; import com.rymcu.forest.core.result.GlobalResultGenerator; import com.rymcu.forest.dto.BankAccountDTO; import com.rymcu.forest.dto.BankAccountSearchDTO; +import com.rymcu.forest.dto.TransactionRecordDTO; import com.rymcu.forest.service.BankAccountService; +import com.rymcu.forest.util.Utils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -45,4 +48,19 @@ public class BankAccountController { return GlobalResultGenerator.genSuccessResult(bankAccount); } + @GetMapping("/transaction-records") + public GlobalResult transactionRecords(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "20") Integer rows, HttpServletRequest request) { + String bankAccount = request.getParameter("bankAccount"); + String startDate = request.getParameter("startDate"); + String endDate = request.getParameter("endDate"); + PageHelper.startPage(page, rows); + List list = bankAccountService.findUserTransactionRecords(bankAccount, startDate, endDate); + PageInfo pageInfo = new PageInfo(list); + Map map = new HashMap(2); + map.put("records", pageInfo.getList()); + Map pagination = Utils.getPagination(pageInfo); + map.put("pagination", pagination); + return GlobalResultGenerator.genSuccessResult(map); + } + }