Skip to content

Commit

Permalink
补充javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
little3201 committed Apr 21, 2021
1 parent 6e5bb28 commit c46119c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
26 changes: 15 additions & 11 deletions src/main/java/top/leafage/common/reactive/ReactiveBasicService.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface ReactiveBasicService<D, V> {
/**
* 获取所有entities
*
* @return List<T>
* @return a flux containing the elements of this list
*/
default Flux<V> retrieve() {
return Flux.empty();
Expand All @@ -19,7 +19,9 @@ default Flux<V> retrieve() {
/**
* 分页获取entities
*
* @return List<T>
* @param page 页码
* @param size 分页大小
* @return a flux containing the elements of this list
*/
default Flux<V> retrieve(int page, int size) {
return Flux.empty();
Expand All @@ -28,7 +30,10 @@ default Flux<V> retrieve(int page, int size) {
/**
* 分页获取排序后的entities
*
* @return List<T>
* @param page 页码
* @param size 分页大小
* @param order 排序字段
* @return a flux containing the elements of this list
*/
default Flux<V> retrieve(int page, int size, String order) {
return Flux.empty();
Expand All @@ -38,7 +43,7 @@ default Flux<V> retrieve(int page, int size, String order) {
* 根据code获取entity
*
* @param code 代码
* @return T
* @return a element instanceof vo
*/
default Mono<V> fetch(String code) {
return Mono.empty();
Expand All @@ -47,7 +52,7 @@ default Mono<V> fetch(String code) {
/**
* 统计记录数
*
* @return T
* @return the count of elements
*/
default Mono<Long> count() {
return Mono.empty();
Expand All @@ -59,24 +64,23 @@ default Mono<Long> count() {
* @param code 代码
*/
default Mono<Void> remove(String code) {
return Mono.empty();
return Mono.empty().then();
}

/**
* 批量删除
*
* @param dList 实例集合
* @return 删除结果
*/
default Mono<Void> removeAll(List<D> dList) {
return Mono.empty();
return Mono.empty().then();
}

/**
* 新增entity
*
* @param d 实例
* @return 保存结果
* @return a element instanceof vo
*/
default Mono<V> create(D d) {
return Mono.empty();
Expand All @@ -87,7 +91,7 @@ default Mono<V> create(D d) {
*
* @param code 代码
* @param d 实例
* @return 保存结果
* @return a element instanceof vo
*/
default Mono<V> modify(String code, D d) {
return Mono.empty();
Expand All @@ -97,7 +101,7 @@ default Mono<V> modify(String code, D d) {
* 批量保存
*
* @param dList 实例集合
* @return 实例类型
* @return a flux containing the elements of this list
*/
default Flux<V> saveAll(List<D> dList) {
return Flux.empty();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/top/leafage/common/servlet/BasicService.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface BasicService<D, V> {
/**
* 查询
*
* @return List<V>
* @return an array containing the elements of this list
*/
default List<V> retrieve() {
return Collections.emptyList();
Expand All @@ -28,7 +28,7 @@ default List<V> retrieve() {
* 根据唯一标识获取
*
* @param code 代码
* @return T
* @return a element instanceof vo
*/
default V fetch(String code) {
return null;
Expand All @@ -54,7 +54,7 @@ default void removeAll(List<D> dList) {
* 添加对象
*
* @param d 入参
* @return T
* @return a element instanceof vo
*/
default V create(D d) {
return null;
Expand All @@ -65,7 +65,7 @@ default V create(D d) {
*
* @param code 唯一标识
* @param d 入参
* @return T
* @return a element instanceof vo
*/
default V modify(String code, D d) {
return null;
Expand All @@ -75,7 +75,7 @@ default V modify(String code, D d) {
* 批量保存
*
* @param dList 实例集合
* @return 实例类型
* @return an array containing the elements of this list
*/
default List<V> saveAll(List<D> dList) {
return Collections.emptyList();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/top/leafage/common/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private FileUtils() {
*
* @param filePath 读取路径
* @param suffix 文件后缀,可传入多类型,逗号分隔
* @return List<File>
* @return an array containing the elements of this list
*/
public static List<File> read(String filePath, String suffix) {
File curPath = new File(filePath);
Expand Down

0 comments on commit c46119c

Please sign in to comment.