├── .idea
├── compiler.xml
├── encodings.xml
├── misc.xml
└── workspace.xml
├── README.MD
├── cart-service
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hmall
│ │ └── cart
│ │ ├── CartApplication.java
│ │ ├── config
│ │ └── CartProPerties.java
│ │ ├── controller
│ │ └── CartController.java
│ │ ├── domain
│ │ ├── dto
│ │ │ └── CartFormDTO.java
│ │ ├── po
│ │ │ └── Cart.java
│ │ └── vo
│ │ │ └── CartVO.java
│ │ ├── mapper
│ │ └── CartMapper.java
│ │ └── service
│ │ ├── ICartService.java
│ │ └── impl
│ │ └── CartServiceImpl.java
│ └── resources
│ ├── application-dev.yaml
│ ├── application-local.yaml
│ ├── application.yaml
│ └── bootstrap.yaml
├── hm-api
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hmall
│ └── api
│ ├── client
│ ├── CartClient.java
│ ├── ItemClient.java
│ ├── PayClient.java
│ ├── TradeClient.java
│ ├── UserClient.java
│ └── fallback
│ │ ├── ItemClientFallbackFactory.java
│ │ └── PayClientFallback.java
│ ├── config
│ └── DefaultFeignConfig.java
│ └── dto
│ ├── ItemDTO.java
│ ├── OrderDetailDTO.java
│ └── PayOrderDTO.java
├── hm-common
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hmall
│ │ └── common
│ │ ├── advice
│ │ └── CommonExceptionAdvice.java
│ │ ├── config
│ │ ├── JsonConfig.java
│ │ ├── MqConfig.java
│ │ ├── MvcConfig.java
│ │ └── MyBatisConfig.java
│ │ ├── domain
│ │ ├── PageDTO.java
│ │ ├── PageQuery.java
│ │ └── R.java
│ │ ├── exception
│ │ ├── BadRequestException.java
│ │ ├── BizIllegalException.java
│ │ ├── CommonException.java
│ │ ├── DbException.java
│ │ ├── ForbiddenException.java
│ │ └── UnauthorizedException.java
│ │ ├── interceptors
│ │ └── UserInfoInterceotor.java
│ │ └── utils
│ │ ├── BeanUtils.java
│ │ ├── CollUtils.java
│ │ ├── Convert.java
│ │ ├── CookieBuilder.java
│ │ ├── UserContext.java
│ │ └── WebUtils.java
│ └── resources
│ └── META-INF
│ └── spring.factories
├── hm-gateway
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hmall
│ │ └── gateway
│ │ ├── GatewayApplication.java
│ │ ├── config
│ │ ├── AuthProperties.java
│ │ ├── JwtProperties.java
│ │ └── SecurityConfig.java
│ │ ├── filters
│ │ ├── AuthGlobalFilter.java
│ │ └── MyGlobalFilter.java
│ │ ├── routers
│ │ └── DynamicRouteLoader.java
│ │ └── util
│ │ └── JwtTool.java
│ └── resources
│ ├── application.yml
│ ├── bootstrap.yaml
│ └── hmall.jks
├── hm-service
├── Dockerfile
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── hmall
│ │ │ ├── HMallApplication.java
│ │ │ ├── config
│ │ │ ├── AuthProperties.java
│ │ │ ├── JwtProperties.java
│ │ │ ├── MvcConfig.java
│ │ │ └── SecurityConfig.java
│ │ │ ├── controller
│ │ │ ├── AddressController.java
│ │ │ ├── CartController.java
│ │ │ ├── HelloController.java
│ │ │ ├── ItemController.java
│ │ │ ├── OrderController.java
│ │ │ ├── PayController.java
│ │ │ ├── SearchController.java
│ │ │ └── UserController.java
│ │ │ ├── domain
│ │ │ ├── dto
│ │ │ │ ├── AddressDTO.java
│ │ │ │ ├── CartFormDTO.java
│ │ │ │ ├── ItemDTO.java
│ │ │ │ ├── LoginFormDTO.java
│ │ │ │ ├── OrderDetailDTO.java
│ │ │ │ ├── OrderFormDTO.java
│ │ │ │ ├── PayApplyDTO.java
│ │ │ │ └── PayOrderFormDTO.java
│ │ │ ├── po
│ │ │ │ ├── Address.java
│ │ │ │ ├── Cart.java
│ │ │ │ ├── Item.java
│ │ │ │ ├── Order.java
│ │ │ │ ├── OrderDetail.java
│ │ │ │ ├── OrderLogistics.java
│ │ │ │ ├── PayOrder.java
│ │ │ │ └── User.java
│ │ │ ├── query
│ │ │ │ └── ItemPageQuery.java
│ │ │ └── vo
│ │ │ │ ├── CartVO.java
│ │ │ │ ├── OrderVO.java
│ │ │ │ ├── PayOrderVO.java
│ │ │ │ └── UserLoginVO.java
│ │ │ ├── enums
│ │ │ ├── PayChannel.java
│ │ │ ├── PayStatus.java
│ │ │ ├── PayType.java
│ │ │ └── UserStatus.java
│ │ │ ├── interceptor
│ │ │ └── LoginInterceptor.java
│ │ │ ├── mapper
│ │ │ ├── AddressMapper.java
│ │ │ ├── CartMapper.java
│ │ │ ├── ItemMapper.java
│ │ │ ├── OrderDetailMapper.java
│ │ │ ├── OrderLogisticsMapper.java
│ │ │ ├── OrderMapper.java
│ │ │ ├── PayOrderMapper.java
│ │ │ └── UserMapper.java
│ │ │ ├── service
│ │ │ ├── IAddressService.java
│ │ │ ├── ICartService.java
│ │ │ ├── IItemService.java
│ │ │ ├── IOrderDetailService.java
│ │ │ ├── IOrderLogisticsService.java
│ │ │ ├── IOrderService.java
│ │ │ ├── IPayOrderService.java
│ │ │ ├── IUserService.java
│ │ │ └── impl
│ │ │ │ ├── AddressServiceImpl.java
│ │ │ │ ├── CartServiceImpl.java
│ │ │ │ ├── ItemServiceImpl.java
│ │ │ │ ├── OrderDetailServiceImpl.java
│ │ │ │ ├── OrderLogisticsServiceImpl.java
│ │ │ │ ├── OrderServiceImpl.java
│ │ │ │ ├── PayOrderServiceImpl.java
│ │ │ │ └── UserServiceImpl.java
│ │ │ └── utils
│ │ │ └── JwtTool.java
│ └── resources
│ │ ├── application-dev.yaml
│ │ ├── application-local.yaml
│ │ ├── application.yaml
│ │ ├── hmall.jks
│ │ └── mapper
│ │ ├── CartMapper.xml
│ │ ├── ItemMapper.xml
│ │ ├── OrderDetailMapper.xml
│ │ ├── OrderLogisticsMapper.xml
│ │ ├── OrderMapper.xml
│ │ ├── PayOrderMapper.xml
│ │ ├── TradeClient.xml
│ │ └── UserMapper.xml
│ └── test
│ └── java
│ └── com
│ └── hmall
│ └── service
│ └── impl
│ ├── HutoolTest.java
│ └── ItemServiceImplTest.java
├── hmall-nginx
├── conf
│ ├── fastcgi.conf
│ ├── fastcgi_params
│ ├── koi-utf
│ ├── koi-win
│ ├── mime.types
│ ├── nginx.conf
│ ├── scgi_params
│ ├── uwsgi_params
│ └── win-utf
├── contrib
│ ├── README
│ ├── geo2nginx.pl
│ ├── unicode2nginx
│ │ ├── koi-utf
│ │ ├── unicode-to-nginx.pl
│ │ └── win-utf
│ └── vim
│ │ ├── ftdetect
│ │ └── nginx.vim
│ │ ├── ftplugin
│ │ └── nginx.vim
│ │ ├── indent
│ │ └── nginx.vim
│ │ └── syntax
│ │ └── nginx.vim
├── docs
│ ├── CHANGES
│ ├── CHANGES.ru
│ ├── LICENSE
│ ├── OpenSSL.LICENSE
│ ├── PCRE.LICENCE
│ ├── README
│ └── zlib.LICENSE
├── html
│ ├── 50x.html
│ ├── hm-refresh-admin
│ │ ├── .idea
│ │ │ ├── .gitignore
│ │ │ ├── dictionaries
│ │ │ ├── encodings.xml
│ │ │ ├── hm-refresh-admin.iml
│ │ │ ├── misc.xml
│ │ │ └── modules.xml
│ │ ├── css
│ │ │ ├── element.css
│ │ │ ├── fonts
│ │ │ │ ├── element-icons.ttf
│ │ │ │ └── element-icons.woff
│ │ │ ├── index.css
│ │ │ ├── login.css
│ │ │ └── main.css
│ │ ├── favicon.ico
│ │ ├── images
│ │ │ ├── 1.png
│ │ │ ├── bgc.jpg
│ │ │ ├── full-logo.png
│ │ │ ├── login_center_bg.png
│ │ │ ├── logo.png
│ │ │ ├── logo1.png
│ │ │ ├── ts.png
│ │ │ ├── tt.png
│ │ │ └── ys.png
│ │ ├── index.html
│ │ ├── js
│ │ │ ├── axios.min.js
│ │ │ ├── common.js
│ │ │ ├── echarts.js
│ │ │ ├── element.js
│ │ │ ├── pages
│ │ │ │ ├── auth
│ │ │ │ │ ├── menu.js
│ │ │ │ │ ├── role.js
│ │ │ │ │ └── user.js
│ │ │ │ ├── banner.js
│ │ │ │ ├── class
│ │ │ │ │ └── student.js
│ │ │ │ ├── goods
│ │ │ │ │ ├── category.js
│ │ │ │ │ └── list.js
│ │ │ │ ├── index.js
│ │ │ │ └── menu.js
│ │ │ ├── view-router.js
│ │ │ └── vue.js
│ │ └── login.html
│ ├── hmall-admin
│ │ ├── .idea
│ │ │ ├── .gitignore
│ │ │ ├── dictionaries
│ │ │ ├── encodings.xml
│ │ │ ├── hm-mall-admin.iml
│ │ │ ├── misc.xml
│ │ │ └── modules.xml
│ │ ├── css
│ │ │ ├── element.css
│ │ │ ├── fonts
│ │ │ │ ├── element-icons.ttf
│ │ │ │ └── element-icons.woff
│ │ │ └── main.css
│ │ ├── favicon.ico
│ │ ├── items.html
│ │ ├── js
│ │ │ ├── axios.min.js
│ │ │ ├── element.js
│ │ │ └── vue.js
│ │ └── users.html
│ ├── hmall-portal
│ │ ├── .idea
│ │ │ ├── .gitignore
│ │ │ ├── dictionaries
│ │ │ ├── encodings.xml
│ │ │ ├── hm-mall-portal.iml
│ │ │ ├── misc.xml
│ │ │ └── modules.xml
│ │ ├── cart.html
│ │ ├── css
│ │ │ ├── banner.css
│ │ │ ├── carts.css
│ │ │ ├── index.css
│ │ │ ├── orderInfo.css
│ │ │ ├── pages-cart.css
│ │ │ ├── pages-getOrderInfo.css
│ │ │ ├── pages-index.css
│ │ │ ├── pages-login.css
│ │ │ ├── pages-paysuccess.css
│ │ │ ├── pages-weixinpay.css
│ │ │ ├── pay.css
│ │ │ ├── webbase.css
│ │ │ └── webbase2.css
│ │ ├── favicon.ico
│ │ ├── img
│ │ │ ├── 57b51ea9Nb862ca5e.png
│ │ │ ├── account.png
│ │ │ ├── ad.jpg
│ │ │ ├── ad.png
│ │ │ ├── ad1.png
│ │ │ ├── ad2.png
│ │ │ ├── ali.png
│ │ │ ├── banner1.jpg
│ │ │ ├── banner1.png
│ │ │ ├── banner2.jpg
│ │ │ ├── banner3.jpg
│ │ │ ├── banner3x.jpg
│ │ │ ├── banner4.jpg
│ │ │ ├── barrow.png
│ │ │ ├── brand01.png
│ │ │ ├── brand02.png
│ │ │ ├── brand03.png
│ │ │ ├── brand04.png
│ │ │ ├── brand05.png
│ │ │ ├── brand06.png
│ │ │ ├── brand07.png
│ │ │ ├── brand08.png
│ │ │ ├── brand09.png
│ │ │ ├── brand10.png
│ │ │ ├── brand11.png
│ │ │ ├── brand12.png
│ │ │ ├── brand13.png
│ │ │ ├── brand_03.png
│ │ │ ├── brand_05.png
│ │ │ ├── brand_07.png
│ │ │ ├── brand_09.png
│ │ │ ├── brand_11.png
│ │ │ ├── brand_13.png
│ │ │ ├── brand_15.png
│ │ │ ├── brand_17.png
│ │ │ ├── brand_19.png
│ │ │ ├── brand_21.png
│ │ │ ├── cartPanelViewIcons.png
│ │ │ ├── choosed.png
│ │ │ ├── clock.png
│ │ │ ├── delete.png
│ │ │ ├── duihuan.png
│ │ │ ├── erweima.png
│ │ │ ├── floor-1-1.png
│ │ │ ├── floor-1-2.png
│ │ │ ├── floor-1-3.png
│ │ │ ├── floor-1-4.png
│ │ │ ├── floor-1-5.png
│ │ │ ├── floor-1-6.png
│ │ │ ├── floor-1-b01.png
│ │ │ ├── floor-1-b02.png
│ │ │ ├── floor-1-b03.png
│ │ │ ├── goods.png
│ │ │ ├── heima.png
│ │ │ ├── icon-red.png
│ │ │ ├── icon.png
│ │ │ ├── icons.png
│ │ │ ├── interest01.png
│ │ │ ├── interest02.png
│ │ │ ├── interest03.png
│ │ │ ├── interest04.png
│ │ │ ├── interest05.png
│ │ │ ├── interest06.png
│ │ │ ├── like1.png
│ │ │ ├── like2.png
│ │ │ ├── like3.png
│ │ │ ├── like4.png
│ │ │ ├── like_01.png
│ │ │ ├── like_02.png
│ │ │ ├── like_03.png
│ │ │ ├── like_04.png
│ │ │ ├── like_05.png
│ │ │ ├── like_06.png
│ │ │ ├── linker.png
│ │ │ ├── lock.png
│ │ │ ├── loginbg.png
│ │ │ ├── logo.png
│ │ │ ├── mod-list.png
│ │ │ ├── phone-bg.png
│ │ │ ├── photo.png
│ │ │ ├── qq.png
│ │ │ ├── quan.png
│ │ │ ├── right.png
│ │ │ ├── sina.png
│ │ │ ├── today01.png
│ │ │ ├── today02.png
│ │ │ ├── today03.png
│ │ │ ├── today04.png
│ │ │ ├── weixin.png
│ │ │ ├── wx_cz.jpg
│ │ │ └── zoom.png
│ │ ├── index.html
│ │ ├── js
│ │ │ ├── axios.min.js
│ │ │ ├── common.js
│ │ │ ├── copyright.js
│ │ │ ├── foot.js
│ │ │ ├── qrcode.min.js
│ │ │ ├── top.js
│ │ │ └── vue.js
│ │ ├── login.html
│ │ ├── order-confirm.html
│ │ ├── pay.html
│ │ ├── paysuccess.html
│ │ └── search.html
│ ├── index.html
│ └── verification.html
├── logs
│ ├── access.log
│ ├── error.log
│ └── nginx.pid
└── nginx.exe
├── image
├── BaseMapper.png
├── MybatisPlus.png
├── docker.png
├── docker命令.png
├── nacos.png
├── rabbitmq.png
├── seata1.png
├── seata2.png
├── seata3.png
├── springcloud.png
├── 倒排索引.png
├── 单体架构.png
├── 微服务.png
├── 架构图.png
├── 流控规则.png
├── 线程隔离.png
├── 线程隔离1.png
├── 线程隔离2.png
├── 线程隔离3.png
├── 网关.png
├── 网关登录校验.png
├── 网关过滤器.png
└── 请求限流.png
├── item-service
├── logs
│ └── item-service
│ │ └── spring.log
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── hmall
│ │ │ └── item
│ │ │ ├── ItemApplication.java
│ │ │ ├── controller
│ │ │ ├── ItemController.java
│ │ │ └── SearchController.java
│ │ │ ├── domain
│ │ │ ├── dto
│ │ │ │ ├── ItemDTO.java
│ │ │ │ └── OrderDetailDTO.java
│ │ │ ├── po
│ │ │ │ ├── Item.java
│ │ │ │ └── ItemDoc.java
│ │ │ └── query
│ │ │ │ └── ItemPageQuery.java
│ │ │ ├── mapper
│ │ │ └── ItemMapper.java
│ │ │ └── service
│ │ │ ├── IItemService.java
│ │ │ └── impl
│ │ │ └── ItemServiceImpl.java
│ └── resources
│ │ ├── application-dev.yaml
│ │ ├── application-local.yaml
│ │ ├── application.yaml
│ │ └── bootstrap.yaml
│ └── test
│ └── java
│ └── com
│ └── hmall
│ └── item
│ └── es
│ └── ElasticDocumentTest.java
├── pay-service
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hmall
│ │ └── pay
│ │ ├── PayApplication.java
│ │ ├── controller
│ │ └── PayController.java
│ │ ├── domain
│ │ ├── dto
│ │ │ ├── PayApplyDTO.java
│ │ │ └── PayOrderFormDTO.java
│ │ ├── po
│ │ │ └── PayOrder.java
│ │ └── vo
│ │ │ └── PayOrderVO.java
│ │ ├── enums
│ │ ├── PayChannel.java
│ │ ├── PayStatus.java
│ │ └── PayType.java
│ │ ├── mapper
│ │ └── PayOrderMapper.java
│ │ └── service
│ │ ├── IPayOrderService.java
│ │ └── impl
│ │ └── PayOrderServiceImpl.java
│ └── resources
│ ├── application-dev.yaml
│ ├── application-local.yaml
│ └── application.yaml
├── pom.xml
├── sentinel-dashboard.jar
├── sentinel-dashboard命令.txt
├── trade-service
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hmall
│ │ └── trade
│ │ ├── TradeApplication.java
│ │ ├── constants
│ │ └── MQConstants.java
│ │ ├── controller
│ │ └── OrderController.java
│ │ ├── domain
│ │ ├── dto
│ │ │ └── OrderFormDTO.java
│ │ ├── po
│ │ │ ├── Order.java
│ │ │ ├── OrderDetail.java
│ │ │ └── OrderLogistics.java
│ │ └── vo
│ │ │ └── OrderVO.java
│ │ ├── listener
│ │ ├── OrderDelayMessageListener.java
│ │ └── PayStatusListener.java
│ │ ├── mapper
│ │ ├── OrderDetailMapper.java
│ │ ├── OrderLogisticsMapper.java
│ │ └── OrderMapper.java
│ │ └── service
│ │ ├── IOrderDetailService.java
│ │ ├── IOrderLogisticsService.java
│ │ ├── IOrderService.java
│ │ └── impl
│ │ ├── OrderDetailServiceImpl.java
│ │ ├── OrderLogisticsServiceImpl.java
│ │ └── OrderServiceImpl.java
│ └── resources
│ ├── application-dev.yaml
│ ├── application-local.yaml
│ ├── application.yaml
│ └── bootstrap.yaml
└── user-service
├── pom.xml
└── src
└── main
├── java
└── com
│ └── hmall
│ └── user
│ ├── UserApplication.java
│ ├── config
│ ├── JwtProperties.java
│ └── SecurityConfig.java
│ ├── controller
│ ├── AddressController.java
│ └── UserController.java
│ ├── domain
│ ├── dto
│ │ ├── AddressDTO.java
│ │ └── LoginFormDTO.java
│ ├── po
│ │ ├── Address.java
│ │ └── User.java
│ └── vo
│ │ └── UserLoginVO.java
│ ├── enums
│ └── UserStatus.java
│ ├── mapper
│ ├── AddressMapper.java
│ └── UserMapper.java
│ ├── service
│ ├── IAddressService.java
│ ├── IUserService.java
│ └── impl
│ │ ├── AddressServiceImpl.java
│ │ └── UserServiceImpl.java
│ └── util
│ └── JwtTool.java
└── resources
├── application-dev.yaml
├── application-local.yaml
├── application.yaml
└── hmall.jks
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 | * 订单详情表 16 | *
17 | * 18 | * @author 虎哥 19 | * @since 2023-05-05 20 | */ 21 | @Data 22 | @EqualsAndHashCode(callSuper = false) 23 | @Accessors(chain = true) 24 | @TableName("cart") 25 | public class Cart implements Serializable { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | /** 30 | * 购物车条目id 31 | */ 32 | @TableId(value = "id", type = IdType.AUTO) 33 | private Long id; 34 | 35 | /** 36 | * 用户id 37 | */ 38 | private Long userId; 39 | 40 | /** 41 | * sku商品id 42 | */ 43 | private Long itemId; 44 | 45 | /** 46 | * 购买数量 47 | */ 48 | private Integer num; 49 | 50 | /** 51 | * 商品标题 52 | */ 53 | private String name; 54 | 55 | /** 56 | * 商品动态属性键值集 57 | */ 58 | private String spec; 59 | 60 | /** 61 | * 价格,单位:分 62 | */ 63 | private Integer price; 64 | 65 | /** 66 | * 商品图片 67 | */ 68 | private String image; 69 | 70 | /** 71 | * 创建时间 72 | */ 73 | private LocalDateTime createTime; 74 | 75 | /** 76 | * 更新时间 77 | */ 78 | private LocalDateTime updateTime; 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /cart-service/src/main/java/com/hmall/cart/domain/vo/CartVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.cart.domain.vo; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | /** 10 | *11 | * 订单详情表 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Data 18 | @ApiModel(description = "购物车VO实体") 19 | public class CartVO { 20 | @ApiModelProperty("购物车条目id ") 21 | private Long id; 22 | @ApiModelProperty("sku商品id") 23 | private Long itemId; 24 | @ApiModelProperty("购买数量") 25 | private Integer num; 26 | @ApiModelProperty("商品标题") 27 | private String name; 28 | @ApiModelProperty("商品动态属性键值集") 29 | private String spec; 30 | @ApiModelProperty("价格,单位:分") 31 | private Integer price; 32 | @ApiModelProperty("商品最新价格") 33 | private Integer newPrice; 34 | @ApiModelProperty("商品最新状态") 35 | private Integer status = 1; 36 | @ApiModelProperty("商品最新库存") 37 | private Integer stock = 10; 38 | @ApiModelProperty("商品图片") 39 | private String image; 40 | @ApiModelProperty("创建时间") 41 | private LocalDateTime createTime; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /cart-service/src/main/java/com/hmall/cart/mapper/CartMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.cart.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.hmall.cart.domain.po.Cart; 5 | import org.apache.ibatis.annotations.Param; 6 | import org.apache.ibatis.annotations.Update; 7 | 8 | /** 9 | *10 | * 订单详情表 Mapper 接口 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface CartMapper extends BaseMapper13 | * 订单详情表 服务类 14 | *
15 | * 16 | * @author 虎哥 17 | * @since 2023-05-05 18 | */ 19 | public interface ICartService extends IService11 | * 支付订单 12 | *
13 | */ 14 | @Data 15 | @ApiModel(description = "支付单数据传输实体") 16 | public class PayOrderDTO { 17 | @ApiModelProperty("id") 18 | private Long id; 19 | @ApiModelProperty("业务订单号") 20 | private Long bizOrderNo; 21 | @ApiModelProperty("支付单号") 22 | private Long payOrderNo; 23 | @ApiModelProperty("支付用户id") 24 | private Long bizUserId; 25 | @ApiModelProperty("支付渠道编码") 26 | private String payChannelCode; 27 | @ApiModelProperty("支付金额,单位分") 28 | private Integer amount; 29 | @ApiModelProperty("付类型,1:h5,2:小程序,3:公众号,4:扫码,5:余额支付") 30 | private Integer payType; 31 | @ApiModelProperty("付状态,0:待提交,1:待支付,2:支付超时或取消,3:支付成功") 32 | private Integer status; 33 | @ApiModelProperty("拓展字段,用于传递不同渠道单独处理的字段") 34 | private String expandJson; 35 | @ApiModelProperty("第三方返回业务码") 36 | private String resultCode; 37 | @ApiModelProperty("第三方返回提示信息") 38 | private String resultMsg; 39 | @ApiModelProperty("支付成功时间") 40 | private LocalDateTime paySuccessTime; 41 | @ApiModelProperty("支付超时时间") 42 | private LocalDateTime payOverTime; 43 | @ApiModelProperty("支付二维码链接") 44 | private String qrCodeUrl; 45 | @ApiModelProperty("创建时间") 46 | private LocalDateTime createTime; 47 | @ApiModelProperty("更新时间") 48 | private LocalDateTime updateTime; 49 | } -------------------------------------------------------------------------------- /hm-common/src/main/java/com/hmall/common/config/JsonConfig.java: -------------------------------------------------------------------------------- 1 | package com.hmall.common.config; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 5 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 6 | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | import java.math.BigInteger; 11 | 12 | @Configuration 13 | @ConditionalOnClass(ObjectMapper.class) 14 | public class JsonConfig { 15 | @Bean 16 | public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { 17 | return jacksonObjectMapperBuilder -> { 18 | // long -> string 19 | jacksonObjectMapperBuilder.serializerByType(Long.class, ToStringSerializer.instance); 20 | jacksonObjectMapperBuilder.serializerByType(BigInteger.class, ToStringSerializer.instance); 21 | }; 22 | } 23 | } -------------------------------------------------------------------------------- /hm-common/src/main/java/com/hmall/common/config/MqConfig.java: -------------------------------------------------------------------------------- 1 | package com.hmall.common.config; 2 | 3 | import org.springframework.amqp.rabbit.core.RabbitTemplate; 4 | import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; 5 | import org.springframework.amqp.support.converter.MessageConverter; 6 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | @Configuration 11 | @ConditionalOnClass(RabbitTemplate.class) 12 | public class MqConfig { 13 | 14 | @Bean 15 | public MessageConverter messageConverter(){ 16 | return new Jackson2JsonMessageConverter(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hm-common/src/main/java/com/hmall/common/config/MvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.hmall.common.config; 2 | 3 | import com.hmall.common.interceptors.UserInfoInterceotor; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 5 | import org.springframework.context.annotation.Conditional; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.servlet.DispatcherServlet; 8 | import org.springframework.web.servlet.HandlerInterceptor; 9 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 11 | 12 | @Configuration 13 | @ConditionalOnClass(DispatcherServlet.class) 14 | public class MvcConfig implements WebMvcConfigurer { 15 | 16 | @Override 17 | public void addInterceptors(InterceptorRegistry registry) { 18 | registry.addInterceptor(new UserInfoInterceotor()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /hm-common/src/main/java/com/hmall/common/config/MyBatisConfig.java: -------------------------------------------------------------------------------- 1 | package com.hmall.common.config; 2 | 3 | import com.baomidou.mybatisplus.annotation.DbType; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; 6 | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; 7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 8 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 9 | import org.springframework.context.annotation.Bean; 10 | import org.springframework.context.annotation.Configuration; 11 | 12 | @Configuration 13 | @ConditionalOnClass({MybatisPlusInterceptor.class, BaseMapper.class}) 14 | public class MyBatisConfig { 15 | @Bean 16 | @ConditionalOnMissingBean 17 | public MybatisPlusInterceptor mybatisPlusInterceptor() { 18 | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); 19 | // 1.分页拦截器 20 | PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(DbType.MYSQL); 21 | paginationInnerInterceptor.setMaxLimit(1000L); 22 | interceptor.addInnerInterceptor(paginationInnerInterceptor); 23 | return interceptor; 24 | } 25 | } -------------------------------------------------------------------------------- /hm-common/src/main/java/com/hmall/common/domain/R.java: -------------------------------------------------------------------------------- 1 | package com.hmall.common.domain; 2 | 3 | import com.hmall.common.exception.CommonException; 4 | import lombok.Data; 5 | 6 | 7 | @Data 8 | public class R14 | * 15 | *
16 | * 17 | * @author 虎哥 18 | * @since 2023-05-05 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Accessors(chain = true) 23 | @TableName("address") 24 | public class Address implements Serializable { 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | @TableId(value = "id", type = IdType.AUTO) 29 | private Long id; 30 | 31 | /** 32 | * 用户ID 33 | */ 34 | private Long userId; 35 | 36 | /** 37 | * 省 38 | */ 39 | private String province; 40 | 41 | /** 42 | * 市 43 | */ 44 | private String city; 45 | 46 | /** 47 | * 县/区 48 | */ 49 | private String town; 50 | 51 | /** 52 | * 手机 53 | */ 54 | private String mobile; 55 | 56 | /** 57 | * 详细地址 58 | */ 59 | private String street; 60 | 61 | /** 62 | * 联系人 63 | */ 64 | private String contact; 65 | 66 | /** 67 | * 是否是默认 1默认 0否 68 | */ 69 | private Integer isDefault; 70 | 71 | /** 72 | * 备注 73 | */ 74 | private String notes; 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/po/Cart.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.po; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import java.time.LocalDateTime; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | *14 | * 订单详情表 15 | *
16 | * 17 | * @author 虎哥 18 | * @since 2023-05-05 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Accessors(chain = true) 23 | @TableName("cart") 24 | public class Cart implements Serializable { 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | /** 29 | * 购物车条目id 30 | */ 31 | @TableId(value = "id", type = IdType.AUTO) 32 | private Long id; 33 | 34 | /** 35 | * 用户id 36 | */ 37 | private Long userId; 38 | 39 | /** 40 | * sku商品id 41 | */ 42 | private Long itemId; 43 | 44 | /** 45 | * 购买数量 46 | */ 47 | private Integer num; 48 | 49 | /** 50 | * 商品标题 51 | */ 52 | private String name; 53 | 54 | /** 55 | * 商品动态属性键值集 56 | */ 57 | private String spec; 58 | 59 | /** 60 | * 价格,单位:分 61 | */ 62 | private Integer price; 63 | 64 | /** 65 | * 商品图片 66 | */ 67 | private String image; 68 | 69 | /** 70 | * 创建时间 71 | */ 72 | private LocalDateTime createTime; 73 | 74 | /** 75 | * 更新时间 76 | */ 77 | private LocalDateTime updateTime; 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/po/OrderDetail.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.po; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import java.time.LocalDateTime; 7 | import java.io.Serializable; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | *14 | * 订单详情表 15 | *
16 | * 17 | * @author 虎哥 18 | * @since 2023-05-05 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Accessors(chain = true) 23 | @TableName("order_detail") 24 | public class OrderDetail implements Serializable { 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | /** 29 | * 订单详情id 30 | */ 31 | @TableId(value = "id", type = IdType.AUTO) 32 | private Long id; 33 | 34 | /** 35 | * 订单id 36 | */ 37 | private Long orderId; 38 | 39 | /** 40 | * sku商品id 41 | */ 42 | private Long itemId; 43 | 44 | /** 45 | * 购买数量 46 | */ 47 | private Integer num; 48 | 49 | /** 50 | * 商品标题 51 | */ 52 | private String name; 53 | 54 | /** 55 | * 商品动态属性键值集 56 | */ 57 | private String spec; 58 | 59 | /** 60 | * 价格,单位:分 61 | */ 62 | private Integer price; 63 | 64 | /** 65 | * 商品图片 66 | */ 67 | private String image; 68 | 69 | /** 70 | * 创建时间 71 | */ 72 | private LocalDateTime createTime; 73 | 74 | /** 75 | * 更新时间 76 | */ 77 | private LocalDateTime updateTime; 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/po/User.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.po; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.hmall.enums.UserStatus; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | import java.io.Serializable; 12 | import java.time.LocalDateTime; 13 | 14 | /** 15 | *16 | * 用户表 17 | *
18 | * 19 | * @author 虎哥 20 | * @since 2023-05-05 21 | */ 22 | @Data 23 | @EqualsAndHashCode(callSuper = false) 24 | @Accessors(chain = true) 25 | @TableName("user") 26 | public class User implements Serializable { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | @TableId(value = "id", type = IdType.AUTO) 31 | private Long id; 32 | 33 | /** 34 | * 用户名 35 | */ 36 | private String username; 37 | 38 | /** 39 | * 密码,加密存储 40 | */ 41 | private String password; 42 | 43 | /** 44 | * 注册手机号 45 | */ 46 | private String phone; 47 | 48 | /** 49 | * 创建时间 50 | */ 51 | private LocalDateTime createTime; 52 | 53 | private LocalDateTime updateTime; 54 | 55 | /** 56 | * 使用状态(1正常 2冻结) 57 | */ 58 | private UserStatus status; 59 | 60 | /** 61 | * 账户余额 62 | */ 63 | private Integer balance; 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/query/ItemPageQuery.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.query; 2 | 3 | import com.hmall.common.domain.PageQuery; 4 | import io.swagger.annotations.ApiModel; 5 | import io.swagger.annotations.ApiModelProperty; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | 9 | @EqualsAndHashCode(callSuper = true) 10 | @Data 11 | @ApiModel(description = "商品分页查询条件") 12 | public class ItemPageQuery extends PageQuery { 13 | @ApiModelProperty("搜索关键字") 14 | private String key; 15 | @ApiModelProperty("商品分类") 16 | private String category; 17 | @ApiModelProperty("商品品牌") 18 | private String brand; 19 | @ApiModelProperty("价格最小值") 20 | private Integer minPrice; 21 | @ApiModelProperty("价格最大值") 22 | private Integer maxPrice; 23 | } 24 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/vo/CartVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.vo; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | /** 10 | *11 | * 订单详情表 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Data 18 | @ApiModel(description = "购物车VO实体") 19 | public class CartVO { 20 | @ApiModelProperty("购物车条目id ") 21 | private Long id; 22 | @ApiModelProperty("sku商品id") 23 | private Long itemId; 24 | @ApiModelProperty("购买数量") 25 | private Integer num; 26 | @ApiModelProperty("商品标题") 27 | private String name; 28 | @ApiModelProperty("商品动态属性键值集") 29 | private String spec; 30 | @ApiModelProperty("价格,单位:分") 31 | private Integer price; 32 | @ApiModelProperty("商品最新价格") 33 | private Integer newPrice; 34 | @ApiModelProperty("商品最新状态") 35 | private Integer status = 1; 36 | @ApiModelProperty("商品最新库存") 37 | private Integer stock = 10; 38 | @ApiModelProperty("商品图片") 39 | private String image; 40 | @ApiModelProperty("创建时间") 41 | private LocalDateTime createTime; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/vo/OrderVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.vo; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | @Data 10 | @ApiModel(description = "订单页面VO") 11 | public class OrderVO { 12 | @ApiModelProperty("订单id") 13 | private Long id; 14 | @ApiModelProperty("总金额,单位为分") 15 | private Integer totalFee; 16 | @ApiModelProperty("支付类型,1、支付宝,2、微信,3、扣减余额") 17 | private Integer paymentType; 18 | @ApiModelProperty("用户id") 19 | private Long userId; 20 | @ApiModelProperty("订单的状态,1、未付款 2、已付款,未发货 3、已发货,未确认 4、确认收货,交易成功 5、交易取消,订单关闭 6、交易结束,已评价") 21 | private Integer status; 22 | @ApiModelProperty("创建时间") 23 | private LocalDateTime createTime; 24 | @ApiModelProperty("支付时间") 25 | private LocalDateTime payTime; 26 | @ApiModelProperty("发货时间") 27 | private LocalDateTime consignTime; 28 | @ApiModelProperty("交易完成时间") 29 | private LocalDateTime endTime; 30 | @ApiModelProperty("交易关闭时间") 31 | private LocalDateTime closeTime; 32 | @ApiModelProperty("评价时间") 33 | private LocalDateTime commentTime; 34 | } 35 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/vo/PayOrderVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.vo; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | /** 10 | *11 | * 支付订单 12 | *
13 | */ 14 | @Data 15 | @ApiModel(description = "支付单vo实体") 16 | public class PayOrderVO { 17 | @ApiModelProperty("id") 18 | private Long id; 19 | @ApiModelProperty("业务订单号") 20 | private Long bizOrderNo; 21 | @ApiModelProperty("支付单号") 22 | private Long payOrderNo; 23 | @ApiModelProperty("支付用户id") 24 | private Long bizUserId; 25 | @ApiModelProperty("支付渠道编码") 26 | private String payChannelCode; 27 | @ApiModelProperty("支付金额,单位分") 28 | private Integer amount; 29 | @ApiModelProperty("付类型,1:h5,2:小程序,3:公众号,4:扫码,5:余额支付") 30 | private Integer payType; 31 | @ApiModelProperty("付状态,0:待提交,1:待支付,2:支付超时或取消,3:支付成功") 32 | private Integer status; 33 | @ApiModelProperty("拓展字段,用于传递不同渠道单独处理的字段") 34 | private String expandJson; 35 | @ApiModelProperty("第三方返回业务码") 36 | private String resultCode; 37 | @ApiModelProperty("第三方返回提示信息") 38 | private String resultMsg; 39 | @ApiModelProperty("支付成功时间") 40 | private LocalDateTime paySuccessTime; 41 | @ApiModelProperty("支付超时时间") 42 | private LocalDateTime payOverTime; 43 | @ApiModelProperty("支付二维码链接") 44 | private String qrCodeUrl; 45 | @ApiModelProperty("创建时间") 46 | private LocalDateTime createTime; 47 | @ApiModelProperty("更新时间") 48 | private LocalDateTime updateTime; 49 | } 50 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/domain/vo/UserLoginVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.domain.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserLoginVO { 7 | private String token; 8 | private Long userId; 9 | private String username; 10 | private Integer balance; 11 | } 12 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/enums/PayChannel.java: -------------------------------------------------------------------------------- 1 | package com.hmall.enums; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import lombok.Getter; 5 | 6 | @Getter 7 | public enum PayChannel { 8 | wxPay("微信支付"), 9 | aliPay("支付宝支付"), 10 | balance("余额支付"), 11 | ; 12 | 13 | private final String desc; 14 | 15 | PayChannel(String desc) { 16 | this.desc = desc; 17 | } 18 | 19 | public static String desc(String value){ 20 | if (StrUtil.isBlank(value)) { 21 | return ""; 22 | } 23 | return PayChannel.valueOf(value).getDesc(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/enums/PayStatus.java: -------------------------------------------------------------------------------- 1 | package com.hmall.enums; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum PayStatus { 7 | NOT_COMMIT(0, "未提交"), 8 | WAIT_BUYER_PAY(1, "待支付"), 9 | TRADE_CLOSED(2, "已关闭"), 10 | TRADE_SUCCESS(3, "支付成功"), 11 | TRADE_FINISHED(3, "支付成功"), 12 | ; 13 | private final int value; 14 | private final String desc; 15 | 16 | PayStatus(int value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public boolean equalsValue(Integer value){ 22 | if (value == null) { 23 | return false; 24 | } 25 | return getValue() == value; 26 | } 27 | } -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/enums/PayType.java: -------------------------------------------------------------------------------- 1 | package com.hmall.enums; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum PayType{ 7 | JSAPI(1, "网页支付JS"), 8 | MINI_APP(2, "小程序支付"), 9 | APP(3, "APP支付"), 10 | NATIVE(4, "扫码支付"), 11 | BALANCE(5, "余额支付"), 12 | ; 13 | private final int value; 14 | private final String desc; 15 | 16 | PayType(int value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public boolean equalsValue(Integer value){ 22 | if (value == null) { 23 | return false; 24 | } 25 | return getValue() == value; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/enums/UserStatus.java: -------------------------------------------------------------------------------- 1 | package com.hmall.enums; 2 | 3 | import com.baomidou.mybatisplus.annotation.EnumValue; 4 | import com.hmall.common.exception.BadRequestException; 5 | import lombok.Getter; 6 | 7 | @Getter 8 | public enum UserStatus { 9 | FROZEN(0, "禁止使用"), 10 | NORMAL(1, "已激活"), 11 | ; 12 | @EnumValue 13 | int value; 14 | String desc; 15 | 16 | UserStatus(Integer value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public static UserStatus of(int value) { 22 | if (value == 0) { 23 | return FROZEN; 24 | } 25 | if (value == 1) { 26 | return NORMAL; 27 | } 28 | throw new BadRequestException("账户状态错误"); 29 | } 30 | } -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.hmall.interceptor; 2 | 3 | import com.hmall.common.utils.UserContext; 4 | import com.hmall.utils.JwtTool; 5 | import lombok.RequiredArgsConstructor; 6 | import org.springframework.web.servlet.HandlerInterceptor; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | @RequiredArgsConstructor 12 | public class LoginInterceptor implements HandlerInterceptor { 13 | 14 | private final JwtTool jwtTool; 15 | 16 | @Override 17 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 18 | // 1.获取请求头中的 token 19 | String token = request.getHeader("authorization"); 20 | // 2.校验token 21 | Long userId = jwtTool.parseToken(token); 22 | // 3.存入上下文 23 | UserContext.setUser(userId); 24 | // 4.放行 25 | return true; 26 | } 27 | 28 | @Override 29 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 30 | // 清理用户 31 | UserContext.removeUser(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/mapper/AddressMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.mapper; 2 | 3 | import com.hmall.domain.po.Address; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *8 | * Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface AddressMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/mapper/CartMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.mapper; 2 | 3 | import com.hmall.domain.po.Cart; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | import org.apache.ibatis.annotations.Update; 7 | 8 | /** 9 | *10 | * 订单详情表 Mapper 接口 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface CartMapper extends BaseMapper10 | * 商品表 Mapper 接口 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface ItemMapper extends BaseMapper8 | * 订单详情表 Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderDetailMapper extends BaseMapper8 | * Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderLogisticsMapper extends BaseMapper8 | * Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderMapper extends BaseMapper8 | * 支付订单 Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-16 13 | */ 14 | public interface PayOrderMapper extends BaseMapper10 | * 用户表 Mapper 接口 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface UserMapper extends BaseMapper8 | * 服务类 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface IAddressService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /hm-service/src/main/java/com/hmall/service/ICartService.java: -------------------------------------------------------------------------------- 1 | package com.hmall.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.hmall.domain.dto.CartFormDTO; 5 | import com.hmall.domain.po.Cart; 6 | import com.hmall.domain.vo.CartVO; 7 | 8 | import java.util.Collection; 9 | import java.util.List; 10 | 11 | /** 12 | *13 | * 订单详情表 服务类 14 | *
15 | * 16 | * @author 虎哥 17 | * @since 2023-05-05 18 | */ 19 | public interface ICartService extends IService13 | * 商品表 服务类 14 | *
15 | * 16 | * @author 虎哥 17 | * @since 2023-05-05 18 | */ 19 | public interface IItemService extends IService8 | * 订单详情表 服务类 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface IOrderDetailService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface IOrderLogisticsService extends IService9 | * 服务类 10 | *
11 | * 12 | * @author 虎哥 13 | * @since 2023-05-05 14 | */ 15 | public interface IOrderService extends IService10 | * 支付订单 服务类 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-16 15 | */ 16 | public interface IPayOrderService extends IService10 | * 用户表 服务类 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface IUserService extends IService11 | * 服务实现类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Service 18 | public class AddressServiceImpl extends ServiceImpl18 | * 商品表 服务实现类 19 | *
20 | * 21 | * @author 虎哥 22 | */ 23 | @Service 24 | public class ItemServiceImpl extends ServiceImpl11 | * 订单详情表 服务实现类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Service 18 | public class OrderDetailServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Service 18 | public class OrderLogisticsServiceImpl extends ServiceImplSorry, the page you are looking for is currently unavailable.
16 | Please try again later.
If you are the system administrator of this resource then you should check 18 | the error log for details.
19 |Faithfully yours, nginx.
20 | 21 | 22 | -------------------------------------------------------------------------------- /hmall-nginx/html/hm-refresh-admin/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /../../../../../../:\lesson\rj19357\code\hm-refresh-admin\.idea/dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /hmall-nginx/html/hm-refresh-admin/.idea/dictionaries: -------------------------------------------------------------------------------- 1 | 2 |元素 53 | */ 54 | #toggle-button:checked + label.button-label .circle{ 55 | left: 49px; 56 | } 57 | #toggle-button:checked + label.button-label .on{ 58 | display: inline-block; 59 | } 60 | #toggle-button:checked + label.button-label .off{ 61 | display: none; 62 | } 63 | #toggle-button:checked + label.button-label{ 64 | background-color: #FF8800; 65 | } 66 | 67 | 68 | .banner{ 69 | width: 100%; 70 | display: flex; 71 | justify-content: space-between; 72 | padding-top: 10px; 73 | } 74 | 75 | .logo{ 76 | width: 150px; 77 | } -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/css/carts.css: -------------------------------------------------------------------------------- 1 | .container{ 2 | width: 100%; 3 | height: 500px; 4 | background-color: #fff; 5 | /*border-bottom: #fff 3px solid;*/ 6 | box-shadow: 0 1px 3px rgba(0,0,0,.1); 7 | } 8 | .tab-wrapper{ 9 | position: relative; 10 | width: 100%; 11 | height: 60px; 12 | border-bottom: #a4a3a3 3px solid; 13 | /*background-color: #df3033;*/ 14 | } 15 | .tab-wrapper .tab-radio{ 16 | display: none; 17 | } 18 | .tab-handler{ 19 | position: relative; 20 | z-index: 2; 21 | display: block; 22 | float: left; 23 | height: 60px; 24 | padding: 0 40px; 25 | color: #717181; 26 | font-size: 16px; 27 | line-height: 60px; 28 | /*transition: .3s;*/ 29 | transform: scale(.9); 30 | } 31 | .tab-selected{ 32 | color: #717181; 33 | border-bottom: #df3033 3px solid; 34 | background-color: #fff0f0; 35 | transform: scale(1); 36 | } 37 | .tab-wrapper .tab-content{ 38 | position: absolute; 39 | top: 60px; 40 | left: 0; 41 | padding: 0 30px; 42 | color: #999; 43 | font-size: 14px; 44 | line-height: 1.618em; 45 | background-color: #fff; 46 | transition: transform .5s, opacity .7s; 47 | transform: translateY(20px); 48 | } -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/css/orderInfo.css: -------------------------------------------------------------------------------- 1 | 2 | .num { 3 | line-height: 20px; 4 | width: 60px; 5 | text-align: right; 6 | } 7 | .num span { 8 | font-size: 18px; 9 | line-height: 20px; 10 | width: 20px; 11 | } 12 | .num-btn { 13 | font-size: 16px; 14 | line-height: 20px; 15 | width: 30px; 16 | text-align: center; 17 | } -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/css/pages-paysuccess.css: -------------------------------------------------------------------------------- 1 | .top { 2 | background-color: #f1f1f1 3 | } 4 | .paysuccess { 5 | padding: 25px; 6 | margin: 20px 0; 7 | border: 1px solid #ddd; 8 | font-family: "微软雅黑" 9 | } 10 | 11 | .paysuccess .success { 12 | width: 500px; 13 | margin: 0 auto 14 | } 15 | 16 | .success h3 { 17 | margin: 20px 0; 18 | font-weight: 700; 19 | font-size: 20px 20 | } 21 | 22 | .success .paydetail { 23 | margin-left: 66px; 24 | font-size: 15px 25 | } 26 | 27 | .paydetail p { 28 | line-height: 26px 29 | } 30 | 31 | p.button { 32 | margin: 30px 0 33 | } 34 | 35 | .paydetail .sui-btn.btn-xlarge { 36 | font-size: 18px 37 | } -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/css/pay.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/css/pay.css -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/favicon.ico -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/57b51ea9Nb862ca5e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/57b51ea9Nb862ca5e.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/account.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/ad.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/ad.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/ad1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/ad1.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/ad2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/ad2.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/ali.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/ali.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner1.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner1.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner2.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner3.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner3x.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/banner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/banner4.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/barrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/barrow.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand01.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand02.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand04.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand05.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand06.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand07.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand08.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand09.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand10.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand11.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand12.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand13.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_05.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_07.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_09.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_11.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_13.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_15.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_17.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_19.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/brand_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/brand_21.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/cartPanelViewIcons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/cartPanelViewIcons.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/choosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/choosed.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/clock.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/delete.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/duihuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/duihuan.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/erweima.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/erweima.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-1.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-2.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-3.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-4.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-5.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-6.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-b01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-b01.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-b02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-b02.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/floor-1-b03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/floor-1-b03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/goods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/goods.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/heima.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/heima.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/icon-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/icon-red.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/icon.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/icons.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest01.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest02.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest04.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest05.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/interest06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/interest06.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like1.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like2.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like3.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like4.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_01.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_02.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_04.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_05.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/like_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/like_06.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/linker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/linker.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/lock.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/loginbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/loginbg.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/logo.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/mod-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/mod-list.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/phone-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/phone-bg.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/photo.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/qq.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/quan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/quan.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/right.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/sina.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/today01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/today01.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/today02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/today02.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/today03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/today03.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/today04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/today04.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/weixin.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/wx_cz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/wx_cz.jpg -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/img/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/html/hmall-portal/img/zoom.png -------------------------------------------------------------------------------- /hmall-nginx/html/hmall-portal/js/copyright.js: -------------------------------------------------------------------------------- 1 | const copyright = { 2 | template: ` 3 |
地址:北京市昌平区金燕龙办公楼 邮编:201316 电话:400-618-9090 网址:http://www.itheima.com
17 |沪 ICP备xxxxxxxxxx号京公网安备xxxxxxxxxxx
18 |If you see this page, the nginx web server is successfully installed and 16 | working. Further configuration is required.
17 | 18 |For online documentation and support please refer to
19 | nginx.org.
20 | Commercial support is available at
21 | nginx.com.
Thank you for using nginx.
24 | 25 | 26 | -------------------------------------------------------------------------------- /hmall-nginx/html/verification.html: -------------------------------------------------------------------------------- 1 | verify_4b483cef1cb19be9933a96c1e63377cb -------------------------------------------------------------------------------- /hmall-nginx/logs/error.log: -------------------------------------------------------------------------------- 1 | 2024/05/12 19:12:50 [error] 23972#3904: *28 CreateFile() "E:\Java\hmall\hmall-nginx/html/hmall-portal/login" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /login HTTP/1.1", host: "localhost:18080" 2 | 2024/05/14 20:00:56 [error] 5140#16956: *1 CreateFile() "E:\Java\hmall\hmall-nginx/html/hmall-portal/items/page" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /items/page HTTP/1.1", host: "localhost:18080" 3 | 2024/05/19 12:49:47 [error] 22212#8536: *1 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/search/list?key=&pageNo=1&pageSize=20&sortBy=&isAsc=false HTTP/1.1", upstream: "http://[::1]:8080/search/list?key=&pageNo=1&pageSize=20&sortBy=&isAsc=false", host: "localhost:18080", referrer: "http://localhost:18080/search.html" 4 | -------------------------------------------------------------------------------- /hmall-nginx/logs/nginx.pid: -------------------------------------------------------------------------------- 1 | 21160 2 | -------------------------------------------------------------------------------- /hmall-nginx/nginx.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/hmall-nginx/nginx.exe -------------------------------------------------------------------------------- /image/BaseMapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/BaseMapper.png -------------------------------------------------------------------------------- /image/MybatisPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/MybatisPlus.png -------------------------------------------------------------------------------- /image/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/docker.png -------------------------------------------------------------------------------- /image/docker命令.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/docker命令.png -------------------------------------------------------------------------------- /image/nacos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/nacos.png -------------------------------------------------------------------------------- /image/rabbitmq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/rabbitmq.png -------------------------------------------------------------------------------- /image/seata1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/seata1.png -------------------------------------------------------------------------------- /image/seata2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/seata2.png -------------------------------------------------------------------------------- /image/seata3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/seata3.png -------------------------------------------------------------------------------- /image/springcloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/springcloud.png -------------------------------------------------------------------------------- /image/倒排索引.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/倒排索引.png -------------------------------------------------------------------------------- /image/单体架构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/单体架构.png -------------------------------------------------------------------------------- /image/微服务.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/微服务.png -------------------------------------------------------------------------------- /image/架构图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/架构图.png -------------------------------------------------------------------------------- /image/流控规则.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/流控规则.png -------------------------------------------------------------------------------- /image/线程隔离.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/线程隔离.png -------------------------------------------------------------------------------- /image/线程隔离1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/线程隔离1.png -------------------------------------------------------------------------------- /image/线程隔离2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/线程隔离2.png -------------------------------------------------------------------------------- /image/线程隔离3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/线程隔离3.png -------------------------------------------------------------------------------- /image/网关.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/网关.png -------------------------------------------------------------------------------- /image/网关登录校验.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/网关登录校验.png -------------------------------------------------------------------------------- /image/网关过滤器.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/网关过滤器.png -------------------------------------------------------------------------------- /image/请求限流.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangshuiyun/hmall/000e66b3b94ef0761ea6db60d692793cb9d0269c/image/请求限流.png -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/ItemApplication.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @MapperScan("com.hmall.item.mapper") 8 | @SpringBootApplication 9 | public class ItemApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(ItemApplication.class, args); 12 | } 13 | } -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/domain/dto/ItemDTO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item.domain.dto; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | @Data 8 | @ApiModel(description = "商品实体") 9 | public class ItemDTO { 10 | @ApiModelProperty("商品id") 11 | private Long id; 12 | @ApiModelProperty("SKU名称") 13 | private String name; 14 | @ApiModelProperty("价格(分)") 15 | private Integer price; 16 | @ApiModelProperty("库存数量") 17 | private Integer stock; 18 | @ApiModelProperty("商品图片") 19 | private String image; 20 | @ApiModelProperty("类目名称") 21 | private String category; 22 | @ApiModelProperty("品牌名称") 23 | private String brand; 24 | @ApiModelProperty("规格") 25 | private String spec; 26 | @ApiModelProperty("销量") 27 | private Integer sold; 28 | @ApiModelProperty("评论数") 29 | private Integer commentCount; 30 | @ApiModelProperty("是否是推广广告,true/false") 31 | private Boolean isAD; 32 | @ApiModelProperty("商品状态 1-正常,2-下架,3-删除") 33 | private Integer status; 34 | } 35 | -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/domain/dto/OrderDetailDTO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item.domain.dto; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | import lombok.experimental.Accessors; 7 | 8 | @ApiModel(description = "订单明细条目") 9 | @Data 10 | @Accessors(chain = true) 11 | public class OrderDetailDTO { 12 | @ApiModelProperty("商品id") 13 | private Long itemId; 14 | @ApiModelProperty("商品购买数量") 15 | private Integer num; 16 | } 17 | -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/domain/po/ItemDoc.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item.domain.po; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | @Data 10 | @ApiModel(description = "索引库实体") 11 | public class ItemDoc{ 12 | 13 | @ApiModelProperty("商品id") 14 | private String id; 15 | 16 | @ApiModelProperty("商品名称") 17 | private String name; 18 | 19 | @ApiModelProperty("价格(分)") 20 | private Integer price; 21 | 22 | @ApiModelProperty("商品图片") 23 | private String image; 24 | 25 | @ApiModelProperty("类目名称") 26 | private String category; 27 | 28 | @ApiModelProperty("品牌名称") 29 | private String brand; 30 | 31 | @ApiModelProperty("销量") 32 | private Integer sold; 33 | 34 | @ApiModelProperty("评论数") 35 | private Integer commentCount; 36 | 37 | @ApiModelProperty("是否是推广广告,true/false") 38 | private Boolean isAD; 39 | 40 | @ApiModelProperty("更新时间") 41 | private LocalDateTime updateTime; 42 | } -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/domain/query/ItemPageQuery.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item.domain.query; 2 | 3 | import com.hmall.common.domain.PageQuery; 4 | import io.swagger.annotations.ApiModel; 5 | import io.swagger.annotations.ApiModelProperty; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | 9 | @EqualsAndHashCode(callSuper = true) 10 | @Data 11 | @ApiModel(description = "商品分页查询条件") 12 | public class ItemPageQuery extends PageQuery { 13 | @ApiModelProperty("搜索关键字") 14 | private String key; 15 | @ApiModelProperty("商品分类") 16 | private String category; 17 | @ApiModelProperty("商品品牌") 18 | private String brand; 19 | @ApiModelProperty("价格最小值") 20 | private Integer minPrice; 21 | @ApiModelProperty("价格最大值") 22 | private Integer maxPrice; 23 | } 24 | -------------------------------------------------------------------------------- /item-service/src/main/java/com/hmall/item/mapper/ItemMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.item.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.hmall.item.domain.dto.OrderDetailDTO; 5 | import com.hmall.item.domain.po.Item; 6 | import org.apache.ibatis.annotations.Update; 7 | 8 | /** 9 | *10 | * 商品表 Mapper 接口 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface ItemMapper extends BaseMapper12 | * 商品表 服务类 13 | *
14 | * 15 | * @author 虎哥 16 | * @since 2023-05-05 17 | */ 18 | public interface IItemService extends IService19 | * 商品表 服务实现类 20 | *
21 | * 22 | * @author 虎哥 23 | */ 24 | @Service 25 | public class ItemServiceImpl extends ServiceImpl11 | * 支付订单 12 | *
13 | */ 14 | @Data 15 | @ApiModel(description = "支付单vo实体") 16 | public class PayOrderVO { 17 | @ApiModelProperty("id") 18 | private Long id; 19 | @ApiModelProperty("业务订单号") 20 | private Long bizOrderNo; 21 | @ApiModelProperty("支付单号") 22 | private Long payOrderNo; 23 | @ApiModelProperty("支付用户id") 24 | private Long bizUserId; 25 | @ApiModelProperty("支付渠道编码") 26 | private String payChannelCode; 27 | @ApiModelProperty("支付金额,单位分") 28 | private Integer amount; 29 | @ApiModelProperty("付类型,1:h5,2:小程序,3:公众号,4:扫码,5:余额支付") 30 | private Integer payType; 31 | @ApiModelProperty("付状态,0:待提交,1:待支付,2:支付超时或取消,3:支付成功") 32 | private Integer status; 33 | @ApiModelProperty("拓展字段,用于传递不同渠道单独处理的字段") 34 | private String expandJson; 35 | @ApiModelProperty("第三方返回业务码") 36 | private String resultCode; 37 | @ApiModelProperty("第三方返回提示信息") 38 | private String resultMsg; 39 | @ApiModelProperty("支付成功时间") 40 | private LocalDateTime paySuccessTime; 41 | @ApiModelProperty("支付超时时间") 42 | private LocalDateTime payOverTime; 43 | @ApiModelProperty("支付二维码链接") 44 | private String qrCodeUrl; 45 | @ApiModelProperty("创建时间") 46 | private LocalDateTime createTime; 47 | @ApiModelProperty("更新时间") 48 | private LocalDateTime updateTime; 49 | } 50 | -------------------------------------------------------------------------------- /pay-service/src/main/java/com/hmall/pay/enums/PayChannel.java: -------------------------------------------------------------------------------- 1 | package com.hmall.pay.enums; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import lombok.Getter; 5 | 6 | @Getter 7 | public enum PayChannel { 8 | wxPay("微信支付"), 9 | aliPay("支付宝支付"), 10 | balance("余额支付"), 11 | ; 12 | 13 | private final String desc; 14 | 15 | PayChannel(String desc) { 16 | this.desc = desc; 17 | } 18 | 19 | public static String desc(String value){ 20 | if (StrUtil.isBlank(value)) { 21 | return ""; 22 | } 23 | return PayChannel.valueOf(value).getDesc(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pay-service/src/main/java/com/hmall/pay/enums/PayStatus.java: -------------------------------------------------------------------------------- 1 | package com.hmall.pay.enums; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum PayStatus { 7 | NOT_COMMIT(0, "未提交"), 8 | WAIT_BUYER_PAY(1, "待支付"), 9 | TRADE_CLOSED(2, "已关闭"), 10 | TRADE_SUCCESS(3, "支付成功"), 11 | TRADE_FINISHED(3, "支付成功"), 12 | ; 13 | private final int value; 14 | private final String desc; 15 | 16 | PayStatus(int value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public boolean equalsValue(Integer value){ 22 | if (value == null) { 23 | return false; 24 | } 25 | return getValue() == value; 26 | } 27 | } -------------------------------------------------------------------------------- /pay-service/src/main/java/com/hmall/pay/enums/PayType.java: -------------------------------------------------------------------------------- 1 | package com.hmall.pay.enums; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum PayType{ 7 | JSAPI(1, "网页支付JS"), 8 | MINI_APP(2, "小程序支付"), 9 | APP(3, "APP支付"), 10 | NATIVE(4, "扫码支付"), 11 | BALANCE(5, "余额支付"), 12 | ; 13 | private final int value; 14 | private final String desc; 15 | 16 | PayType(int value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public boolean equalsValue(Integer value){ 22 | if (value == null) { 23 | return false; 24 | } 25 | return getValue() == value; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pay-service/src/main/java/com/hmall/pay/mapper/PayOrderMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.pay.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.hmall.pay.domain.po.PayOrder; 5 | 6 | 7 | /** 8 | *9 | * 支付订单 Mapper 接口 10 | *
11 | * 12 | * @author 虎哥 13 | * @since 2023-05-16 14 | */ 15 | public interface PayOrderMapper extends BaseMapper11 | * 支付订单 服务类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-16 16 | */ 17 | public interface IPayOrderService extends IService15 | * 订单详情表 16 | *
17 | * 18 | * @author 虎哥 19 | * @since 2023-05-05 20 | */ 21 | @Data 22 | @EqualsAndHashCode(callSuper = false) 23 | @Accessors(chain = true) 24 | @TableName("order_detail") 25 | public class OrderDetail implements Serializable { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | /** 30 | * 订单详情id 31 | */ 32 | @TableId(value = "id", type = IdType.AUTO) 33 | private Long id; 34 | 35 | /** 36 | * 订单id 37 | */ 38 | private Long orderId; 39 | 40 | /** 41 | * sku商品id 42 | */ 43 | private Long itemId; 44 | 45 | /** 46 | * 购买数量 47 | */ 48 | private Integer num; 49 | 50 | /** 51 | * 商品标题 52 | */ 53 | private String name; 54 | 55 | /** 56 | * 商品动态属性键值集 57 | */ 58 | private String spec; 59 | 60 | /** 61 | * 价格,单位:分 62 | */ 63 | private Integer price; 64 | 65 | /** 66 | * 商品图片 67 | */ 68 | private String image; 69 | 70 | /** 71 | * 创建时间 72 | */ 73 | private LocalDateTime createTime; 74 | 75 | /** 76 | * 更新时间 77 | */ 78 | private LocalDateTime updateTime; 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /trade-service/src/main/java/com/hmall/trade/domain/vo/OrderVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.trade.domain.vo; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | @Data 10 | @ApiModel(description = "订单页面VO") 11 | public class OrderVO { 12 | @ApiModelProperty("订单id") 13 | private Long id; 14 | @ApiModelProperty("总金额,单位为分") 15 | private Integer totalFee; 16 | @ApiModelProperty("支付类型,1、支付宝,2、微信,3、扣减余额") 17 | private Integer paymentType; 18 | @ApiModelProperty("用户id") 19 | private Long userId; 20 | @ApiModelProperty("订单的状态,1、未付款 2、已付款,未发货 3、已发货,未确认 4、确认收货,交易成功 5、交易取消,订单关闭 6、交易结束,已评价") 21 | private Integer status; 22 | @ApiModelProperty("创建时间") 23 | private LocalDateTime createTime; 24 | @ApiModelProperty("支付时间") 25 | private LocalDateTime payTime; 26 | @ApiModelProperty("发货时间") 27 | private LocalDateTime consignTime; 28 | @ApiModelProperty("交易完成时间") 29 | private LocalDateTime endTime; 30 | @ApiModelProperty("交易关闭时间") 31 | private LocalDateTime closeTime; 32 | @ApiModelProperty("评价时间") 33 | private LocalDateTime commentTime; 34 | } 35 | -------------------------------------------------------------------------------- /trade-service/src/main/java/com/hmall/trade/listener/PayStatusListener.java: -------------------------------------------------------------------------------- 1 | package com.hmall.trade.listener; 2 | 3 | import com.hmall.trade.service.IOrderService; 4 | import lombok.RequiredArgsConstructor; 5 | import org.springframework.amqp.rabbit.annotation.Exchange; 6 | import org.springframework.amqp.rabbit.annotation.Queue; 7 | import org.springframework.amqp.rabbit.annotation.QueueBinding; 8 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 9 | import org.springframework.stereotype.Component; 10 | 11 | @Component 12 | @RequiredArgsConstructor 13 | public class PayStatusListener { 14 | 15 | private final IOrderService orderService; 16 | 17 | @RabbitListener(bindings = @QueueBinding( 18 | value = @Queue(name = "trade.pay.success.queue", durable = "true"), 19 | exchange = @Exchange(name = "pay.direct"), 20 | key = "pay.success" 21 | )) 22 | public void listenPaySuccess(Long orderId){ 23 | orderService.markOrderPaySuccess(orderId); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /trade-service/src/main/java/com/hmall/trade/mapper/OrderDetailMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.trade.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.hmall.trade.domain.po.OrderDetail; 5 | 6 | /** 7 | *8 | * 订单详情表 Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderDetailMapper extends BaseMapper8 | * Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderLogisticsMapper extends BaseMapper8 | * Mapper 接口 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface OrderMapper extends BaseMapper8 | * 订单详情表 服务类 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface IOrderDetailService extends IService8 | * 服务类 9 | *
10 | * 11 | * @author 虎哥 12 | * @since 2023-05-05 13 | */ 14 | public interface IOrderLogisticsService extends IService10 | * 服务类 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface IOrderService extends IService11 | * 订单详情表 服务实现类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Service 18 | public class OrderDetailServiceImpl extends ServiceImpl11 | * 服务实现类 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | @Service 18 | public class OrderLogisticsServiceImpl extends ServiceImpl14 | * 15 | *
16 | * 17 | * @author 虎哥 18 | * @since 2023-05-05 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Accessors(chain = true) 23 | @TableName("address") 24 | public class Address implements Serializable { 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | @TableId(value = "id", type = IdType.AUTO) 29 | private Long id; 30 | 31 | /** 32 | * 用户ID 33 | */ 34 | private Long userId; 35 | 36 | /** 37 | * 省 38 | */ 39 | private String province; 40 | 41 | /** 42 | * 市 43 | */ 44 | private String city; 45 | 46 | /** 47 | * 县/区 48 | */ 49 | private String town; 50 | 51 | /** 52 | * 手机 53 | */ 54 | private String mobile; 55 | 56 | /** 57 | * 详细地址 58 | */ 59 | private String street; 60 | 61 | /** 62 | * 联系人 63 | */ 64 | private String contact; 65 | 66 | /** 67 | * 是否是默认 1默认 0否 68 | */ 69 | private Integer isDefault; 70 | 71 | /** 72 | * 备注 73 | */ 74 | private String notes; 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/domain/po/User.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.domain.po; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.hmall.user.enums.UserStatus; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | import java.io.Serializable; 12 | import java.time.LocalDateTime; 13 | 14 | /** 15 | *16 | * 用户表 17 | *
18 | * 19 | * @author 虎哥 20 | * @since 2023-05-05 21 | */ 22 | @Data 23 | @EqualsAndHashCode(callSuper = false) 24 | @Accessors(chain = true) 25 | @TableName("user") 26 | public class User implements Serializable { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | @TableId(value = "id", type = IdType.AUTO) 31 | private Long id; 32 | 33 | /** 34 | * 用户名 35 | */ 36 | private String username; 37 | 38 | /** 39 | * 密码,加密存储 40 | */ 41 | private String password; 42 | 43 | /** 44 | * 注册手机号 45 | */ 46 | private String phone; 47 | 48 | /** 49 | * 创建时间 50 | */ 51 | private LocalDateTime createTime; 52 | 53 | private LocalDateTime updateTime; 54 | 55 | /** 56 | * 使用状态(1正常 2冻结) 57 | */ 58 | private UserStatus status; 59 | 60 | /** 61 | * 账户余额 62 | */ 63 | private Integer balance; 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/domain/vo/UserLoginVO.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.domain.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserLoginVO { 7 | private String token; 8 | private Long userId; 9 | private String username; 10 | private Integer balance; 11 | } 12 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/enums/UserStatus.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.enums; 2 | 3 | import com.baomidou.mybatisplus.annotation.EnumValue; 4 | import com.hmall.common.exception.BadRequestException; 5 | import lombok.Getter; 6 | 7 | @Getter 8 | public enum UserStatus { 9 | FROZEN(0, "禁止使用"), 10 | NORMAL(1, "已激活"), 11 | ; 12 | @EnumValue 13 | int value; 14 | String desc; 15 | 16 | UserStatus(Integer value, String desc) { 17 | this.value = value; 18 | this.desc = desc; 19 | } 20 | 21 | public static UserStatus of(int value) { 22 | if (value == 0) { 23 | return FROZEN; 24 | } 25 | if (value == 1) { 26 | return NORMAL; 27 | } 28 | throw new BadRequestException("账户状态错误"); 29 | } 30 | } -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/mapper/AddressMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.hmall.user.domain.po.Address; 5 | 6 | 7 | /** 8 | *9 | * Mapper 接口 10 | *
11 | * 12 | * @author 虎哥 13 | * @since 2023-05-05 14 | */ 15 | public interface AddressMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | 5 | import com.hmall.user.domain.po.User; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Update; 8 | 9 | /** 10 | *11 | * 用户表 Mapper 接口 12 | *
13 | * 14 | * @author 虎哥 15 | * @since 2023-05-05 16 | */ 17 | public interface UserMapper extends BaseMapper9 | * 服务类 10 | *
11 | * 12 | * @author 虎哥 13 | * @since 2023-05-05 14 | */ 15 | public interface IAddressService extends IService { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/hmall/user/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.hmall.user.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.hmall.user.domain.dto.LoginFormDTO; 5 | import com.hmall.user.domain.po.User; 6 | import com.hmall.user.domain.vo.UserLoginVO; 7 | 8 | /** 9 | *10 | * 用户表 服务类 11 | *
12 | * 13 | * @author 虎哥 14 | * @since 2023-05-05 15 | */ 16 | public interface IUserService extends IService12 | * 服务实现类 13 | *
14 | * 15 | * @author 虎哥 16 | * @since 2023-05-05 17 | */ 18 | @Service 19 | public class AddressServiceImpl extends ServiceImpl