✨ 银行卡管理-增加交易记录查看功能
This commit is contained in:
parent
a36090fabd
commit
e966cf01f2
@ -6,10 +6,13 @@ import com.rymcu.forest.core.result.GlobalResult;
|
|||||||
import com.rymcu.forest.core.result.GlobalResultGenerator;
|
import com.rymcu.forest.core.result.GlobalResultGenerator;
|
||||||
import com.rymcu.forest.dto.BankAccountDTO;
|
import com.rymcu.forest.dto.BankAccountDTO;
|
||||||
import com.rymcu.forest.dto.BankAccountSearchDTO;
|
import com.rymcu.forest.dto.BankAccountSearchDTO;
|
||||||
|
import com.rymcu.forest.dto.TransactionRecordDTO;
|
||||||
import com.rymcu.forest.service.BankAccountService;
|
import com.rymcu.forest.service.BankAccountService;
|
||||||
|
import com.rymcu.forest.util.Utils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -45,4 +48,19 @@ public class BankAccountController {
|
|||||||
return GlobalResultGenerator.genSuccessResult(bankAccount);
|
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<TransactionRecordDTO> list = bankAccountService.findUserTransactionRecords(bankAccount, startDate, endDate);
|
||||||
|
PageInfo<TransactionRecordDTO> 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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user