记得上下班打卡 | git大法好,push需谨慎

Commit 49488a13 authored by jiangxiulong's avatar jiangxiulong

兑换

parent c46d59f9
......@@ -10,4 +10,5 @@ public interface IGoblinNftGoodsAppService {
GoblinGoodsInfoVo goodsDetail(String spuId, String skuId);
Boolean exchange(String code);
}
......@@ -10,10 +10,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@Slf4j
@Api(tags = "NFT商品-App")
......@@ -52,4 +49,20 @@ public class GoblinNftGoodsAppController {
return ResponseDto.success(vo);
}
@PostMapping("exchange")
@ApiOperation("兑换码兑换")
@ApiImplicitParams({
@ApiImplicitParam(type = "from", required = true, dataType = "String", name = "code", value = "兑换码", example = "1"),
})
public ResponseDto exchange(
@RequestParam("code") String code
) {
Boolean res = goblinNftGoodsAppService.exchange(code);
if (res) {
return ResponseDto.success();
} else {
return ResponseDto.failure();
}
}
}
......@@ -110,4 +110,12 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
return goodsInfoVo;
}
@Override
public Boolean exchange(String code) {
// 验证
// 使用
// 下单
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment