package org.dromara.zhishu.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.zhishu.domain.BookBaseInfo;
import org.dromara.zhishu.domain.bo.BookBaseInfoBo;
import org.dromara.zhishu.domain.bo.IllBaseInfoBo;
import org.dromara.zhishu.domain.vo.BookBaseInfoVo;

import java.util.List;

/**
 * 基础信息Mapper接口
 *
 * @author Lion Li
 * @date 2025-03-08
 */
@Mapper
public interface BookBaseInfoMapper extends BaseMapperPlus<BookBaseInfo, BookBaseInfoVo> {



    @Select("select * from book_base_info")
    List<BookBaseInfo> getList1();


    @Select("select * from book_base_info")
    @InterceptorIgnore(tenantLine = "true", dataPermission = "false")
    List<BookBaseInfo> getList2();

    @Select("select * from book_base_info")
    BookBaseInfoVo selectVoByIsdn(QueryWrapper queryWrapper);
    
    @Select("select * from book_base_info where isbn = #{isbn}")
    BookBaseInfoVo selectIsbnList(String isbn);

    BookBaseInfoVo selectByIsbn(String isbn);

    int updateByIsbn(BookBaseInfoBo bo);
    
    @Select("select * from book_base_info where book_name LIKE CONCAT(#{bookName}, '%')")
    List<BookBaseInfoVo> selectByBookName(String bookName);

    List<BookBaseInfoVo> selectBookPic();

    int delectByIsbn(String isbn);

    int updateByIllge(IllBaseInfoBo bo);
}
