package com.yonge.cooleshow.biz.dal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.yonge.cooleshow.biz.dal.entity.AuditReason;
import com.yonge.cooleshow.biz.dal.vo.AuditReasonVo;
import com.yonge.cooleshow.biz.dal.dto.search.AuditReasonSearch;
import com.yonge.cooleshow.biz.dal.dao.AuditReasonDao;
import com.yonge.cooleshow.biz.dal.service.AuditReasonService;


@Service
public class AuditReasonServiceImpl extends ServiceImpl<AuditReasonDao, AuditReason> implements AuditReasonService {
    private final static Logger log = LoggerFactory.getLogger(AuditReasonServiceImpl.class);

	@Override
    public AuditReasonVo detail(Long id) {
        return baseMapper.detail(id);
    }
    
    @Override
    public IPage<AuditReasonVo> selectPage(IPage<AuditReasonVo> page, AuditReasonSearch query){
        return page.setRecords(baseMapper.selectPage(page, query));
    }

    @Override
    public boolean del(Long id) {
        AuditReason auditReason = new AuditReason();
        auditReason.setId(id);
        auditReason.setDelFlag(true);
        return this.updateById(auditReason);
    }

}