package com.ylx.point.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylx.point.domain.PointActivity;
import com.ylx.point.domain.dto.UserPointActivityPageDTO;
import com.ylx.point.domain.vo.PointActivityTaskDetailVO;
import com.ylx.point.domain.vo.UserPointActivityVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 积分活动主Mapper接口
 *
 * @author wzj
 * @date 2026-03-25
 */
public interface PointActivityMapper extends BaseMapper<PointActivity> {

    public PointActivity selectPointActivityById(Long id);

    public List<PointActivity> selectPointActivityList(PointActivity pointActivity);

    public int insertPointActivity(PointActivity pointActivity);

    public int updatePointActivity(PointActivity pointActivity);

    public int deletePointActivityById(String id);

    public int deletePointActivityByIds(String[] ids);

    List<PointActivityTaskDetailVO> getTaskDetailListById(Long id);

    Integer selectTotalActiveTasks(String cityCode);

    Page<UserPointActivityVo> selectTaskWithProgress(Page<PointActivity> page, @Param("dto") UserPointActivityPageDTO dto);

}
