package com.ylx.point.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ylx.point.domain.PointActivityExpirePolicy;
import com.ylx.point.mapper.PointActivityExpirePolicyMapper;
import com.ylx.point.service.IPointActivityExpirePolicyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class IPointActivityExpirePolicyServiceImpl extends ServiceImpl<PointActivityExpirePolicyMapper, PointActivityExpirePolicy> implements IPointActivityExpirePolicyService {

    @Resource
    private PointActivityExpirePolicyMapper pointActivityExpirePolicyMapper;


    @Override
    public PointActivityExpirePolicy selectPointActivityExpirePolicyByActivityType(Integer activityType) {
        LambdaQueryWrapper<PointActivityExpirePolicy> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PointActivityExpirePolicy::getActivityType, activityType);
        return pointActivityExpirePolicyMapper.selectOne(queryWrapper);
    }

}
