package com.yami.trading.admin.controller.ats;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.yami.trading.bean.ats.dto.StockAtsDto;
|
import com.yami.trading.common.domain.Result;
|
import com.yami.trading.service.ats.StockAtsService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
@RestController
|
@CrossOrigin
|
@Api(tags = "后台股票ATS")
|
@RequestMapping("stockAts")
|
@Slf4j
|
public class AdminStockAtsController {
|
|
@Resource
|
StockAtsService stockAtsService;
|
|
/**
|
* @Description: 获取ATS列表
|
* @Param:
|
* @return:
|
*/
|
@ApiOperation("获取ATS订单")
|
@PostMapping({"getListByAdmin.do"})
|
public Result<Page<StockAtsDto>> getListByAdmin(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
@RequestParam(value = "pageSize", defaultValue = "5") int pageSize,
|
@RequestParam(value = "keywords", required = false)String keywords) {
|
return stockAtsService.getListByAdmin(pageNum, pageSize, keywords);
|
}
|
|
|
@ApiOperation("ATS审核")
|
@PostMapping({"atsCheck.do"})
|
@ResponseBody
|
public Result atsCheck(@RequestParam(value = "id") String id,
|
@RequestParam(value = "checkType") Integer checkType,
|
@RequestParam(value = "stockCode", required = false) String stockCode,
|
@RequestParam(value = "closePrice", defaultValue = "0", required = false) double closePrice,
|
@RequestParam(value = "price",defaultValue = "0", required = false) double price) {
|
if((checkType == 1 && (id == null || stockCode == null) || (checkType == 2 && id == null))){
|
return Result.failed("参数不能为空");
|
}
|
return stockAtsService.atsCheck(id, checkType, stockCode, closePrice, price);
|
}
|
|
}
|