doum
2025-12-10 a7026e87d4f66195d872a00b7489fe78e6e7e4bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
    }
}