package com.copy.trade.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.copy.trade.entity.form.CopiedTradeForm;
import com.copy.trade.entity.form.TraderDataQueryForm;
import com.copy.trade.entity.po.TraderData;
import com.copy.trade.entity.vo.CopiedTradeVo;
import com.copy.trade.entity.vo.TraderDataVo;
import com.copy.trade.service.IPositionService;
import com.copy.trade.service.ITraderDataService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 * 交易员统计数据表  前端控制器
 * </p>
 *
 * @author wz
 * @since 2022-11-17
 */
@Api(value = "交易员统计数据表", tags = "交易员统计数据表")
@RestController
@RequestMapping("/traderdata")
public class TraderDataController {

	ITraderDataService traderDataServiceImpl;

	/**
	 * 推荐使用构造器注入
	 * @param traderDataServiceImpl
	 */	
	@Autowired
	TraderDataController(ITraderDataService traderDataServiceImpl) {
		this.traderDataServiceImpl = traderDataServiceImpl;
	}
	
	@ApiOperation(value = "可以修改的交易员统计数据列表")
	@PostMapping("/list")
	public Page<TraderDataVo> list(@RequestBody TraderDataQueryForm traderQueryForAdminForm){
		return traderDataServiceImpl.traderDataList(traderQueryForAdminForm);
	}
	
	@ApiOperation(value = "修改交易员统计数据")
	@PostMapping("/edit")
	public Boolean edit(@RequestBody TraderData traderData){
		return traderDataServiceImpl.edit(traderData);
	}
	

}
