package me.liaowei.mangdie.dao;

import me.liaowei.mangdie.model.Category;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CategoryMapper {
    int deleteByPrimaryKey(Long categoryId);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Long categoryId);

    List<Category> getCategoryAll();

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    int saveCategoryPic(@Param("pictureName") String pictureName, @Param("pictureHash") String pictureHash, @Param("pictureKey") String pictureKey, @Param("pictureUrl") String pictureUrl, @Param("categoryId") Long categoryId);

    int updateCategory(Category record);

    int updateCategoryPic(@Param("pictureId") Long pictureId, @Param("pictureName") String pictureName, @Param("pictureHash") String pictureHash, @Param("pictureKey") String pictureKey, @Param("pictureUrl") String pictureUrl, @Param("categoryId") Long categoryId, @Param("gmtModified") Date gmtModified);

    int updateCategoryAllowComment(@Param("categoryId") Long categoryId, @Param("allowComment") Byte allowComment, @Param("gmtModified") Date gmtModified);

    int categoryUpdateFlag(@Param("categoryId") Long categoryId, @Param("categoryFlag") Byte categoryFlag, @Param("gmtModified") Date date);

    List<Category> getCategoryAll2();
}