package cn.iocoder.yudao.module.infra.dal.mysql.file;

import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileContentDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface FileContentMapper extends BaseMapper<FileContentDO> {

    default void updateOneContent(String path, byte[] content) {
        //path地址是唯一的
        update(new FileContentDO().setContent(content),
                new LambdaQueryWrapperX<FileContentDO>().eq(FileContentDO::getPath,path));
    }

}
