package com.copy.trade.dao;

import com.copy.trade.entity.form.TraderQueryForAdminForm;
import com.copy.trade.entity.po.Customer;
import com.copy.trade.entity.vo.CustomerVo;
import com.copy.trade.entity.vo.TraderTotalVo;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author wz
 * @since 2022-11-08
 */
public interface CustomerMapper extends BaseMapper<Customer> {

	List<Customer> listByTraderStatus(@Param("page") Page page, @Param("status") Integer status);
	
	List<CustomerVo> traderList(@Param("page") Page page, @Param("traderQueryForm") TraderQueryForAdminForm traderQueryForm);
	
	List<TraderTotalVo> traderTotalList(@Param("page") Page page, @Param("traderQueryForm") TraderQueryForAdminForm traderQueryForm);
	
	Boolean cancelTrader(@Param("traderId") Long traderId);
	
	Boolean updateTraderLevelId(@Param("traderId") Long traderId, @Param("traderLevelId") Long traderLevelId);

	Boolean updateTraderTop(@Param("traderId") Long traderId, @Param("isTop") Integer isTop);

	Boolean clearMaxPrincipalAmount(@Param("traderId") Long traderId);
}
