package com.boot.security.server.dao;

import com.boot.security.server.model.BaseSettlement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface CopyrightDao {
    List<BaseSettlement>  selectTableListMonth(@Param("copyrightId") Integer copyrightId,@Param("page") Integer page,@Param("limit")Integer limit);

    Integer selectTableListMonthCount(@Param("copyrightId") Integer copyrightId);

    List<BaseSettlement> selectBookInfo(@Param("copyrightId") Integer copyrightId,@Param("page") Integer page,@Param("limit")Integer limit);

    Integer selectBookInfoCount(@Param("copyrightId") Integer copyrightId);

    List<BaseSettlement> selectCopyrightAll();

    List<BaseSettlement> selectBookDetail(@Param("copyrightIdList") List<BaseSettlement> copyrightIdList,@Param("bookId") Long bookId,@Param("bookName") String bookName);

    @Update("update bi_report.report_book_settlement_month set jiesuan_status=#{status},jiesuan_status_name=#{statusName} where report_date=#{reportDate} and copyright_id=#{copyrightId}")
    int updateSettlementStatus(@Param("copyrightId") Integer copyrightId,@Param("reportDate") String reportDate,@Param("status") Integer status,@Param("statusName") String statusName);
}
