package com.copy.trade.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.copy.trade.entity.base.BaseQueryForm;
import com.copy.trade.entity.form.CopiedTradeForm;
import com.copy.trade.entity.po.CopiedTrade;
import com.copy.trade.entity.vo.CopiedTradeVo;
import com.copy.trade.service.ICopiedTradeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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-08
 */
@Api(value = "跟单记录表", tags = "跟单记录")
@RestController
@RequestMapping("/copied-trade")
public class CopiedTradeController {

	ICopiedTradeService copiedTradeServiceImpl;

	/**
	 * 推荐使用构造器注入
	 * @param copiedTradeServiceImpl
	 */	
	@Autowired
	CopiedTradeController(ICopiedTradeService copiedTradeServiceImpl) {
		this.copiedTradeServiceImpl = copiedTradeServiceImpl;
	}

	
	@ApiOperation(value = "跟单列表")
	@PostMapping("/list")
	public Page<CopiedTradeVo> list(@RequestBody CopiedTradeForm copiedTradeForm){
		return copiedTradeServiceImpl.list(copiedTradeForm);
	}

}
