diff --git a/pom.xml b/pom.xml index 2227b0297..fe8f50c8f 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,6 @@ common mall-dependencies user-service-project - user-web-app system-service-project pay-service-project management-web-app diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.http b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.http similarity index 70% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.http rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.http index 47fdbf217..5af6ff1bb 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.http +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.http @@ -1,17 +1,17 @@ ### /passport/login-by-sms 成功 -POST {{user-api-base-url}}/passport/login-by-sms +POST {{shop-api-base-url}}/passport/login-by-sms Content-Type: application/x-www-form-urlencoded mobile=15601691300&code=9999 ### /passport/send-sms-code 成功 -POST {{user-api-base-url}}/passport/send-sms-code +POST {{shop-api-base-url}}/passport/send-sms-code Content-Type: application/x-www-form-urlencoded mobile=15601691300&scene=1 ### /passport/refresh-token -POST {{user-api-base-url}}/passport/refresh-token +POST {{shop-api-base-url}}/passport/refresh-token Content-Type: application/x-www-form-urlencoded refreshToken=77abd74e84e34cfc8aba9625317a14a3 diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.java similarity index 81% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.java index 168b520da..42079e601 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/PassportController.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/PassportController.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.userweb.controller.passport; +package cn.iocoder.mall.shopweb.controller.user; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportLoginBySmsReqVO; -import cn.iocoder.mall.userweb.controller.passport.vo.UserPassportSendSmsRespVO; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO; -import cn.iocoder.mall.userweb.manager.passport.PassportManager; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportAccessTokenRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportLoginBySmsReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportSendSmsRespVO; +import cn.iocoder.mall.shopweb.service.user.PassportManager; import cn.iocoder.security.annotations.RequiresNone; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -38,7 +38,7 @@ public class PassportController { @PostMapping("/send-sms-code") @ApiOperation("发送手机验证码") @RequiresNone - public CommonResult sendSmsCode(UserPassportSendSmsRespVO sendSmsCodeDTO, + public CommonResult sendSmsCode(PassportSendSmsRespVO sendSmsCodeDTO, HttpServletRequest request) { passportManager.sendSmsCode(sendSmsCodeDTO, HttpUtil.getIp(request)); // 返回成功 diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/AddressController.http b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.http similarity index 62% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/AddressController.http rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.http index 440a895ef..95d9d04ec 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/AddressController.http +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.http @@ -1,5 +1,5 @@ ### /user-address/get-default 成功 -GET {{user-api-base-url}}/user-address/get-default +GET {{shop-api-base-url}}/user-address/get-default Authorization: Bearer {{user-access-token}} ### diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/UserAddressController.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.java similarity index 89% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/UserAddressController.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.java index f1ec7ab71..d338feacf 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/UserAddressController.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserAddressController.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.userweb.controller.address; +package cn.iocoder.mall.shopweb.controller.user; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressCreateReqVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressRespVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressUpdateReqVO; -import cn.iocoder.mall.userweb.manager.address.UserAddressManager; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressCreateReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressUpdateReqVO; +import cn.iocoder.mall.shopweb.service.user.UserAddressManager; import cn.iocoder.security.annotations.RequiresPermissions; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/UserController.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserController.java similarity index 91% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/UserController.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserController.java index a08cbaa51..8dc433aa8 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/UserController.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/UserController.java @@ -1,9 +1,9 @@ -package cn.iocoder.mall.userweb.controller.user; +package cn.iocoder.mall.shopweb.controller.user; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder; -import cn.iocoder.mall.userweb.controller.user.vo.UserRespVO; -import cn.iocoder.mall.userweb.manager.user.UserManager; +import cn.iocoder.mall.shopweb.controller.user.vo.user.UserRespVO; +import cn.iocoder.mall.shopweb.service.user.UserManager; import cn.iocoder.security.annotations.RequiresAuthenticate; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressCreateReqVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressCreateReqVO.java similarity index 95% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressCreateReqVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressCreateReqVO.java index 51aa8f303..bf510bc28 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressCreateReqVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.address.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.address; import cn.iocoder.common.framework.validator.InEnum; import cn.iocoder.mall.userservice.enums.address.UserAddressType; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressRespVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressRespVO.java similarity index 95% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressRespVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressRespVO.java index 6a1681409..26b22d313 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressRespVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.address.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.address; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressUpdateReqVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressUpdateReqVO.java similarity index 96% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressUpdateReqVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressUpdateReqVO.java index 853754632..6fdd23c9c 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/address/vo/UserAddressUpdateReqVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/address/UserAddressUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.address.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.address; import cn.iocoder.common.framework.validator.InEnum; import cn.iocoder.mall.userservice.enums.address.UserAddressType; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportAccessTokenRespVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportAccessTokenRespVO.java similarity index 91% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportAccessTokenRespVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportAccessTokenRespVO.java index 089ca602c..cb7099088 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportAccessTokenRespVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportAccessTokenRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.passport.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.passport; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportLoginBySmsReqVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportLoginBySmsReqVO.java similarity index 94% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportLoginBySmsReqVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportLoginBySmsReqVO.java index ae16d6519..270fc3fd3 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/PassportLoginBySmsReqVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportLoginBySmsReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.passport.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.passport; import cn.iocoder.common.framework.validator.Mobile; import io.swagger.annotations.ApiModel; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/UserPassportSendSmsRespVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportSendSmsRespVO.java similarity index 86% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/UserPassportSendSmsRespVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportSendSmsRespVO.java index e656b35a1..b4fd44483 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/passport/vo/UserPassportSendSmsRespVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/passport/PassportSendSmsRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.passport.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.passport; import cn.iocoder.common.framework.validator.Mobile; import io.swagger.annotations.ApiModel; @@ -11,7 +11,7 @@ import javax.validation.constraints.NotNull; @ApiModel("发送手机验证码 Response VO") @Data @Accessors(chain = true) -public class UserPassportSendSmsRespVO { +public class PassportSendSmsRespVO { @ApiModelProperty(value = "手机号", example = "15601691234") @Mobile diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/vo/UserRespVO.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/user/UserRespVO.java similarity index 92% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/vo/UserRespVO.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/user/UserRespVO.java index 719b18920..1b341e44d 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/controller/user/vo/UserRespVO.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/controller/user/vo/user/UserRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.userweb.controller.user.vo; +package cn.iocoder.mall.shopweb.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/passport/PassportConvert.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/PassportConvert.java similarity index 65% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/passport/PassportConvert.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/PassportConvert.java index 39e0cbcc3..3089aa626 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/passport/PassportConvert.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/PassportConvert.java @@ -1,12 +1,12 @@ -package cn.iocoder.mall.userweb.convert.passport; +package cn.iocoder.mall.shopweb.convert.user; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportAccessTokenRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportLoginBySmsReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportSendSmsRespVO; import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2AccessTokenRespDTO; import cn.iocoder.mall.userservice.rpc.sms.dto.UserSendSmsCodeReqDTO; import cn.iocoder.mall.userservice.rpc.sms.dto.UserVerifySmsCodeReqDTO; import cn.iocoder.mall.userservice.rpc.user.dto.UserCreateReqDTO; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportLoginBySmsReqVO; -import cn.iocoder.mall.userweb.controller.passport.vo.UserPassportSendSmsRespVO; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -18,7 +18,7 @@ public interface PassportConvert { UserVerifySmsCodeReqDTO convert(PassportLoginBySmsReqVO bean); UserCreateReqDTO convert02(PassportLoginBySmsReqVO bean); - UserSendSmsCodeReqDTO convert(UserPassportSendSmsRespVO bean); + UserSendSmsCodeReqDTO convert(PassportSendSmsRespVO bean); PassportAccessTokenRespVO convert(OAuth2AccessTokenRespDTO bean); diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/address/UserAddressConvert.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserAddressConvert.java similarity index 71% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/address/UserAddressConvert.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserAddressConvert.java index a22e4dd60..ec14dee81 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/address/UserAddressConvert.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserAddressConvert.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.userweb.convert.address; +package cn.iocoder.mall.shopweb.convert.user; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressCreateReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressUpdateReqVO; import cn.iocoder.mall.userservice.rpc.address.dto.UserAddressCreateReqDTO; import cn.iocoder.mall.userservice.rpc.address.dto.UserAddressRespDTO; import cn.iocoder.mall.userservice.rpc.address.dto.UserAddressUpdateReqDTO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressCreateReqVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressRespVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressUpdateReqVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/user/UserConvert.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserConvert.java similarity index 71% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/user/UserConvert.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserConvert.java index 375faa22c..59956d49e 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/convert/user/UserConvert.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/convert/user/UserConvert.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.userweb.convert.user; +package cn.iocoder.mall.shopweb.convert.user; +import cn.iocoder.mall.shopweb.controller.user.vo.user.UserRespVO; import cn.iocoder.mall.userservice.rpc.user.dto.UserRespDTO; -import cn.iocoder.mall.userweb.controller.user.vo.UserRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/passport/PassportManager.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/PassportManager.java similarity index 86% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/passport/PassportManager.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/PassportManager.java index 4f6264c5d..3e261067b 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/passport/PassportManager.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/PassportManager.java @@ -1,7 +1,11 @@ -package cn.iocoder.mall.userweb.manager.passport; +package cn.iocoder.mall.shopweb.service.user; import cn.iocoder.common.framework.enums.UserTypeEnum; import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportAccessTokenRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportLoginBySmsReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.passport.PassportSendSmsRespVO; +import cn.iocoder.mall.shopweb.convert.user.PassportConvert; import cn.iocoder.mall.systemservice.rpc.oauth.OAuth2Rpc; import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2AccessTokenRespDTO; import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2CreateAccessTokenReqDTO; @@ -10,10 +14,6 @@ import cn.iocoder.mall.userservice.enums.sms.UserSmsSceneEnum; import cn.iocoder.mall.userservice.rpc.sms.UserSmsCodeRpc; import cn.iocoder.mall.userservice.rpc.user.UserRpc; import cn.iocoder.mall.userservice.rpc.user.dto.UserRespDTO; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportAccessTokenRespVO; -import cn.iocoder.mall.userweb.controller.passport.vo.PassportLoginBySmsReqVO; -import cn.iocoder.mall.userweb.controller.passport.vo.UserPassportSendSmsRespVO; -import cn.iocoder.mall.userweb.convert.passport.PassportConvert; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.stereotype.Service; @@ -45,7 +45,7 @@ public class PassportManager { return PassportConvert.INSTANCE.convert(createAccessTokenResult.getData()); } - public void sendSmsCode(UserPassportSendSmsRespVO sendSmsCodeDTO, String ip) { + public void sendSmsCode(PassportSendSmsRespVO sendSmsCodeDTO, String ip) { CommonResult sendSmsCodeResult = userSmsCodeRpc.sendSmsCode( PassportConvert.INSTANCE.convert(sendSmsCodeDTO).setIp(ip)); sendSmsCodeResult.checkError(); diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/address/UserAddressManager.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserAddressManager.java similarity index 92% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/address/UserAddressManager.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserAddressManager.java index 940bd1c76..eaae4d863 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/address/UserAddressManager.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserAddressManager.java @@ -1,15 +1,15 @@ -package cn.iocoder.mall.userweb.manager.address; +package cn.iocoder.mall.shopweb.service.user; import cn.iocoder.common.framework.exception.GlobalException; import cn.iocoder.common.framework.util.CollectionUtils; import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressCreateReqVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressRespVO; +import cn.iocoder.mall.shopweb.controller.user.vo.address.UserAddressUpdateReqVO; +import cn.iocoder.mall.shopweb.convert.user.UserAddressConvert; import cn.iocoder.mall.userservice.enums.address.UserAddressType; import cn.iocoder.mall.userservice.rpc.address.UserAddressRpc; import cn.iocoder.mall.userservice.rpc.address.dto.UserAddressRespDTO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressCreateReqVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressRespVO; -import cn.iocoder.mall.userweb.controller.address.vo.UserAddressUpdateReqVO; -import cn.iocoder.mall.userweb.convert.address.UserAddressConvert; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.stereotype.Service; diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/user/UserManager.java b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserManager.java similarity index 87% rename from user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/user/UserManager.java rename to shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserManager.java index c0dbed600..3ab303e48 100644 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/manager/user/UserManager.java +++ b/shop-web-app/src/main/java/cn/iocoder/mall/shopweb/service/user/UserManager.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.userweb.manager.user; +package cn.iocoder.mall.shopweb.service.user; import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.mall.shopweb.controller.user.vo.user.UserRespVO; +import cn.iocoder.mall.shopweb.convert.user.UserConvert; import cn.iocoder.mall.userservice.rpc.user.UserRpc; import cn.iocoder.mall.userservice.rpc.user.dto.UserRespDTO; import cn.iocoder.mall.userservice.rpc.user.dto.UserUpdateReqDTO; -import cn.iocoder.mall.userweb.controller.user.vo.UserRespVO; -import cn.iocoder.mall.userweb.convert.user.UserConvert; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.stereotype.Service; diff --git a/shop-web-app/src/main/resources/application.yml b/shop-web-app/src/main/resources/application.yml index f0e3ccae1..cba54393c 100644 --- a/shop-web-app/src/main/resources/application.yml +++ b/shop-web-app/src/main/resources/application.yml @@ -57,6 +57,10 @@ dubbo: version: 1.0.0 PayTransactionRpc: version: 1.0.0 + UserSmsCodeRpc: + version: 1.0.0 + UserAddressRpc: + version: 1.0.0 # Swagger 配置项 swagger: diff --git a/user-web-app/pom.xml b/user-web-app/pom.xml deleted file mode 100644 index 75933cdfe..000000000 --- a/user-web-app/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - onemall - cn.iocoder.mall - 1.0-SNAPSHOT - - 4.0.0 - - user-web-app - - - - - - cn.iocoder.mall - mall-dependencies - 1.0-SNAPSHOT - pom - import - - - - - - - - cn.iocoder.mall - mall-spring-boot-starter-web - - - - cn.iocoder.mall - mall-spring-boot-starter-swagger - - - - cn.iocoder.mall - mall-spring-boot-starter-security-user - - - - - cn.iocoder.mall - mall-spring-boot-starter-dubbo - - - - - cn.iocoder.mall - user-service-api - 1.0-SNAPSHOT - - - - cn.iocoder.mall - product-service-api - 1.0-SNAPSHOT - - - - cn.iocoder.mall - system-service-api - 1.0-SNAPSHOT - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - - org.projectlombok - lombok - - - - org.mapstruct - mapstruct - - - org.mapstruct - mapstruct-jdk8 - - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/user-web-app/src/main/java/cn/iocoder/mall/userweb/UserWebApplication.java b/user-web-app/src/main/java/cn/iocoder/mall/userweb/UserWebApplication.java deleted file mode 100644 index 43c1de6a8..000000000 --- a/user-web-app/src/main/java/cn/iocoder/mall/userweb/UserWebApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package cn.iocoder.mall.userweb; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class UserWebApplication { - - public static void main(String[] args) { - SpringApplication.run(UserWebApplication.class, args); - } - -} diff --git a/user-web-app/src/main/resources/application-dev.yml b/user-web-app/src/main/resources/application-dev.yml deleted file mode 100644 index 2e26cd388..000000000 --- a/user-web-app/src/main/resources/application-dev.yml +++ /dev/null @@ -1,15 +0,0 @@ -spring: - # Spring Cloud 配置项 - cloud: - nacos: - # Spring Cloud Nacos Discovery 配置项 - discovery: - server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址 - namespace: dev # Nacos 命名空间 - -# Dubbo 配置项 -dubbo: - # Dubbo 注册中心 - registry: - # address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 - address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址 diff --git a/user-web-app/src/main/resources/application-local.yml b/user-web-app/src/main/resources/application-local.yml deleted file mode 100644 index 2e26cd388..000000000 --- a/user-web-app/src/main/resources/application-local.yml +++ /dev/null @@ -1,15 +0,0 @@ -spring: - # Spring Cloud 配置项 - cloud: - nacos: - # Spring Cloud Nacos Discovery 配置项 - discovery: - server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址 - namespace: dev # Nacos 命名空间 - -# Dubbo 配置项 -dubbo: - # Dubbo 注册中心 - registry: - # address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 - address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址 diff --git a/user-web-app/src/main/resources/application.yml b/user-web-app/src/main/resources/application.yml deleted file mode 100644 index 65be706f6..000000000 --- a/user-web-app/src/main/resources/application.yml +++ /dev/null @@ -1,52 +0,0 @@ -# 服务器的配置项 -server: - port: 18082 - servlet: - context-path: /user-api/ - -spring: - # Application 的配置项 - application: - name: user-web - # Profile 的配置项 - profiles: - active: local - # SpringMVC 配置项 - mvc: - throw-exception-if-no-handler-found: true # 匹配不到路径时,抛出 NoHandlerFoundException 异常 - static-path-pattern: /doc.html # 静态资源的路径 - -# Dubbo 配置项 -dubbo: - # Spring Cloud Alibaba Dubbo 专属配置 - cloud: - subscribed-services: 'user-service,system-service' # 设置订阅的应用列表,默认为 * 订阅所有应用 - # Dubbo 服务消费者的配置 - consumer: - timeout: 10000 - validation: true # 开启 Consumer 的参数校验 - check: false # 本地启动,不进行校验,不一定会使用到未启动的服务,嘿嘿~ - UserSmsCodeRpc: - version: 1.0.0 - UserRpc: - version: 1.0.0 - OAuth2Rpc: - version: 1.0.0 - SystemAccessLogRpc: - version: 1.0.0 - SystemExceptionLogRpc: - version: 1.0.0 - UserAddressRpc: - version: 1.0.0 - -# Swagger 配置项 -swagger: - title: 用户中心 - description: 提供用户注册、登陆、信息等等 API - version: 1.0.0 - base-package: cn.iocoder.mall.userweb.controller - -# Actuator 监控配置项 -management: - server.port: 38086 # 独立端口,避免被暴露出去 - endpoints.web.exposure.include: '*' # 暴露所有监控端点