123456789101112131415161718192021 |
- package cn.rankin.userservice.controller;
- import cn.rankin.common.utils.api.model.APIResult;
- import cn.rankin.data.api.user.dto.PayDTO;
- import cn.rankin.userservice.service.PayingService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- @RestController
- @RequestMapping(value = "/pay")
- public class PayController {
- @Autowired
- private PayingService payingService;
- @RequestMapping(value = "/buy", method = RequestMethod.POST)
- public APIResult<Boolean> buy(@RequestBody PayDTO payDTO) {
- return payingService.buy(payDTO.getMerchantId(), payDTO.getQuantity(), payDTO.getType(), payDTO.getReceiptId(), payDTO.getNote());
- }
- }
|