TradeController.java 697 B

12345678910111213141516171819202122
  1. package com.nju.edu.pay.controller.api;
  2. import com.nju.edu.pay.service.TradeService;
  3. import com.nju.edu.pay.web.response.Response;
  4. import com.nju.edu.pay.web.response.SuccessResponse;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. @RestController
  10. @RequestMapping("/api/trade")
  11. public class TradeController {
  12. @Autowired
  13. TradeService tradeService;
  14. @GetMapping("/tradeList")
  15. public Response getTradeList(){
  16. return new SuccessResponse(tradeService.retrieveAll());
  17. }
  18. }