| 123456789101112131415161718192021222324 |
- package com.nju.edu.pay.controller.api;
- import com.nju.edu.pay.service.TradeService;
- import com.nju.edu.pay.web.annotation.RootAllowed;
- import com.nju.edu.pay.web.response.Response;
- import com.nju.edu.pay.web.response.SuccessResponse;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- @RequestMapping("/api/trade")
- public class TradeController {
- @Autowired
- TradeService tradeService;
- @GetMapping("/tradeList")
- @RootAllowed
- public Response getTradeList(){
- return new SuccessResponse(tradeService.retrieveAll());
- }
- }
|