mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
fix: 文件夹改用 snowflake id
This commit is contained in:
parent
58b62c4ff1
commit
3873322b83
@ -20,6 +20,7 @@ import com.blossom.common.base.exception.XzException400;
|
||||
import com.blossom.common.base.exception.XzException404;
|
||||
import com.blossom.common.base.exception.XzException500;
|
||||
import com.blossom.common.base.util.DateUtils;
|
||||
import com.blossom.common.base.util.PrimaryKeyUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -178,6 +179,7 @@ public class FolderService extends ServiceImpl<FolderMapper, FolderEntity> {
|
||||
folder.setStorePath(parentFolder.getStorePath());
|
||||
}
|
||||
}
|
||||
folder.setId(PrimaryKeyUtil.nextId());
|
||||
baseMapper.insert(folder);
|
||||
return folder;
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ public class FolderEntity extends AbstractPOJO implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 父id
|
||||
|
Loading…
Reference in New Issue
Block a user