package yangtz.cs.liu.campus.mapper.schoolAssets;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.campus.domain.schoolAssets.SchoolAssets;
import yangtz.cs.liu.campus.vo.schoolAssets.AssetsVo;

import java.util.List;

/**
 * 物品登记Mapper接口
 *
 * @author ruoyi
 * @date 2023-01-07
 */
@Mapper
public interface SchoolAssetsMapper extends BaseMapper<SchoolAssets>
{
    Boolean addAssets(@Param("id") Long id, @Param("number")Integer number);

    Boolean reduceAssets(@Param("id")Long id, @Param("number")Integer number);

    Boolean updateInAssets(@Param("id")Long id, @Param("oldNum")Integer oldNum, @Param("newNum")Integer newNum);

    Boolean updateOutAssets(@Param("id")Long id, @Param("oldNum")Integer oldNum, @Param("newNum")Integer newNum);

    List<AssetsVo> queryList(SchoolAssets schoolAssets);
}
