package com.doumee.api.web;
|
|
import com.doumee.config.annotation.LoginRequired;
|
import com.doumee.core.annotation.trace.Trace;
|
import com.doumee.core.model.ApiResponse;
|
import com.doumee.dao.web.dto.CardDTO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* @author T14
|
*/
|
@Api(tags = "充值卡信息")
|
@Trace(exclude = true)
|
@RestController
|
@RequestMapping("/web/card")
|
@LoginRequired
|
@Slf4j
|
public class CardApi extends ApiController{
|
|
|
/**
|
* 充值卡兑换
|
* @return
|
*/
|
@ApiOperation(value = "充值卡兑换", notes = "小程序端")
|
@PostMapping("/exchangeCard")
|
public ApiResponse exchangeCard(@RequestBody CardDTO cardDTO){
|
cardService.exchangeCard(cardDTO.getCode(),cardDTO.getPassword(),getMemberId());
|
return ApiResponse.success(null);
|
}
|
}
|