zyy
2025-12-06 ab7e92d5154b5acf05699bd527c4d8b5fff10550
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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);
    }
 
}