xiaoyong931011
2020-05-29 75f6cc1e47502ceef049beb628def631be1fcfc0
src/main/java/com/xcong/excoin/modules/symbols/controller/SymbolsController.java
@@ -1,22 +1,22 @@
package com.xcong.excoin.modules.symbols.controller;
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.symbols.parameter.dto.KlineDetailDto;
import com.xcong.excoin.modules.symbols.service.SymbolsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
/**
 * @author wzy
 * @date 2020-05-28
 **/
@Api(value = "币种相关轮询接口类", tags = "币种相关轮询接口类")
@Api(value = "K线以及币种相关轮询接口类", tags = "K线以及币种相关轮询接口类")
@Slf4j
@RestController
@RequestMapping(value = "/api/symbols")
@@ -27,7 +27,20 @@
    @ApiOperation(value = "轮询获取app首页币种交易信息", notes = "轮询获取app首页币种交易信息")
    @GetMapping(value = "/homeSymbols")
    public Result homeSymbols(Integer type) {
    public Result homeSymbols(@ApiParam(name = "type", value = "类型1-币币2-合约3-自选", required = true, example = "1") Integer type) {
        return symbolsService.homeSymbols(type);
    }
    @ApiOperation(value = "根据币种查询币种当前各种数据", notes = "根据币种查询币种当前各种数据")
    @GetMapping(value = "/findSymbolData")
    public Result findSymbolData(@ApiParam(name = "symbol", value="币种", required = true, example = "BTC/USDT") String symbol) {
        return symbolsService.findSymbolData(symbol);
    }
    @ApiOperation(value = "查询历史K线数据", notes = "查询历史K线数据")
    @PostMapping(value = "/klineDetail")
    public Result klineDetail(@RequestBody @Valid KlineDetailDto klineDetailDto) {
        return null;
    }
}