@Api(value = "充值訂購Controller", tags = {"充值訂購接口"}) @ApiOperation(value = "用戶選擇優酷或者愛奇藝", tags = {"視頻選擇"}, notes = "Youku或iQIYI")
@RestController @Api(value = "充值訂購Controller", tags = {"充值訂購接口"}) public class TopUpOrderController { private final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private TopUpOrderService service; @PostMapping(value = "/topUpOrder") @ApiOperation(value = "充值滿500元訂購", notes = "輸入金額,好比:500") public void order(@ApiParam(name = "money", value = "充值金額", required = true) @RequestBody int money) { logger.debug("order 正在運行。"); service.service(money); logger.debug("order 運行完畢。"); } @PostMapping(value = "/chooseVideo") @ApiOperation(value = "用戶選擇優酷或者愛奇藝", notes = "輸入json格式,好比:{\"processInstanceId\":\"44546b0b-5066-11e9-af34-000ec6ad4028\",\"video\":\"iQIYI\"}") @ApiImplicitParams({@ApiImplicitParam(name = "req", value = "入參:流程id、選擇的視頻,{\"processInstanceId\":\"\",\"video\":\"Youku\"}", required = true, dataType = "JSONObject")}) public void chooseVideo(@RequestBody JSONObject req) { logger.debug("chooseVideo 正在運行。"); service.chooseVideo(req.getString("processInstanceId"), req.getString("video")); logger.debug("chooseVideo 運行完畢。"); } }