package com.ics.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ics.admin.domain.Activity;
import com.ics.admin.mapper.ActivityMapper;
import com.ics.service.IActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 活动管理Service业务层处理
 * 
 * @author ics
 * @date 2021-03-25
 */
@Service("activityAppService")
public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity> implements IActivityService {
    @Autowired
    private ActivityMapper activityMapper;


    /**
     * 查询活动管理列表
     *
     * @param activity 活动管理
     * @return 活动管理
     */
    @Override
    public List<Activity> selectActivityAppList(Activity activity)
    {
        return activityMapper.selectActivityForAppList(activity);
    }

    /**
     * 查询活动管理列表(app端 个人查询)
     *
     * @param userId
     * @return 活动管理集合
     */
    @Override
    public List<Activity> selectActivityAppListByUserId(Long userId) {
        return activityMapper.selectActivityForAppListByUserId(userId);
    }


    /**
     * 查询活动管理app端
     *
     * @param id 活动管理ID
     * @return 活动管理
     */
    @Override
    public Activity selectActivityByAppId(Long id) {
        return activityMapper.selectActivityByAppId(id);
    }


}
