package com.liquidnet.service.smile.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.smile.entity.SmileAgent;
import com.liquidnet.service.smile.entity.dao.SmileAgentDao;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liquidnet
 * @since 2022-03-16
 */
public interface SmileAgentMapper extends BaseMapper<SmileAgent> {

    void updateAgentById(@Param("id")Long id,@Param("totalCarry") BigDecimal totalCarry,@Param("ordCarry") BigDecimal ordCarry);

    void insertAgent(@Param("performancesId") String performancesId, @Param("ticketId") String ticketId);

    Map getUserDataByPerIdAndTicketsId(@Param("performancesId")String performancesId,@Param("uid") String uid,@Param("ticketId") String ticketId);

    Map getUserOrgByPerIdAndUidAndAgentMaster(@Param("performancesId") String performancesId,@Param("uid") String uid,@Param("ticketId") String ticketId);

    List<SmileAgentDao> selectAgentList(@Param("performancesId") String performancesId);

    List<SmileAgent> selectAgentCarryGtZeroByPerId(@Param("performancesId")String performancesId);

    int selectCountPerId();
}
