├── sell
├── README.md
└── src
│ ├── main
│ ├── resources
│ │ ├── application.yml
│ │ ├── static
│ │ │ ├── mp3
│ │ │ │ └── song.mp3
│ │ │ ├── pay.html
│ │ │ └── api
│ │ │ │ └── seller.json
│ │ ├── templates
│ │ │ ├── pay
│ │ │ │ ├── success.ftl
│ │ │ │ └── create.ftl
│ │ │ ├── common
│ │ │ │ ├── header.ftl
│ │ │ │ ├── error.ftl
│ │ │ │ ├── success.ftl
│ │ │ │ └── nav.ftl
│ │ │ ├── category
│ │ │ │ ├── index.ftl
│ │ │ │ └── list.ftl
│ │ │ ├── order
│ │ │ │ └── detail.ftl
│ │ │ └── product
│ │ │ │ └── index.ftl
│ │ ├── mapper
│ │ │ └── ProductCategoryMapper.xml
│ │ ├── application-dev.yml
│ │ ├── application-prod.yml
│ │ └── logback-spring.xml
│ └── java
│ │ └── cn
│ │ └── chenhaoxiang
│ │ ├── enums
│ │ ├── CodeEnum.java
│ │ ├── PayStatusEnum.java
│ │ ├── ProductStatusEnum.java
│ │ ├── OrderStausEnum.java
│ │ └── ResultEnum.java
│ │ ├── exception
│ │ ├── SellAuthorizeException.java
│ │ ├── SellException.java
│ │ └── ResponseBankException.java
│ │ ├── constans
│ │ ├── RedisConstans.java
│ │ └── CookieConstant.java
│ │ ├── service
│ │ ├── PushMessageService.java
│ │ ├── BuyerService.java
│ │ ├── SellerService.java
│ │ ├── SeckillService.java
│ │ ├── PayService.java
│ │ ├── impl
│ │ │ ├── SellerServiceImpl.java
│ │ │ ├── ProductCategoryServiceImpl.java
│ │ │ ├── BuyerServiceImpl.java
│ │ │ ├── PushMessageServiceImpl.java
│ │ │ ├── SeckillServiceImpl.java
│ │ │ └── PayServiceImpl.java
│ │ ├── ProductCategoryService.java
│ │ ├── OrderService.java
│ │ ├── ProductInfoService.java
│ │ └── RedisLock.java
│ │ ├── dao
│ │ ├── SellerInfoDao.java
│ │ ├── OrderDetailDao.java
│ │ ├── ProductInfoDao.java
│ │ ├── ProductCategoryDao.java
│ │ └── OrderMasterDao.java
│ │ ├── dataObject
│ │ ├── SellerInfo.java
│ │ ├── OrderDetail.java
│ │ ├── dao
│ │ │ └── ProductCategoryMyBatisDao.java
│ │ ├── ProductCategory.java
│ │ ├── OrderMaster.java
│ │ ├── ProductInfo.java
│ │ └── mapper
│ │ │ └── ProductCategoryMapper.java
│ │ ├── SellApplication.java
│ │ ├── utils
│ │ ├── KeyUtil.java
│ │ ├── MathUtil.java
│ │ ├── EnumUtil.java
│ │ ├── ResultVOUtil.java
│ │ ├── JsonUtil.java
│ │ ├── serializer
│ │ │ └── Date2LongSerializer.java
│ │ └── CookieUtil.java
│ │ ├── dto
│ │ ├── CartDTO.java
│ │ └── OrderDTO.java
│ │ ├── form
│ │ ├── ProductCategoryForm.java
│ │ ├── OrderForm.java
│ │ └── ProductForm.java
│ │ ├── config
│ │ ├── ProjectUrlConfig.java
│ │ ├── WechatAccountConfig.java
│ │ ├── WechatMpConfig.java
│ │ ├── WechatOpenConfig.java
│ │ ├── WechatPayConfig.java
│ │ └── WebSocketConfig.java
│ │ ├── vo
│ │ ├── ProductVO.java
│ │ ├── ResultVO.java
│ │ └── ProductInfoVO.java
│ │ ├── converter
│ │ ├── OrderMaster2OrderDTOConverter.java
│ │ └── OrderForm2OrderDTOConverter.java
│ │ ├── controller
│ │ ├── WeixinController.java
│ │ ├── SeckullController.java
│ │ ├── PayController.java
│ │ ├── SellerCategoryController.java
│ │ ├── SellerUserController.java
│ │ ├── BuyerProductController.java
│ │ └── SellerOrderController.java
│ │ ├── handler
│ │ ├── HandshakeInterceptor.java
│ │ └── SellExceptionHandler.java
│ │ └── aspect
│ │ └── SellerAuthorizeAspect.java
│ └── test
│ └── java
│ └── cn
│ └── chenhaoxiang
│ ├── SellApplicationTests.java
│ ├── service
│ └── impl
│ │ ├── PushMessageServiceImplTest.java
│ │ ├── SellerServiceImplTest.java
│ │ ├── PayServiceImplTest.java
│ │ ├── ProductCategoryServiceImplTest.java
│ │ ├── ProductInfoServiceImplTest.java
│ │ └── OrderServiceImplTest.java
│ ├── dataObject
│ ├── dao
│ │ └── ProductCategoryDaoTest.java
│ └── mapper
│ │ └── ProductCategoryMapperTest.java
│ ├── LoggerTest.java
│ └── dao
│ ├── SellerInfoDaoTest.java
│ ├── OrderDetailDaoTest.java
│ ├── ProductInfoDaoTest.java
│ ├── OrderMasterDaoTest.java
│ └── ProductCategoryDaoTest.java
├── .gitignore
├── javadoc
└── sell
│ ├── javadoc.bat
│ ├── packages
│ ├── package-list
│ ├── script.js
│ ├── cn
│ └── chenhaoxiang
│ │ ├── package-frame.html
│ │ ├── aspect
│ │ └── package-frame.html
│ │ ├── dataObject
│ │ ├── dao
│ │ │ └── package-frame.html
│ │ ├── mapper
│ │ │ └── package-frame.html
│ │ └── package-frame.html
│ │ ├── utils
│ │ ├── serializer
│ │ │ └── package-frame.html
│ │ └── package-frame.html
│ │ ├── dto
│ │ └── package-frame.html
│ │ ├── handler
│ │ └── package-frame.html
│ │ ├── vo
│ │ └── package-frame.html
│ │ ├── converter
│ │ └── package-frame.html
│ │ ├── constans
│ │ └── package-frame.html
│ │ ├── form
│ │ └── package-frame.html
│ │ ├── exception
│ │ └── package-frame.html
│ │ ├── enums
│ │ └── package-frame.html
│ │ ├── config
│ │ └── package-frame.html
│ │ ├── dao
│ │ ├── package-frame.html
│ │ └── package-use.html
│ │ ├── service
│ │ ├── impl
│ │ │ └── package-frame.html
│ │ └── package-frame.html
│ │ ├── controller
│ │ └── package-frame.html
│ │ └── package-use.html
│ ├── index.html
│ ├── overview-frame.html
│ └── deprecated-list.html
├── commit-to-master.sh
├── README.md
└── API.md
/sell/README.md:
--------------------------------------------------------------------------------
1 | 微信点餐系统
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### IntelliJ IDEA ###
2 | /sell/.idea
3 | *.iws
4 | *.iml
5 | *.ipr
6 |
7 | /sell/target
--------------------------------------------------------------------------------
/javadoc/sell/javadoc.bat:
--------------------------------------------------------------------------------
1 | "C:\Program Files\Java\jdk1.8.0_31\jre\..\bin\javadoc.exe" @options @packages
--------------------------------------------------------------------------------
/sell/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: dev
4 | # 默认的配置文件
--------------------------------------------------------------------------------
/sell/src/main/resources/static/mp3/song.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenhaoxiang/WeChatOrderSystem/HEAD/sell/src/main/resources/static/mp3/song.mp3
--------------------------------------------------------------------------------
/sell/src/main/resources/templates/pay/success.ftl:
--------------------------------------------------------------------------------
1 |
| 类目Id | 18 |名称 | 19 |type | 20 |创建时间 | 21 |修改时间 | 22 |操作 | 23 |
|---|---|---|---|---|---|
| ${productCategory.categoryId} | 29 |${productCategory.categoryName} | 30 |${productCategory.categoryType} | 31 |${productCategory.createTime} | 32 |${productCategory.updateTime} | 33 |34 | 修改 35 | | 36 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /sell/src/main/resources/templates/order/detail.ftl: -------------------------------------------------------------------------------- 1 | 2 | <#include "../common/header.ftl"> 3 | 4 |
| 16 | 订单ID 17 | | 18 |19 | 订单总金额 20 | | 21 |
|---|---|
| 26 | ${orderDTO.orderId} 27 | | 28 |29 | ${orderDTO.orderAmount} 30 | | 31 |
| 商品ID | 42 |商品名称 | 43 |单价 | 44 |数量 | 45 |总额 | 46 |
|---|---|---|---|---|
| 52 | ${orderDetail.productId} 53 | | 54 |55 | ${orderDetail.productName} 56 | | 57 |58 | ${orderDetail.productPrice} 59 | | 60 |61 | ${orderDetail.productQuantity} 62 | | 63 |64 | ${orderDetail.productQuantity * orderDetail.productPrice} 65 | | 66 |
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.
125 | 126 | 127 | -------------------------------------------------------------------------------- /sell/src/test/java/cn/chenhaoxiang/service/impl/OrderServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package cn.chenhaoxiang.service.impl; 2 | 3 | import cn.chenhaoxiang.dataObject.OrderDetail; 4 | import cn.chenhaoxiang.dto.OrderDTO; 5 | import cn.chenhaoxiang.enums.OrderStausEnum; 6 | import cn.chenhaoxiang.enums.PayStatusEnum; 7 | import cn.chenhaoxiang.service.OrderService; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.junit.Assert; 10 | import org.junit.Test; 11 | import org.junit.runner.RunWith; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.boot.test.context.SpringBootTest; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.data.domain.PageRequest; 16 | import org.springframework.test.context.junit4.SpringRunner; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import static org.junit.Assert.*; 22 | 23 | /** 24 | * Created with IntelliJ IDEA. 25 | * User: 陈浩翔. 26 | * Date: 2018/1/14. 27 | * Time: 下午 11:22. 28 | * Explain: 29 | */ 30 | @RunWith(SpringRunner.class) 31 | @SpringBootTest 32 | @Slf4j 33 | public class OrderServiceImplTest { 34 | @Autowired 35 | private OrderServiceImpl orderService; 36 | private final String BUYER_OPENID ="110110"; 37 | private final String ORDER_ID = "1515944601506656672"; 38 | @Test 39 | public void create() throws Exception { 40 | OrderDTO orderDTO = new OrderDTO(); 41 | orderDTO.setBuyerName("陈浩翔"); 42 | orderDTO.setBuyerAddress("湖南长沙"); 43 | orderDTO.setBuyerPhone("123456789012"); 44 | orderDTO.setBuyerOpenid(BUYER_OPENID); 45 | 46 | //购物车 47 | ListCopyright © 2018 Pivotal Software, Inc.. All rights reserved.
125 | 126 | 127 | -------------------------------------------------------------------------------- /sell/src/main/java/cn/chenhaoxiang/controller/SellerOrderController.java: -------------------------------------------------------------------------------- 1 | package cn.chenhaoxiang.controller; 2 | 3 | import cn.chenhaoxiang.dto.OrderDTO; 4 | import cn.chenhaoxiang.enums.ResultEnum; 5 | import cn.chenhaoxiang.exception.SellException; 6 | import cn.chenhaoxiang.service.OrderService; 7 | import lombok.extern.slf4j.Slf4j; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.data.domain.PageRequest; 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.web.bind.annotation.GetMapping; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.servlet.ModelAndView; 16 | 17 | import java.util.Map; 18 | 19 | /** 20 | * Created with IntelliJ IDEA. 21 | * User: 陈浩翔. 22 | * Date: 2018/1/21. 23 | * Time: 下午 2:28. 24 | * Explain: 25 | */ 26 | @Controller //展示页面 27 | @RequestMapping("/seller/order") 28 | @Slf4j 29 | public class SellerOrderController { 30 | 31 | @Autowired 32 | private OrderService orderService; 33 | /** 34 | * 订单列表 35 | * @param page 第几页,从第一页开始 36 | * @param size 一页有多少数据 37 | * @return 38 | */ 39 | @GetMapping("/list") 40 | public ModelAndView list(@RequestParam(value = "page",defaultValue = "1")Integer page, 41 | @RequestParam(value = "size",defaultValue = "10")Integer size, 42 | MapCopyright © 2018 Pivotal Software, Inc.. All rights reserved.
125 | 126 | 127 | --------------------------------------------------------------------------------