package com.xhpc.activity.mapper;

import com.xhpc.activity.domain.XhpcActivityRecordDomain;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface XhpcActivityRecordMapper {

    XhpcActivityRecordDomain selectByActivityAndUser(@Param("activityType") String activityType,
                                                     @Param("activityId") Integer activityId,
                                                     @Param("source") Integer source,
                                                     @Param("userId") String userId);

    List<XhpcActivityRecordDomain> selectByActivity(@Param("activityType") String activityType,
                                                           @Param("activityId") Integer activityId);

    List<Map<String, Object>> selectByParams(@Param("params") Map<String, Object> params);

    int deleteLogicByPrimaryKey(Long activity_record_id);

    int deleteByPrimaryKey(Long activity_record_id);

    int insert(XhpcActivityRecordDomain record);

    int insertBatch(@Param("domainList") List<XhpcActivityRecordDomain> domainList);

    XhpcActivityRecordDomain selectByPrimaryKey(Long activity_record_id);

    int updateByPrimaryKey(XhpcActivityRecordDomain record);
}