| | |
| | | package com.xiaopeng.operation.controller; |
| | | |
| | | import com.xiaopeng.api.model.operation.XpTradingStrategy; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.controller.BaseController; |
| | | import com.xiaopeng.operation.dto.XpTradingStrategyEditDTO; |
| | |
| | | @ApiOperation(value = "获取交易策略配置", tags = {"inner-交易策略配置"}) |
| | | @GetMapping("/logan/inner/xpOperationStrategy/getOne") |
| | | public R<XpTradingStrategyDetailVO> getOne() { |
| | | |
| | | // TODO[流量接入] 这里需要判断是哪个三方车队的,获取到对应的交易策略 |
| | | XpTradingStrategyDetailVO detail = tradingStrategyService.queryDetail(); |
| | | return R.ok(detail); |
| | | } |
| | |
| | | tradingStrategyService.editStrategy(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "三方车队的交易策略", tags = {"流量接入-信息录入-设置交易策略"}) |
| | | @PostMapping("/api/v1/xp-rt/strategy") |
| | | public R<?> add(@Validated @RequestBody XpTradingStrategy dto) {//创建只接收部分可设置的参数的dto |
| | | |
| | | // 通过key认证是哪个三方车队 |
| | | tradingStrategyService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | } |