From 9f9cc51bbe1542a741ce710ef4201e50599768ff Mon Sep 17 00:00:00 2001 From: itao Date: Sun, 7 Jan 2024 22:17:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20common=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/{com/luoo/common => }/exception/BizException.java | 2 +- .../src/main/java/{com/luoo/common => }/util/AssertUtil.java | 4 ++-- .../main/java/{com/luoo/common => }/util/CollectionUtil.java | 2 +- .../java/com/luoo/tag/controller/BaseExceptionHandler.java | 2 +- .../src/main/java/com/luoo/tag/controller/TagController.java | 3 ++- luoo_tag/src/main/java/com/luoo/tag/pojo/TagDTO.java | 2 +- luoo_tag/src/main/java/com/luoo/tag/service/TagService.java | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) rename luoo_common/src/main/java/{com/luoo/common => }/exception/BizException.java (92%) rename luoo_common/src/main/java/{com/luoo/common => }/util/AssertUtil.java (98%) rename luoo_common/src/main/java/{com/luoo/common => }/util/CollectionUtil.java (99%) diff --git a/luoo_common/src/main/java/com/luoo/common/exception/BizException.java b/luoo_common/src/main/java/exception/BizException.java similarity index 92% rename from luoo_common/src/main/java/com/luoo/common/exception/BizException.java rename to luoo_common/src/main/java/exception/BizException.java index 486ed81..dc3c773 100644 --- a/luoo_common/src/main/java/com/luoo/common/exception/BizException.java +++ b/luoo_common/src/main/java/exception/BizException.java @@ -1,4 +1,4 @@ -package com.luoo.common.exception; +package exception; public class BizException extends RuntimeException { private static final long serialVersionUID = 2466145171145432619L; diff --git a/luoo_common/src/main/java/com/luoo/common/util/AssertUtil.java b/luoo_common/src/main/java/util/AssertUtil.java similarity index 98% rename from luoo_common/src/main/java/com/luoo/common/util/AssertUtil.java rename to luoo_common/src/main/java/util/AssertUtil.java index cf1926c..3dd426c 100644 --- a/luoo_common/src/main/java/com/luoo/common/util/AssertUtil.java +++ b/luoo_common/src/main/java/util/AssertUtil.java @@ -1,6 +1,6 @@ -package com.luoo.common.util; +package util; -import com.luoo.common.exception.BizException; +import exception.BizException; import org.apache.commons.lang3.StringUtils; import java.util.Arrays; diff --git a/luoo_common/src/main/java/com/luoo/common/util/CollectionUtil.java b/luoo_common/src/main/java/util/CollectionUtil.java similarity index 99% rename from luoo_common/src/main/java/com/luoo/common/util/CollectionUtil.java rename to luoo_common/src/main/java/util/CollectionUtil.java index 1e93ee4..f163ef1 100644 --- a/luoo_common/src/main/java/com/luoo/common/util/CollectionUtil.java +++ b/luoo_common/src/main/java/util/CollectionUtil.java @@ -1,4 +1,4 @@ -package com.luoo.common.util; +package util; import java.math.BigDecimal; import java.util.Collection; diff --git a/luoo_tag/src/main/java/com/luoo/tag/controller/BaseExceptionHandler.java b/luoo_tag/src/main/java/com/luoo/tag/controller/BaseExceptionHandler.java index e0e0ebb..d44a6fc 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/controller/BaseExceptionHandler.java +++ b/luoo_tag/src/main/java/com/luoo/tag/controller/BaseExceptionHandler.java @@ -1,6 +1,6 @@ package com.luoo.tag.controller; -import com.luoo.common.exception.BizException; +import exception.BizException; import entity.Result; import entity.StatusCode; import lombok.extern.slf4j.Slf4j; diff --git a/luoo_tag/src/main/java/com/luoo/tag/controller/TagController.java b/luoo_tag/src/main/java/com/luoo/tag/controller/TagController.java index 291530c..e85f152 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/controller/TagController.java +++ b/luoo_tag/src/main/java/com/luoo/tag/controller/TagController.java @@ -40,7 +40,8 @@ public class TagController { ) @GetMapping("/list") public ResultVO> getById(@Validated @RequestBody TagQueryReq queryReq, - @RequestParam int pageNum, @RequestParam int pageSize){ + @RequestParam int pageNum, + @RequestParam int pageSize){ return ResultVO.success(tagService.queryPage(queryReq, pageNum, pageSize)); } diff --git a/luoo_tag/src/main/java/com/luoo/tag/pojo/TagDTO.java b/luoo_tag/src/main/java/com/luoo/tag/pojo/TagDTO.java index d73716d..cb6a691 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/pojo/TagDTO.java +++ b/luoo_tag/src/main/java/com/luoo/tag/pojo/TagDTO.java @@ -33,7 +33,7 @@ public class TagDTO implements Serializable { @Schema(description = "子标签数量") private Long childTagCount = 0L; - @Schema(description = "关联文章数量") + @Schema(description = "关联期刊数量TODO") private Long articleRefCount = 0L; @Schema(description = "关联歌曲数量") diff --git a/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java b/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java index de64467..2040a11 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java +++ b/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java @@ -1,7 +1,7 @@ package com.luoo.tag.service; import com.google.common.collect.Lists; -import com.luoo.common.util.AssertUtil; +import util.AssertUtil; import com.luoo.tag.dao.TagDao; import com.luoo.tag.pojo.*; import lombok.RequiredArgsConstructor;