package com.njyunzhi.pet_identity.service;

import com.baomidou.mybatisplus.extension.service.IService;

import java.io.Serializable;
import java.util.List;

public interface IBaseService<T> extends IService<T> {
    /**
     * 逻辑删除
     * @param id
     * @return
     */
    boolean removeLogicById(Serializable id);

    /**
     * 逻辑删除
     * @param id
     * @return
     */
    boolean removeLogicByUser(Serializable id, String userId, String userType);

    boolean removeBy(String column, Object value, boolean notDelete);

    boolean canAccessData(Serializable id, String userId);

    boolean remvoeWithDataScope(Serializable id, String userId);

    int countBy(String column, Object value, boolean notDelete);

    T getByButNot(String column, Object value, String col, Object val, boolean notDelete);

    T getExistBy(String column, Object value, boolean normal, boolean notDelete);

    List<T> getListBy(String column, Object value, boolean normal, boolean notDelete);
}
