package com.xhpc.activity.mapper;


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

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

public interface XhpcActivityDiscountMapper {

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

    List<XhpcActivityDiscountDomain> selectByTemplateIdAndStatus(@Param("templateId") Integer templateId, @Param("status")Integer status);

    int updateByTemplateIdAndUncheck(@Param("templateId") Integer templateId);

    List<XhpcActivityDiscountDomain> selectByTemplateIdAndDelflag(@Param("templateId") Integer templateId, @Param("delflag")Integer status);

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

    int deleteLogicByPrimaryKey(Integer activity_id);

    int deleteByPrimaryKey(Integer activity_id);

    int insert(XhpcActivityDiscountDomain record);

    XhpcActivityDiscountDomain selectByPrimaryKey(Integer activity_id);

    int updateByPrimaryKey(XhpcActivityDiscountDomain record);

    int checkByPrimaryKey(XhpcActivityDiscountDomain record);

    int updateStatusByPrimaryKey(XhpcActivityDiscountDomain record);

    int updateStatusByTemplateId(@Param("templateId") Integer templateId, @Param("status") Short status);

    List<Map<String, Object>> selectAPPUserListByUserIds(@Param("userIds") String userIds);

    List<Map<String, Object>> selectComUserListByUserIds(@Param("userIds") String userIds);

    List<Map<String, Object>> selectBUserListByUserIds(@Param("userIds") String userIds);

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

    int updateStatusByExpireNow();
}