From bc15ee053d6f3b1db025c3f9a5e522a576baeba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Sun, 12 Jun 2022 23:33:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=A1=B9=E7=9B=AE=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E4=B9=8B=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oms/controller/app/CartController.java | 2 +- .../mall/oms/pojo/query/OrderPageQuery.java | 2 +- .../youlai/mall/oms/pojo/vo/OrderPageVO.java | 2 +- .../oms/service/impl/CartServiceImpl.java | 5 +- .../oms/service/impl/OrderLogServiceImpl.java | 2 +- .../oms/service/impl/OrderServiceImpl.java | 2 +- .../mall/pms/pojo/dto/CheckPriceDTO.java | 2 +- .../youlai/mall/pms/pojo/dto/SkuInfoDTO.java | 2 +- .../mall/pms/pojo/dto/admin/GoodsFormDTO.java | 2 +- .../youlai/mall/pms/pojo/entity/PmsSpu.java | 2 +- .../mall/pms/pojo/vo/PmsGoodsDetailVO.java | 2 +- .../mall/pms/service/IPmsCategoryService.java | 4 +- .../service/impl/PmsAttributeServiceImpl.java | 2 +- .../pms/service/impl/PmsSpuServiceImpl.java | 2 +- .../service/impl/PmsSpuServiceImplTest.java | 2 +- .../controller/admin/SmsCouponController.java | 7 +- .../youlai/mall/ums/dto/MemberAddressDTO.java | 2 +- .../ums/controller/app/MemberController.java | 2 +- .../mall/ums/pojo/form/AddressForm.java | 2 - .../service/impl/UmsAddressServiceImpl.java | 2 +- .../service/impl/UmsMemberServiceImpl.java | 5 +- pom.xml | 19 +-- youlai-admin/admin-boot/pom.xml | 7 -- .../cache/InitPermissionRolesCache.java | 2 +- .../admin/controller/SysDeptController.java | 37 ++---- .../controller/SysDictItemController.java | 32 ++--- .../controller/SysDictTypeController.java | 8 +- .../admin/controller/SysMenuController.java | 53 ++++----- .../controller/SysOauthClientController.java | 64 ++++------ .../controller/SysPermissionController.java | 9 +- .../admin/controller/SysRoleController.java | 2 +- .../admin/controller/SysUserController.java | 71 ++++------- .../youlai/admin/convert/ClientConvert.java | 20 ++++ .../com/youlai/admin/convert/UserConvert.java | 11 +- .../handler/DefaultBlockExceptionHandler.java | 2 +- .../handler/UserBlockHandler.java | 2 +- .../listener/excel/UserImportListener.java | 2 +- .../rabbitmq}/CanalListener.java | 5 +- .../admin/mapper/SysPermissionMapper.java | 2 +- .../com/youlai/admin/pojo/entity/SysMenu.java | 2 +- .../admin/pojo/entity/SysOauthClient.java | 48 ++++++-- .../com/youlai/admin/pojo/entity/SysUser.java | 2 +- .../com/youlai/admin/pojo/form/UserForm.java | 12 +- .../java/com/youlai/admin/pojo/po/UserPO.java | 2 +- .../admin/pojo/query/ClientPageQuery.java | 14 +++ .../youlai/admin/pojo/query/DeptQuery.java | 24 ++++ .../admin/pojo/vo/client/ClientPageVO.java | 64 ++++++++++ .../admin/pojo/vo/dict/DictItemPageVO.java | 2 +- .../vo/menu/{TableMenuVO.java => MenuVO.java} | 4 +- .../vo/user/{UserPageVO.java => UserVO.java} | 4 +- .../youlai/admin/service/SysDeptService.java | 7 +- .../admin/service/SysDictItemService.java | 13 ++- .../admin/service/SysDictTypeService.java | 2 +- .../youlai/admin/service/SysMenuService.java | 17 ++- .../admin/service/SysOauthClientService.java | 19 +++ .../admin/service/SysPermissionService.java | 2 +- .../youlai/admin/service/SysUserService.java | 7 +- .../service/impl/SysDeptServiceImpl.java | 29 ++--- .../service/impl/SysDictItemServiceImpl.java | 34 +++++- .../impl/SysDictTypeTypeServiceImpl.java | 2 +- .../service/impl/SysMenuServiceImpl.java | 58 ++++++--- .../impl/SysOauthClientServiceImpl.java | 40 ++++++- .../impl/SysPermissionServiceImpl.java | 4 +- .../service/impl/SysUserServiceImpl.java | 110 ++++++++++-------- .../resources/mapper/SysPermissionMapper.xml | 2 +- .../main/resources/mapper/SysUserMapper.xml | 6 +- .../auth/controller/AuthController.java | 4 +- .../ClientDetailsServiceImpl.java | 6 +- .../core/userdetails/user/SysUserDetails.java | 4 +- .../user/SysUserDetailsServiceImpl.java | 6 +- .../PreAuthenticatedUserDetailsService.java | 2 +- .../common/constant/SystemConstants.java | 2 +- .../com/youlai}/common/enums/GenderEnum.java | 2 +- .../youlai}/common/enums/MenuTypeEnum.java | 2 +- .../handler/MyDataPermissionHandler.java | 4 +- ...{RabbitConfig.java => RabbitMQConfig.java} | 2 +- .../main/resources/META-INF/spring.factories | 2 +- youlai-common/common-web/pom.xml | 3 +- .../common/web/config/WebMvcConfig.java | 24 +++- .../common/web/domain}/CanalMessage.java | 2 +- .../com/youlai/common/web/domain/Option.java | 2 +- .../web/exception/GlobalExceptionHandler.java | 69 +++++------ .../common/web/{util => utils}/JwtUtils.java | 2 +- .../web/{util => utils}/MemberUtils.java | 4 +- .../web/{util => utils}/RequestUtils.java | 2 +- .../common/web/{util => utils}/UserUtils.java | 2 +- .../gateway/filter/GatewayLogFilter.java | 1 - 87 files changed, 658 insertions(+), 422 deletions(-) rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/{component => }/cache/InitPermissionRolesCache.java (92%) create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/convert/ClientConvert.java rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/{component => }/handler/DefaultBlockExceptionHandler.java (97%) rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/{component => }/handler/UserBlockHandler.java (94%) rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/{component => }/listener/excel/UserImportListener.java (92%) rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/{component/listener => listener/rabbitmq}/CanalListener.java (94%) create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/query/ClientPageQuery.java create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/query/DeptQuery.java create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/vo/client/ClientPageVO.java rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/vo/menu/{TableMenuVO.java => MenuVO.java} (87%) rename youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/vo/user/{UserPageVO.java => UserVO.java} (95%) rename {youlai-admin/admin-boot/src/main/java/com/youlai/admin => youlai-common/common-core/src/main/java/com/youlai}/common/constant/SystemConstants.java (90%) rename {youlai-admin/admin-boot/src/main/java/com/youlai/admin => youlai-common/common-core/src/main/java/com/youlai}/common/enums/GenderEnum.java (93%) rename {youlai-admin/admin-boot/src/main/java/com/youlai/admin => youlai-common/common-core/src/main/java/com/youlai}/common/enums/MenuTypeEnum.java (94%) rename youlai-common/common-rabbitmq/src/main/java/com/youlai/common/rabbitmq/config/{RabbitConfig.java => RabbitMQConfig.java} (98%) rename youlai-common/{common-core/src/main/java/com/youlai/common/dto => common-web/src/main/java/com/youlai/common/web/domain}/CanalMessage.java (95%) rename youlai-common/common-web/src/main/java/com/youlai/common/web/{util => utils}/JwtUtils.java (96%) rename youlai-common/common-web/src/main/java/com/youlai/common/web/{util => utils}/MemberUtils.java (88%) rename youlai-common/common-web/src/main/java/com/youlai/common/web/{util => utils}/RequestUtils.java (98%) rename youlai-common/common-web/src/main/java/com/youlai/common/web/{util => utils}/UserUtils.java (98%) diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/app/CartController.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/app/CartController.java index ce51edd6b..064264d76 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/app/CartController.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/app/CartController.java @@ -2,7 +2,7 @@ package com.youlai.mall.oms.controller.app; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.youlai.common.result.Result; -import com.youlai.common.web.util.MemberUtils; +import com.youlai.common.web.utils.MemberUtils; import com.youlai.mall.oms.pojo.dto.CartItemDTO; import com.youlai.mall.oms.service.ICartService; import io.swagger.annotations.Api; diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/query/OrderPageQuery.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/query/OrderPageQuery.java index f273eafa4..a433244b4 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/query/OrderPageQuery.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/query/OrderPageQuery.java @@ -7,7 +7,7 @@ import lombok.Data; /** - * @author haoxr + * @author haoxr * @date 2022/2/1 19:14 */ @Data diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/vo/OrderPageVO.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/vo/OrderPageVO.java index 141246f39..fa94b2397 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/vo/OrderPageVO.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/pojo/vo/OrderPageVO.java @@ -8,7 +8,7 @@ import java.util.List; /** * 订单分页视图对象 * - * @author haoxr + * @author haoxr * @date 2022/2/1 20:58 */ @Data diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java index c0dc171b5..1cc9547ad 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java @@ -4,8 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.lang.Assert; import com.youlai.common.result.ResultCode; import com.youlai.common.web.exception.BizException; -import com.youlai.common.web.util.JwtUtils; -import com.youlai.common.web.util.MemberUtils; +import com.youlai.common.web.utils.MemberUtils; import com.youlai.mall.oms.constant.OmsConstants; import com.youlai.mall.oms.pojo.dto.CartItemDTO; import com.youlai.mall.oms.service.ICartService; @@ -13,8 +12,6 @@ import com.youlai.mall.pms.api.SkuFeignClient; import com.youlai.mall.pms.pojo.dto.SkuInfoDTO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.beanutils.BeanUtilsBean; -import org.springframework.beans.factory.BeanFactory; import org.springframework.data.redis.core.BoundHashOperations; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderLogServiceImpl.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderLogServiceImpl.java index ac9a482bb..81f7b3dd7 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderLogServiceImpl.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderLogServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.mall.oms.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.common.web.util.MemberUtils; +import com.youlai.common.web.utils.MemberUtils; import com.youlai.mall.oms.mapper.OrderLogMapper; import com.youlai.mall.oms.pojo.entity.OmsOrderLog; import com.youlai.mall.oms.service.IOrderLogService; diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderServiceImpl.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderServiceImpl.java index 21ff46a81..9227a9500 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderServiceImpl.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/OrderServiceImpl.java @@ -25,7 +25,7 @@ import com.youlai.common.enums.BusinessTypeEnum; import com.youlai.common.redis.BusinessNoGenerator; import com.youlai.common.result.Result; import com.youlai.common.web.exception.BizException; -import com.youlai.common.web.util.MemberUtils; +import com.youlai.common.web.utils.MemberUtils; import com.youlai.mall.oms.config.WxPayProperties; import com.youlai.mall.oms.dto.OrderInfoDTO; import com.youlai.mall.oms.enums.OrderStatusEnum; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/CheckPriceDTO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/CheckPriceDTO.java index e097f6d65..83542dafb 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/CheckPriceDTO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/CheckPriceDTO.java @@ -7,7 +7,7 @@ import java.util.List; /** * 商品验价传输层实体 * - * @author haoxr + * @author haoxr * @date 2022/2/7 22:52 */ @Data diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java index d2fa39507..6170600a6 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java @@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** - * @author haoxr + * @author haoxr * @date 2022/2/5 23:09 */ diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/admin/GoodsFormDTO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/admin/GoodsFormDTO.java index fbb1e3054..f2fcdc912 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/admin/GoodsFormDTO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/admin/GoodsFormDTO.java @@ -5,7 +5,7 @@ import lombok.Data; import java.util.List; /** - * @author haoxr + * @author haoxr */ @Data public class GoodsFormDTO { diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/entity/PmsSpu.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/entity/PmsSpu.java index 0ca2a0de5..a37b13714 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/entity/PmsSpu.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/entity/PmsSpu.java @@ -9,7 +9,7 @@ import lombok.experimental.Accessors; import java.util.List; /** - * @author haoxr + * @author haoxr */ @Data @Accessors(chain = true) diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/pojo/vo/PmsGoodsDetailVO.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/pojo/vo/PmsGoodsDetailVO.java index 0ce38d8ea..273913586 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/pojo/vo/PmsGoodsDetailVO.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/pojo/vo/PmsGoodsDetailVO.java @@ -11,7 +11,7 @@ import java.util.List; /** * 商品详情视图对象 * - * @author haoxr + * @author haoxr * @date 2022/3/13 */ @Data diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java index 8ca9aeede..4cdea8cf5 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java @@ -1,7 +1,7 @@ package com.youlai.mall.pms.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.common.web.vo.OptionVO; +import com.youlai.common.web.domain.Option; import com.youlai.mall.pms.pojo.entity.PmsCategory; import com.youlai.mall.pms.pojo.vo.CategoryVO; @@ -28,7 +28,7 @@ public interface IPmsCategoryService extends IService { * 分类列表(级联) * @return */ - List listCascadeCategories(); + List