移出多余的 onemall 归档模块
parent
5f513bff9f
commit
81340a636b
|
@ -1,34 +0,0 @@
|
|||
如下是 onemall 的功能列表。
|
||||
|
||||
* 当功能被完成时,会标记已完成。
|
||||
* 未完成的功能,欢迎一起来开发,特别是【待认领】的任务。
|
||||
|
||||
- [x] 首页
|
||||
- [x] 首页广告
|
||||
- [x] 商品推荐(手动)
|
||||
- 商品相关
|
||||
- [x] 分类列表
|
||||
- [x] 商品搜索
|
||||
- [x] 商品列表(基于分类)
|
||||
- [ ] 商品列表(基于促销活动)
|
||||
- [x] 商品详情
|
||||
- [ ] 商品收藏 @笑笑生
|
||||
- 订单相关
|
||||
- [x] 下单(直接购买)
|
||||
- [x] 下单(购物车购买)
|
||||
- [ ] 下单(拼团) @大太阳
|
||||
- [x] 订单列表
|
||||
- [x] 订单详情
|
||||
- [x] 支付
|
||||
- [ ] 退款
|
||||
- [x] 购物车
|
||||
- [x] 收获地址
|
||||
- 营销相关
|
||||
- [x] 优惠劵
|
||||
- [ ] 优惠码【待认领】
|
||||
- 用户相关
|
||||
- [x] 登陆
|
||||
- [x] 注册
|
||||
- [x] 个人信息
|
||||
- [ ] 手机改绑
|
||||
- [ ] 微信登陆 @To0R𓃰
|
|
@ -1,60 +0,0 @@
|
|||
如下是 onemall 的功能列表。
|
||||
|
||||
* 当功能被完成时,会标记已完成。
|
||||
* 未完成的功能,欢迎一起来开发,特别是【待认领】的任务。
|
||||
|
||||
- [ ] 概述 TODO【待认领】
|
||||
- [ ] 数据分析【待认领】
|
||||
- [ ] 商品分析 【@zhenxianyimeng】
|
||||
- [ ] 店铺资产【待认领】
|
||||
- [ ] 支付单 20% 【待认领】
|
||||
- [ ] 退款单 20% 【待认领】
|
||||
- TODO 需要补充
|
||||
- [ ] 店铺装修【迫切需要靠谱前端一起做】
|
||||
- [ ] H5 装修
|
||||
- [ ] 小程序装修
|
||||
- [ ] 自定义页面
|
||||
- [ ] 商品管理
|
||||
- [x] 发布商品
|
||||
- [x] 商品列表
|
||||
- [x] 展示类目
|
||||
- [ ] 品牌管理【开发中 @黑子】
|
||||
- [ ] 商品标签
|
||||
- [X] 商品规格页面
|
||||
- [ ] 订单管理
|
||||
- [x] 销售单
|
||||
- [x] 售后单
|
||||
- [ ] 订单评价【开发中 @wang171776704】
|
||||
- [ ] 会员管理
|
||||
- [ ] 会员资料 【开发中 @nengjie】
|
||||
- [ ] 会员等级
|
||||
- [ ] 会员积分
|
||||
- [ ] 用户标签
|
||||
- TODO 需要补充
|
||||
- [ ] 营销管理
|
||||
- [x] 首页广告
|
||||
- [x] 商品推荐
|
||||
- [x] 优惠劵
|
||||
- [ ] 优惠码【开发中 @native8623 2019-05-17】
|
||||
- [ ] 满减送 20% 【待认领】
|
||||
- [ ] 限制折扣 20% 【待认领】
|
||||
- [ ] 多人拼团【认领 @mijiu 2019-06-05】
|
||||
- [ ] 积分商城
|
||||
- [ ] 问卷调查
|
||||
- [ ] 幸运大转盘
|
||||
- [ ] 分销管理
|
||||
- [ ] 分销设置
|
||||
- [ ] 分销员管理
|
||||
- [ ] 提现管理
|
||||
- [ ] 系统管理
|
||||
- [x] 员工管理
|
||||
- [x] 角色管理 <!--【前端页面需要细化下】-->
|
||||
- [x] 权限管理 <!--【前端页面需要细化下】-->
|
||||
- [x] 部门管理 <!--【员工页面部门搜索需要优化】-->
|
||||
- [x] 数据字典
|
||||
- [x] 短信管理
|
||||
- [X] 短信模板
|
||||
- [ ] 短信发送日志【研发中 小范】
|
||||
- [ ] 员工操作日志
|
||||
- [ ] 访问日志【待认领】
|
||||
- [ ] 异常日志【待认领】
|
|
@ -1,190 +0,0 @@
|
|||
> 艿艿:本文暂时会写的比较简洁,如果有不懂的地方,请来[「交流群」](http://www.iocoder.cn/mall-user-group/?vip&gitee),艿艿来帮你解决。
|
||||
>
|
||||
> 交流群,我们提供了我们自己在使用的开发环境,搭建调试环境会更简便。
|
||||
|
||||
# 1. 概述
|
||||
|
||||
> 艿艿:本文暂时会写的比较简洁,如果有不懂的地方,请来[「交流群」](http://www.iocoder.cn/mall-user-group/?vip&gitee),艿艿来帮你解决。
|
||||
|
||||
本文,我们希望能带着胖友,快速搭建一个开发/调试环境。总的来说,我们需要安装如下东西:
|
||||
|
||||
* 后端
|
||||
* JDK 8+
|
||||
* Maven
|
||||
* IntelliJ IDEA
|
||||
|
||||
* 前端
|
||||
* NPM
|
||||
|
||||
# 2. 源码拉取
|
||||
|
||||
使用 IntelliJ IDEA 从 <https://gitee.com/zhijiantianya/onemall> 。拉取完成后,Maven 会下载依赖包,可能会花费一些时间,耐心等待下。
|
||||
|
||||
> 艿艿:也不要瞎等,咱继续顺着本文往下走。
|
||||
|
||||
# 3. MySQL
|
||||
|
||||
① 安装 MySQL 数据库
|
||||
|
||||
* Windows :参考 [《Windows 安装 MySQL》](https://juejin.im/post/5bdab0645188251e753c66f8)
|
||||
* Mac :参考 [《Mac 下安装与配置 MySQL》](https://www.jianshu.com/p/a8e4068a7a8a)
|
||||
|
||||
② 导入 SQL
|
||||
|
||||
将 [docs/sql](https://gitee.com/zhijiantianya/onemall/tree/master/docs/sql) 下的 SQL ,逐个导入到数据库中。
|
||||
|
||||
③ 修改项目中的 MySQL 配置
|
||||
|
||||
在 IDEA 中,搜索每个 `xxx-service-impl` 项目下的 `application.yaml` 文件,将数据库配置修改成连接你的。如下:
|
||||
|
||||
```YAML
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://s1.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 请修改成你本地的 MySQL url
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root # 请修改成你本地的 MySQL username
|
||||
password: zhuyang # 请修改成你本地的 MySQL password
|
||||
```
|
||||
|
||||
# 4. Zookeeper
|
||||
|
||||
① 安装 Zookeeper
|
||||
|
||||
* Windows :参考 [《Windows 下 ZooKeeper 的配置和启动步骤 —— 单机模式》](https://www.jianshu.com/p/66857cbccbd3)
|
||||
* Mac :参考 [《Zookeeper 安装及配置(Mac)》](https://www.jianshu.com/p/0ba61bf7149f)
|
||||
|
||||
② 修改项目中的 Zookeeper 配置
|
||||
|
||||
在 IDEA 中,搜索每个 `xxx-service-impl` 项目下的 `application.yaml` 文件,将 Zookeeper 配置修改成连接你的。如下:
|
||||
|
||||
```YAML
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: product-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181 # 请修改成你本地的 Zookeeper url
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.product.service
|
||||
```
|
||||
|
||||
# 5. RocketMQ
|
||||
|
||||
① 安装 RocketMQ
|
||||
|
||||
* Windows :参考 [《RocketMQ 入门 —— 安装以及快速入门》](http://www.iocoder.cn/RocketMQ/start/install/?vip&gitee)
|
||||
* Mac :参考 [《RocketMQ 入门 —— 安装以及快速入门》](http://www.iocoder.cn/RocketMQ/start/install/?vip&gitee)
|
||||
|
||||
② 修改项目中的 RocketMQ 配置
|
||||
|
||||
在 IDEA 中,搜索每个 `xxx-service-impl` 项目下的 `application.yaml` 文件,将 RocketMQ 配置修改成连接你的。如下:
|
||||
|
||||
```YAML
|
||||
rocketmq:
|
||||
name-server: 127.0.0.1:9876 # 请修改成你本地的 RocketMQ url
|
||||
producer:
|
||||
group: product-producer-group
|
||||
```
|
||||
|
||||
# 6. XXL-Job
|
||||
|
||||
> 艿艿:这个中间件的安装,是可选项。如果不安装,只是定时任务无法执行。
|
||||
|
||||
TODO 未完成。建议先跳过。
|
||||
|
||||
① 安装 XXL-Job
|
||||
|
||||
参考 [《分布式任务调度平台 XXL-JOB》](http://www.xuxueli.com/xxl-job/#/) 官方文档。
|
||||
|
||||
② 修改项目中的 XXL-Job 配置
|
||||
|
||||
在 IDEA 中,搜索每个 `xxx-service-impl` 项目下的 `application-dev.yaml` 文件,将 XXL-Job 配置修改成连接你的。如下:
|
||||
|
||||
```YAML
|
||||
# xxl-job
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
addresses: http://127.0.0.1:18079/ # 请修改成你本地的 XXL-Job url
|
||||
executor:
|
||||
appname: pay-job-executor
|
||||
ip:
|
||||
port: 0
|
||||
logpath: /Users/yunai/logs/xxl-job/ # 请修改成你希望存放日志的目录
|
||||
logretentiondays: 1
|
||||
accessToken:
|
||||
```
|
||||
|
||||
③ 配置项目中的每个作业
|
||||
|
||||
TODO 芋艿,需要完善
|
||||
|
||||
# 7. Elasticsearch
|
||||
|
||||
① 安装 Elasticsearch
|
||||
|
||||
* Windows :参考 [《ElasticSearch 入门 第一篇:Windows 下安装ElasticSearch》](http://www.cnblogs.com/ljhdo/p/4887557.html)
|
||||
* Mac :参考 [《mac 安装 ElasticSearch 笔记》](https://www.jianshu.com/p/81b0b3a60c01)
|
||||
|
||||
因为需要中文分词,所以需要安装 [elasticsearch-analysis-ik](https://github.com/medcl/elasticsearch-analysis-ik) 插件。
|
||||
|
||||
② 修改项目中的 Elasticsearch 配置
|
||||
|
||||
在 IDEA 中,搜索`search-service-impl` 项目下的 `application.yaml` 文件,将 Elasticsearch 配置修改成连接你的。如下:
|
||||
|
||||
```YAML
|
||||
# es
|
||||
spring:
|
||||
data:
|
||||
elasticsearch:
|
||||
cluster-name: elasticsearch
|
||||
cluster-nodes: 180.167.213.26:9300 # 请修改成你本地的 Elasticsearch url
|
||||
repositories:
|
||||
enable: true
|
||||
```
|
||||
|
||||
# 8. 启动后端项目
|
||||
|
||||
在 IDEA 中,右键运行每个 `XXXApplication.java` 。例如说,`admin` 项目是 AdminApplication 。
|
||||
|
||||
是否启动成功,请查看 IDEA 输出的日志。
|
||||
|
||||
具体的启动顺序,是:
|
||||
|
||||
* SystemApplication
|
||||
* UserApplication
|
||||
* ProductApplication
|
||||
* PayApplication
|
||||
> 因为支付服务,涉及三方支付平台的配置。所以,需要艿艿后续提供简便的方案。TODO
|
||||
|
||||
* PromotionApplication
|
||||
* OrderApplication
|
||||
* SearchApplication
|
||||
|
||||
# 9. 启动前端项目
|
||||
|
||||
① 启动商城 H5 项目
|
||||
|
||||
在 `mobile-web` 项目下,执行 `npm start` 。
|
||||
|
||||
启动成功后,浏览器访问 <http://127.0.0.1:8000> 。
|
||||
|
||||
② 启动管理后台项目
|
||||
|
||||
在 `admin-web` 项目下,执行 `npm run start:no-mock` 。
|
||||
|
||||
启动成功后,浏览器访问 <http://127.0.0.1:8080> 。
|
||||
|
||||
# 10. 数据配置
|
||||
|
||||
TODO 芋艿
|
||||
|
||||
因为项目该配置完,是没有任何数据的。所以,需要操作对应的功能,添加数据。
|
||||
|
||||
# 233. 彩蛋
|
||||
|
||||
> 艿艿:本文暂时会写的比较简洁,如果有不懂的地方,请来[「交流群」](http://www.iocoder.cn/mall-user-group/?vip&gitee),艿艿来帮你解决。
|
|
@ -1,139 +0,0 @@
|
|||
-- ----------------------------
|
||||
-- Table structure for order_cancel
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_cancel`;
|
||||
CREATE TABLE `order_cancel` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`order_id` int(11) NOT NULL COMMENT '订单id',
|
||||
`order_no` varchar(50) NOT NULL COMMENT '订单编号',
|
||||
`reason` int(2) NOT NULL,
|
||||
`other_reason` varchar(100) DEFAULT NULL COMMENT '其他原因',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_exchange
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_exchange`;
|
||||
CREATE TABLE `order_exchange` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`order_id` int(11) NOT NULL,
|
||||
`order_no` varchar(50) NOT NULL,
|
||||
`sku_id` int(11) NOT NULL,
|
||||
`exchange_sku_id` int(11) NOT NULL COMMENT '换货商品id',
|
||||
`exchange_order_logistics_id` int(11) NOT NULL COMMENT '换货物流id',
|
||||
`receiver_order_logistics_id` int(11) NOT NULL COMMENT '收件地址',
|
||||
`order_reason_id` int(11) DEFAULT NULL COMMENT '换货原因',
|
||||
`reason` varchar(255) DEFAULT NULL COMMENT '换货原因 (其他的时候)',
|
||||
`payment_time` datetime DEFAULT NULL COMMENT '付款时间',
|
||||
`delivery_time` datetime DEFAULT NULL COMMENT '发货时间',
|
||||
`receiver_time` datetime DEFAULT NULL COMMENT '收货时间',
|
||||
`closing_time` datetime DEFAULT NULL COMMENT '成交时间',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`delete` smallint(2) DEFAULT NULL COMMENT '删除状态',
|
||||
`order_type` int(2) DEFAULT NULL COMMENT '订单类型 0、为 Order 订单 1、为 OrderItem 订单',
|
||||
`status` int(2) DEFAULT NULL COMMENT '状态 申请换货、申请成功、申请失败、换货中、换货成功',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_logistics
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_logistics`;
|
||||
CREATE TABLE `order_logistics` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`area_no` varchar(10) NOT NULL COMMENT '地区编号',
|
||||
`name` varchar(20) NOT NULL COMMENT '名称',
|
||||
`mobile` varchar(20) NOT NULL COMMENT '手机号',
|
||||
`address` varchar(255) NOT NULL COMMENT '详细地址',
|
||||
`logistics` int(2) NOT NULL COMMENT '物流商家',
|
||||
`logistics_no` varchar(20) NOT NULL COMMENT '物流单号',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of order_logistics
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `order_logistics` VALUES (24, '110101', 'Andy', '13302925934', '中二环,光电大厦11F 前台收', 1, '23123124123', '2019-04-11 22:50:31', NULL);
|
||||
INSERT INTO `order_logistics` VALUES (34, '110101', 'Andy', '13302925934', '中二环,光电大厦11F 前台收', 1, '314123123123', '2019-04-12 19:23:42', NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_logistics_detail
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_logistics_detail`;
|
||||
CREATE TABLE `order_logistics_detail` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`order_logistics_id` int(11) NOT NULL COMMENT '物流编号',
|
||||
`logistics_time` datetime NOT NULL COMMENT '物流时间',
|
||||
`logistics_information` varchar(20) NOT NULL COMMENT '物流信息',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_recipient
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_recipient`;
|
||||
CREATE TABLE `order_recipient` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`order_id` int(11) NOT NULL COMMENT '订单id',
|
||||
`area_no` varchar(20) NOT NULL COMMENT '区域编号',
|
||||
`name` varchar(20) NOT NULL COMMENT '收件人名称',
|
||||
`mobile` varchar(20) NOT NULL COMMENT '手机号',
|
||||
`type` int(2) NOT NULL COMMENT '快递方式',
|
||||
`address` varchar(250) NOT NULL COMMENT '地址详细',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_return
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_return`;
|
||||
CREATE TABLE `order_return` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`service_number` varchar(50) NOT NULL COMMENT '服务号',
|
||||
`order_id` int(11) NOT NULL COMMENT '订单编号',
|
||||
`order_no` varchar(50) NOT NULL COMMENT '订单号',
|
||||
`order_logistics_id` int(11) DEFAULT NULL COMMENT '物流 id',
|
||||
`refund_price` int(11) NOT NULL COMMENT '退回金额',
|
||||
`reason` int(11) NOT NULL COMMENT '退货原因',
|
||||
`describe` varchar(255) DEFAULT NULL COMMENT '换货原因 (其他的时候)',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`approval_time` datetime DEFAULT NULL COMMENT '同意时间',
|
||||
`refuse_time` datetime DEFAULT NULL COMMENT '拒绝时间',
|
||||
`logistics_time` datetime DEFAULT NULL COMMENT '物流时间(填写物流单号时间)',
|
||||
`receiver_time` datetime DEFAULT NULL COMMENT '收货时间',
|
||||
`closing_time` datetime DEFAULT NULL COMMENT '成交时间',
|
||||
`service_type` int(2) DEFAULT NULL COMMENT ' 1、退货 2、退款',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`status` int(2) NOT NULL COMMENT '状态 申请换货、申请成功、申请失败、退货中、退货成功',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for undo_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `undo_log`;
|
||||
CREATE TABLE `undo_log` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`branch_id` bigint(20) NOT NULL,
|
||||
`xid` varchar(100) NOT NULL,
|
||||
`rollback_info` longblob NOT NULL,
|
||||
`log_status` int(11) NOT NULL,
|
||||
`log_created` datetime NOT NULL,
|
||||
`log_modified` datetime NOT NULL,
|
||||
`ext` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;
|
|
@ -1,420 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>onemall</artifactId>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mall-dependencies</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>Maven Bom,定义 Onemall 项目的所有依赖的版本</description>
|
||||
|
||||
<!-- 属性 -->
|
||||
<properties>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<resource.delimiter>@</resource.delimiter>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
|
||||
<!-- 统一依赖管理 -->
|
||||
<spring.boot.version>2.2.5.RELEASE</spring.boot.version>
|
||||
<spring.cloud.version>Hoxton.SR1</spring.cloud.version>
|
||||
<spring.cloud.alibaba.version>2.2.1.RELEASE</spring.cloud.alibaba.version>
|
||||
<!-- Web 相关 -->
|
||||
<servlet.version>2.5</servlet.version>
|
||||
<knife4j.version>2.0.2</knife4j.version>
|
||||
<swagger.version>1.5.21</swagger.version>
|
||||
<springfox-swagger.version>2.9.2</springfox-swagger.version>
|
||||
<!-- DB 相关 -->
|
||||
<mysql-connector-java.version>5.1.46</mysql-connector-java.version>
|
||||
<druid.version>1.1.16</druid.version>
|
||||
<mybatis-spring-boot-starter.version>2.0.0</mybatis-spring-boot-starter.version>
|
||||
<mybatis.version>3.5.4</mybatis.version>
|
||||
<mybatis-plus.version>3.3.2</mybatis-plus.version>
|
||||
<spring-boot-starter-data-jest.version>3.2.5.RELEASE</spring-boot-starter-data-jest.version>
|
||||
<redisson.version>3.13.6</redisson.version>
|
||||
<!-- RPC 相关 -->
|
||||
<dubbo.version>2.7.7</dubbo.version>
|
||||
<!-- MQ 相关 -->
|
||||
<rocketmq-spring-boot-starter.version>2.1.1</rocketmq-spring-boot-starter.version>
|
||||
<!-- Job 相关 -->
|
||||
<xxl-job.version>2.2.0</xxl-job.version>
|
||||
<!-- Transaction 相关 -->
|
||||
<seata.version>1.1.0</seata.version>
|
||||
<!-- 云服务相关 -->
|
||||
<qiniu.version>7.2.18</qiniu.version>
|
||||
<aliyun-java-sdk-core.version>4.1.0</aliyun-java-sdk-core.version>
|
||||
<!-- 监控相关 -->
|
||||
<skywalking.version>8.0.1</skywalking.version>
|
||||
<spring-boot-admin-starter-client.version>2.2.2</spring-boot-admin-starter-client.version>
|
||||
<sentry.version>1.7.30</sentry.version>
|
||||
<!-- 工具类相关 -->
|
||||
<fastjson.version>1.2.56</fastjson.version>
|
||||
<hibernate-validator.version>6.0.16.Final</hibernate-validator.version>
|
||||
<hutool.version>5.2.5</hutool.version>
|
||||
<guava.version>27.0.1-jre</guava.version>
|
||||
<org.projectlombok.version>1.16.14</org.projectlombok.version>
|
||||
<org.mapstruct.version>1.5.3.Final</org.mapstruct.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- 统一依赖管理 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring.cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>common-framework</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-core</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!-- 自动化配置 Spring Data Jest -->
|
||||
<groupId>com.github.vanroy</groupId>
|
||||
<artifactId>spring-boot-starter-data-jest</artifactId>
|
||||
<version>${spring-boot-starter-data-jest.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
<version>${redisson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-mybatis</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-redis</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>${servlet.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-web</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${springfox-swagger.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-security-annotations</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-security-user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-security-admin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-swagger</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 相关 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo</artifactId>
|
||||
<version>${dubbo.version}</version>
|
||||
<!-- <version>2.7.8</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
<version>${dubbo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-dubbo</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency> <!-- TODO 需要思考下,归类到哪里 -->
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-system-error-code</artifactId> <!-- 错误码 -->
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MQ 相关 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
||||
<version>${rocketmq-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-rocketmq</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Job 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${xxl-job.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot-starter-xxl-job</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba.nacos/nacos-client -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.nacos</groupId>-->
|
||||
<!-- <artifactId>nacos-client</artifactId>-->
|
||||
<!-- <version>1.3.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- Transaction 相关 -->
|
||||
<dependency>
|
||||
<groupId>io.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
<version>${seata.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 监控相关 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-toolkit-trace</artifactId>
|
||||
<version>${skywalking.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin-starter-client.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-logback</artifactId>
|
||||
<version>${sentry.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.sentry</groupId>
|
||||
<artifactId>sentry-spring-boot-starter</artifactId>
|
||||
<version>${sentry.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 相关 -->
|
||||
|
||||
<!--- 日志相关 -->
|
||||
|
||||
<!-- 云服务相关 -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId> <!-- 七牛文件服务器 -->
|
||||
<version>${qiniu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId> <!-- 阿里云文件服务 -->
|
||||
<version>${aliyun-java-sdk-core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher -->
|
||||
<version>${org.mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>${org.mapstruct.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${org.projectlombok.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fasterxml.jackson.core</groupId>-->
|
||||
<!-- <artifactId>jackson-annotations</artifactId>-->
|
||||
<!-- <version>${jackson.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fasterxml.jackson.core</groupId>-->
|
||||
<!-- <artifactId>jackson-databind</artifactId>-->
|
||||
<!-- <version>${jackson.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<!-- hutool 工具类-->
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- 提供给 mapstruct 使用 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source> <!-- or higher, depending on your project -->
|
||||
<target>${java.version}</target> <!-- or higher, depending on your project -->
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${org.mapstruct.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${org.projectlombok.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,47 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.product;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuCreateReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuPageReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuRespVO;
|
||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuUpdateReqVO;
|
||||
import cn.iocoder.mall.managementweb.manager.product.ProductSpuManager;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.common.framework.vo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 商品 SPU Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product-spu")
|
||||
@Api(tags = "商品 SPU")
|
||||
@Validated
|
||||
public class ProductSpuController {
|
||||
|
||||
@Autowired
|
||||
private ProductSpuManager productSpuManager;
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得商品 SPU 分页")
|
||||
public CommonResult<PageResult<ProductSpuRespVO>> pageProductSpu(ProductSpuPageReqVO pageVO) {
|
||||
// 全部:无搜索条件
|
||||
// 在售中:visible = true && hasQuantity = true
|
||||
// 已售罄:visible = true && hasQuantity = false
|
||||
// 仓库中:visible = false
|
||||
return success(productSpuManager.pageProductSpu(pageVO));
|
||||
}
|
||||
|
||||
// TODO 芋艿,删除功能暂时不做。主要原因是,关联的数据太多。删除带来的问题会比较大
|
||||
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.product.vo.spu;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ApiModel("商品 SPU分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProductSpuPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "SPU 名字", notes = "模糊匹配", example = "艿艿")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "分类编号", example = "1024")
|
||||
private Integer cid;
|
||||
@ApiModelProperty(value = "是否上架商品", example = "true")
|
||||
private Boolean visible;
|
||||
@ApiModelProperty(value = "是否有库存", example = "true")
|
||||
private Boolean hasQuantity;
|
||||
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
### /user/page 成功
|
||||
GET http://127.0.0.1:18083/management-api/user/page?pageNo=1&pageSize=10
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Authorization: Bearer yudaoyuanma
|
||||
dubbo-tag: {{dubboTag}}
|
||||
|
||||
### /user/update 成功
|
||||
POST http://127.0.0.1:18083/management-api/user/update
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Authorization: Bearer yudaoyuanma
|
||||
dubbo-tag: {{dubboTag}}
|
||||
|
||||
id=31&username=user02&password=buzhidao&name=测试管理员&departmentId=1
|
||||
|
||||
### /user/update-status 成功
|
||||
POST http://127.0.0.1:18083/management-api/user/update-status
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Authorization: Bearer yudaoyuanma
|
||||
dubbo-tag: {{dubboTag}}
|
||||
|
||||
userId=243&status=2
|
||||
|
||||
### /user/update-status 失败,参数缺失
|
||||
POST http://127.0.0.1:18083/management-api/user/update-status
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Authorization: Bearer yudaoyuanma
|
||||
dubbo-tag: {{dubboTag}}
|
||||
|
||||
userId=31
|
||||
|
||||
###
|
|
@ -1,68 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.user;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserPageReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserRespVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserUpdateInfoReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserUpdateStatusReqVO;
|
||||
import cn.iocoder.mall.managementweb.manager.user.UserManager;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.common.framework.vo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 用户 Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
@Api(tags = "用户")
|
||||
@Validated
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserManager userManager;
|
||||
|
||||
@PostMapping("/update-info")
|
||||
@ApiOperation("更新用户信息")
|
||||
public CommonResult<Boolean> updateUserInfo(@Valid UserUpdateInfoReqVO updateInfoReqVO) {
|
||||
userManager.updateUserInfo(updateInfoReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/update-status")
|
||||
@ApiOperation("更新用户信息")
|
||||
public CommonResult<Boolean> updateUserStatus(@Valid UserUpdateStatusReqVO updateStatusReqVO) {
|
||||
userManager.updateUserStatus(updateStatusReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得用户")
|
||||
@ApiImplicitParam(name = "userId", value = "用户编号", required = true)
|
||||
public CommonResult<UserRespVO> getUser(@RequestParam("userId") Integer userId) {
|
||||
return success(userManager.getUser(userId));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("获得用户列表")
|
||||
@ApiImplicitParam(name = "userIds", value = "用户编号列表", required = true)
|
||||
public CommonResult<List<UserRespVO>> listUsers(@RequestParam("userIds") List<Integer> userIds) {
|
||||
return success(userManager.listUsers(userIds));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得用户分页")
|
||||
public CommonResult<PageResult<UserRespVO>> pageUser(UserPageReqVO pageVO) {
|
||||
return success(userManager.pageUser(pageVO));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.user.vo;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ApiModel("用户分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "昵称", example = "丑艿艿", notes = "模糊匹配")
|
||||
private String nickname;
|
||||
@ApiModelProperty(value = "状态", example = "1", notes = "见 CommonStatusEnum 枚举")
|
||||
private Integer status;
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.user.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.util.*;
|
||||
|
||||
@ApiModel("用户 Response VO")
|
||||
@Data
|
||||
public class UserRespVO {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "昵称", example = "丑艿艿")
|
||||
private String nickname;
|
||||
@ApiModelProperty(value = "头像", example = "http://www.iocoder.cn/xxx.jpg")
|
||||
private String avatar;
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "手机号", required = true, example = "15601691399")
|
||||
private String mobile;
|
||||
@ApiModelProperty(value = "注册 IP", required = true, example = "127.0.0.1")
|
||||
private String createIp;
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("用户更新信息 Request VO")
|
||||
@Data
|
||||
public class UserUpdateInfoReqVO {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "昵称", example = "臭艿艿")
|
||||
private String nickname;
|
||||
@ApiModelProperty(value = "头像", example = "http://www.iocoder.cn/nainainai.jpg")
|
||||
private String avatar;
|
||||
@ApiModelProperty(value = "手机号", example = "15601691300")
|
||||
private String mobile;
|
||||
@ApiModelProperty(value = "密码", example = "123456")
|
||||
private String password;
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.controller.user.vo;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel("用户更新状态 Request VO")
|
||||
@Data
|
||||
public class UserUpdateStatusReqVO {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true)
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 CommonStatusEnum 枚举")
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.manager.product;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.managementweb.controller.product.vo.attr.*;
|
||||
import cn.iocoder.mall.managementweb.convert.product.ProductAttrConvert;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.ProductAttrFeign;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyRespDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrValueRespDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格 Manager
|
||||
*/
|
||||
@Service
|
||||
public class ProductAttrKeyManager {
|
||||
|
||||
@Autowired
|
||||
private ProductAttrFeign productAttrFeign;
|
||||
/**
|
||||
* 创建商品规格键
|
||||
*
|
||||
* @param createVO 创建商品规格键 VO
|
||||
* @return 商品规格键
|
||||
*/
|
||||
public Integer createProductAttrKey(ProductAttrKeyCreateReqVO createVO) {
|
||||
CommonResult<Integer> createProductAttrKeyResult = productAttrFeign.createProductAttrKey(
|
||||
ProductAttrConvert.INSTANCE.convert(createVO));
|
||||
createProductAttrKeyResult.checkError();
|
||||
return createProductAttrKeyResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品规格键
|
||||
*
|
||||
* @param updateVO 更新商品规格键 VO
|
||||
*/
|
||||
public void updateProductAttrKey(ProductAttrKeyUpdateReqVO updateVO) {
|
||||
CommonResult<Boolean> updateProductAttrKeyResult = productAttrFeign.updateProductAttrKey(
|
||||
ProductAttrConvert.INSTANCE.convert(updateVO));
|
||||
updateProductAttrKeyResult.checkError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格键
|
||||
*
|
||||
* @param productAttrKeyId 商品规格键编号
|
||||
* @return 商品规格键
|
||||
*/
|
||||
public ProductAttrKeyRespVO getProductAttrKey(Integer productAttrKeyId) {
|
||||
CommonResult<ProductAttrKeyRespDTO> getProductAttrKeyResult = productAttrFeign.getProductAttrKey(productAttrKeyId);
|
||||
getProductAttrKeyResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convert(getProductAttrKeyResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格键列表
|
||||
*
|
||||
* @param productAttrKeyIds 商品规格键编号列表
|
||||
* @return 商品规格键列表
|
||||
*/
|
||||
public List<ProductAttrKeyRespVO> listProductAttrKeys(List<Integer> productAttrKeyIds) {
|
||||
CommonResult<List<ProductAttrKeyRespDTO>> listProductAttrKeyResult = productAttrFeign.listProductAttrKeys(productAttrKeyIds);
|
||||
listProductAttrKeyResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convertList(listProductAttrKeyResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格键分页
|
||||
*
|
||||
* @param pageVO 商品规格键分页查询
|
||||
* @return 商品规格键分页结果
|
||||
*/
|
||||
public PageResult<ProductAttrKeyRespVO> pageProductAttrKey(ProductAttrKeyPageReqVO pageVO) {
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKeyResult = productAttrFeign.pageProductAttrKey(
|
||||
ProductAttrConvert.INSTANCE.convert(pageVO));
|
||||
pageProductAttrKeyResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convertPage(pageProductAttrKeyResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建商品规格值
|
||||
*
|
||||
* @param createVO 创建商品规格值 VO
|
||||
* @return 商品规格值
|
||||
*/
|
||||
public Integer createProductAttrValue(ProductAttrValueCreateReqVO createVO) {
|
||||
CommonResult<Integer> createProductAttrValueResult = productAttrFeign.createProductAttrValue(
|
||||
ProductAttrConvert.INSTANCE.convert(createVO));
|
||||
createProductAttrValueResult.checkError();
|
||||
return createProductAttrValueResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品规格值
|
||||
*
|
||||
* @param updateVO 更新商品规格值 VO
|
||||
*/
|
||||
public void updateProductAttrValue(ProductAttrValueUpdateReqVO updateVO) {
|
||||
CommonResult<Boolean> updateProductAttrValueResult = productAttrFeign.updateProductAttrValue(
|
||||
ProductAttrConvert.INSTANCE.convert(updateVO));
|
||||
updateProductAttrValueResult.checkError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格值
|
||||
*
|
||||
* @param productAttrValueId 商品规格值编号
|
||||
* @return 商品规格值
|
||||
*/
|
||||
public ProductAttrValueRespVO getProductAttrValue(Integer productAttrValueId) {
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValueResult = productAttrFeign.getProductAttrValue(productAttrValueId);
|
||||
getProductAttrValueResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convert(getProductAttrValueResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品规格值列表
|
||||
*
|
||||
* @param queryReqVO 商品规格值的列表查询条件 VO
|
||||
* @return 商品规格值列表
|
||||
*/
|
||||
public List<ProductAttrValueRespVO> listProductAttrValues(ProductAttrValueListQueryReqVO queryReqVO) {
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValueResult = productAttrFeign.listProductAttrValues(
|
||||
ProductAttrConvert.INSTANCE.convert(queryReqVO));
|
||||
listProductAttrValueResult.checkError();
|
||||
return ProductAttrConvert.INSTANCE.convertList02(listProductAttrValueResult.getData());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
package cn.iocoder.mall.managementweb.manager.user;
|
||||
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserPageReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserRespVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserUpdateInfoReqVO;
|
||||
import cn.iocoder.mall.managementweb.controller.user.vo.UserUpdateStatusReqVO;
|
||||
import cn.iocoder.mall.managementweb.convert.user.UserConvert;
|
||||
import cn.iocoder.mall.userservice.rpc.user.UserFeign;
|
||||
import cn.iocoder.mall.userservice.rpc.user.dto.UserRespDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户 Manager
|
||||
*/
|
||||
@Service
|
||||
public class UserManager {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserFeign userFeign;
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param updateInfoReqVO 更新用户信息 VO
|
||||
*/
|
||||
public void updateUserInfo(UserUpdateInfoReqVO updateInfoReqVO) {
|
||||
CommonResult<Boolean> updateUserResult = userFeign.updateUser(UserConvert.INSTANCE.convert(updateInfoReqVO));
|
||||
updateUserResult.checkError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户状态
|
||||
*
|
||||
* @param updateStatusReqVO 更新用户状态 VO
|
||||
*/
|
||||
public void updateUserStatus(UserUpdateStatusReqVO updateStatusReqVO) {
|
||||
CommonResult<Boolean> updateUserResult = userFeign.updateUser(UserConvert.INSTANCE.convert(updateStatusReqVO));
|
||||
updateUserResult.checkError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得用户
|
||||
*
|
||||
* @param userId 用户编号
|
||||
* @return 用户
|
||||
*/
|
||||
public UserRespVO getUser(Integer userId) {
|
||||
CommonResult<UserRespDTO> getUserResult = userFeign.getUser(userId);
|
||||
getUserResult.checkError();
|
||||
return UserConvert.INSTANCE.convert(getUserResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得用户列表
|
||||
*
|
||||
* @param userIds 用户编号列表
|
||||
* @return 用户列表
|
||||
*/
|
||||
public List<UserRespVO> listUsers(List<Integer> userIds) {
|
||||
CommonResult<List<UserRespDTO>> listUserResult = userFeign.listUsers(userIds);
|
||||
listUserResult.checkError();
|
||||
return UserConvert.INSTANCE.convertList(listUserResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得用户分页
|
||||
*
|
||||
* @param pageVO 用户分页查询
|
||||
* @return 用户分页结果
|
||||
*/
|
||||
public PageResult<UserRespVO> pageUser(UserPageReqVO pageVO) {
|
||||
CommonResult<PageResult<UserRespDTO>> pageUserResult = userFeign.pageUser(UserConvert.INSTANCE.convert(pageVO));
|
||||
pageUserResult.checkError();
|
||||
return UserConvert.INSTANCE.convertPage(pageUserResult.getData());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.comment;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复类型
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-06-01 10:30:00
|
||||
*/
|
||||
public enum OrderCommentRelpyTypeEnum {
|
||||
|
||||
REPLY_REPLY(0, "回复的回复"),
|
||||
COMMENT_REPLY(1, "评论的回复");
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private Integer value;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
OrderCommentRelpyTypeEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.comment;
|
||||
|
||||
/**
|
||||
* 订单评论状态
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-06-15 14:26
|
||||
*/
|
||||
public enum OrderCommentStatusEnum {
|
||||
|
||||
WAIT_COMMENT(0, "待评论"),
|
||||
SUCCESS_COMMENT(1, "评论成功");
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private Integer value;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
OrderCommentStatusEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.comment;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复 - 回复的用户的类型
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-19 15:19
|
||||
*/
|
||||
public enum OrderReplyUserTypeEnum {
|
||||
|
||||
USER(0, "普通用户"),
|
||||
MERCHANT(1, "商家");
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private Integer value;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
OrderReplyUserTypeEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 字典 keys 定义
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-14 17:46
|
||||
*/
|
||||
public class DictKeyConstants {
|
||||
|
||||
/**
|
||||
* 订单 - status
|
||||
*/
|
||||
public static final String ORDER_STATUS = "order_status";
|
||||
/**
|
||||
* 订单 - 物流商家
|
||||
*/
|
||||
public static final String ORDER_LOGISTICS_COMPANY = "logistics_company";
|
||||
/**
|
||||
* 订单 - 退货原因
|
||||
*/
|
||||
public static final String ORDER_RETURN_REASON = "order_return_reason";
|
||||
/**
|
||||
* 订单退货 - 退货类型
|
||||
*/
|
||||
public static final String ORDER_RETURN_SERVICE_TYPE = "order_return_service_type";
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
import cn.iocoder.common.framework.enums.ModuleErrorCodeInterval;
|
||||
|
||||
/**
|
||||
* 错误码区间
|
||||
*
|
||||
* 当前模块化区间:[1-008-000-000 ~ 1-008-000-000]
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-23 11:35
|
||||
*/
|
||||
public class ErrorCodeInterval extends ModuleErrorCodeInterval {
|
||||
|
||||
// OrderErrorCodeEnum 错误码区间 [1-008-000-000 ~ 1-008-000-000]
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 物流信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 22:33
|
||||
*/
|
||||
public enum LogisticsEnum {
|
||||
|
||||
LOGISTICS_1(1, "顺丰快递"),
|
||||
LOGISTICS_2(2, "圆通快递"),
|
||||
LOGISTICS_3(3, "申通快递"),
|
||||
LOGISTICS_4(4, "韵答快递"),
|
||||
LOGISTICS_5(5, "天天快递"),
|
||||
LOGISTICS_6(6, "EMS中国邮政"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private Integer value;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
LogisticsEnum(int value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* MQ 订阅消息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 15:04
|
||||
*/
|
||||
public class MQConstants {
|
||||
|
||||
/**
|
||||
* 订单 - 创建成功 消息
|
||||
*/
|
||||
public static final String ORDER_CREATE_SUCCESS = "order.orderCreateSuccess";
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单取消原因
|
||||
* order_cancel_reasons
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:08
|
||||
*/
|
||||
public enum OrderCancelReasonsEnum {
|
||||
|
||||
CANCEL_1(1, "无法联系上买家"),
|
||||
CANCEL_2(2, "买家误拍或重拍了"),
|
||||
CANCEL_3(3, "买家无诚意完成交易"),
|
||||
CANCEL_4(4, "已通过银行线下汇款"),
|
||||
CANCEL_5(5, "已通过同城见面交易"),
|
||||
CANCEL_6(6, "已通过货到付款交易"),
|
||||
CANCEL_7(7, "已通过网上银行直接汇款"),
|
||||
CANCEL_8(8, "已经缺货无法交易"),
|
||||
CANCEL_20(20, "其他"),
|
||||
;
|
||||
|
||||
// 无法联系上买家
|
||||
// 买家误拍或重拍了
|
||||
// 买家无诚意完成交易
|
||||
// 已通过银行线下汇款
|
||||
// 已通过同城见面交易
|
||||
// 已通过货到付款交易
|
||||
// 已通过网上银行直接汇款
|
||||
// 已经缺货无法交易
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
OrderCancelReasonsEnum(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderCancelEnum{" +
|
||||
"code=" + code +
|
||||
", message='" + message + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 发货类型/发货方式
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-05 16:03
|
||||
*/
|
||||
public enum OrderDeliveryTypeEnum {
|
||||
|
||||
NONE(1, "未选择"),
|
||||
ORDER_ONLINE(2, "快递"),
|
||||
CONTACT_YOURSELF(3, "自己联系"),
|
||||
NO_DELIVERY(4, "无物流信息"),
|
||||
;
|
||||
|
||||
private Integer value;
|
||||
|
||||
private String name;
|
||||
|
||||
OrderDeliveryTypeEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderRecipientTypeEnum{" +
|
||||
"value=" + value +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单换货原因
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-20 21:17
|
||||
*/
|
||||
public enum OrderExchangeReasonEnum {
|
||||
|
||||
REASON_000(0, "其他"),
|
||||
REASON_001(1, "尺码不合适"),
|
||||
REASON_002(2, "质量问题"),
|
||||
REASON_003(3, "不喜欢"),
|
||||
;
|
||||
|
||||
private Integer value;
|
||||
|
||||
private String name;
|
||||
|
||||
OrderExchangeReasonEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderCommonReasonEnum{" +
|
||||
"value=" + value +
|
||||
", name=" + name +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}}
|
|
@ -1,34 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单状态 status
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 14:32
|
||||
*/
|
||||
public enum OrderPayStatus {
|
||||
|
||||
WAITING_PAYMENT(0, "等待支付"),
|
||||
SUCCESSFUL_PAYMENT(1, "支付成功"),
|
||||
REFUND_PAYMENT(2, "退款成功"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final int value;
|
||||
|
||||
private final String name;
|
||||
|
||||
OrderPayStatus(int value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单收件信息 type(配送信息)
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-05 16:03
|
||||
*/
|
||||
public enum OrderRecipientTypeEnum {
|
||||
|
||||
EXPRESS(1, "快递")
|
||||
|
||||
;
|
||||
|
||||
private Integer value;
|
||||
|
||||
private String name;
|
||||
|
||||
OrderRecipientTypeEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderRecipientTypeEnum{" +
|
||||
"value=" + value +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单退货原因
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-20 21:17
|
||||
*/
|
||||
public enum OrderReturnReasonEnum {
|
||||
|
||||
///
|
||||
/// 未发货情况
|
||||
|
||||
REASON_000(0, "其他"),
|
||||
REASON_001(1, "拍错/勿拍/多拍"),
|
||||
REASON_002(2, "缺货"),
|
||||
|
||||
///
|
||||
/// 已发货情况
|
||||
|
||||
REASON_020(20, "七天无理由"),
|
||||
REASON_021(21, "质量问题"),
|
||||
REASON_022(22, "不想要了"),
|
||||
|
||||
;
|
||||
|
||||
// TODO: 2019-03-20 Sin 已发货情况 补全,需要对照一下 淘宝
|
||||
|
||||
private Integer value;
|
||||
|
||||
private String name;
|
||||
|
||||
OrderReturnReasonEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderCommonReasonEnum{" +
|
||||
"value=" + value +
|
||||
", name=" + name +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}}
|
|
@ -1,36 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.enums.order;
|
||||
|
||||
/**
|
||||
* 订单退货 - returnType
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-27 11:53
|
||||
*/
|
||||
public enum OrderReturnServiceTypeEnum {
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* - 1、退货退款
|
||||
* - 2、退款
|
||||
*/
|
||||
RETURN_REFUND(1, "退货退款"),
|
||||
REFUND(2, "退款")
|
||||
;
|
||||
private final int value;
|
||||
|
||||
private final String name;
|
||||
|
||||
OrderReturnServiceTypeEnum(int value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复 convert
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-31 18:30
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderCommentReplyConvert {
|
||||
|
||||
OrderCommentReplyConvert INSTANCE = Mappers.getMapper(OrderCommentReplyConvert.class);
|
||||
|
||||
// @Mappings({})
|
||||
// OrderCommentReplyDO convert(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderCommentReplyCreateBO convert(OrderCommentReplyDO orderCommentReplyDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderCommentMerchantReplyBO> convert(List<OrderCommentReplyDO> orderCommentReplyDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderCommentReplyPageBO.OrderCommentReplayItem> convertOrderCommentReplayItem(
|
||||
// List<OrderCommentReplyDO> orderCommentReplyDOList);
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 订单物流 convert
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-23 14:39
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderLogisticsConvert {
|
||||
|
||||
OrderLogisticsConvert INSTANCE = Mappers.getMapper(OrderLogisticsConvert.class);
|
||||
|
||||
// @Mappings({})
|
||||
// OrderLogisticsDO convert(OrderDeliveryDTO orderDelivery);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderLogisticsDO convert(OrderLogisticsUpdateDTO orderLogisticsDTO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderLogisticsDO convert(OrderRecipientDO orderRecipientDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderLogisticsInfoWithOrderBO.Logistics> convertLogistics(
|
||||
// List<OrderLogisticsDO> orderLogisticsDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderLogisticsInfoWithOrderBO.LogisticsDetail> convertLogisticsDetail(
|
||||
// List<OrderLogisticsDetailDO> orderLogisticsDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderLogisticsInfoBO convert(OrderLogisticsDO orderLogisticsDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderLogisticsInfoBO.LogisticsDetail> convert(
|
||||
// List<OrderLogisticsDetailDO> orderLogisticsDetailDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// @Named(value = "orderLastLogisticsInfoBO")
|
||||
// OrderLastLogisticsInfoBO convertOrderLastLogisticsInfoBO(OrderLogisticsDO orderLogisticsDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderLastLogisticsInfoBO.LogisticsDetail convertLastLogisticsDetail(
|
||||
// OrderLogisticsDetailDO orderLogisticsDetailDO);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 订单物流 convert
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-23 14:39
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderLogisticsDetailConvert {
|
||||
|
||||
OrderLogisticsDetailConvert INSTANCE = Mappers.getMapper(OrderLogisticsDetailConvert.class);
|
||||
|
||||
// @Mappings({})
|
||||
// OrderInfoBO.LogisticsDetail convertLogisticsDetail(
|
||||
// OrderLogisticsDetailDO orderLogisticsDetailDO);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 订单收件人信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-31 12:50
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderRecipientConvert {
|
||||
|
||||
OrderRecipientConvert INSTANCE = Mappers.getMapper(OrderRecipientConvert.class);
|
||||
|
||||
// @Mappings({})
|
||||
// OrderRecipientDO convert(OrderCreateDTO orderCreateDTO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderRecipientDO convert(UserAddressBO userAddressBO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderRecipientBO convert(OrderRecipientDO orderRecipientDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderRecipientBO> convert(List<OrderRecipientDO> orderRecipientDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderInfoBO.Recipient convertOrderInfoRecipient(OrderRecipientDO orderRecipientDO);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 订单 return
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:46
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderReturnConvert {
|
||||
|
||||
OrderReturnConvert INSTANCE = Mappers.getMapper(OrderReturnConvert.class);
|
||||
|
||||
// @Mappings({})
|
||||
// OrderReturnDO convert(OrderReturnCreateDTO orderReturnCreate);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderReturnDO convert(OrderReturnApplyDTO orderReturnApplyDTO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// OrderReturnInfoBO.ReturnInfo convert(OrderReturnDO orderReturnDO);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderReturnInfoBO.OrderItem> convert(List<OrderItemDO> orderItemDOList);
|
||||
//
|
||||
// @Mappings({})
|
||||
// List<OrderReturnListBO.OrderReturn> convertListBO(List<OrderReturnDO> orderReturnDOList);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert.comment;
|
||||
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.comment.OrderCommentDO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO;
|
||||
import java.util.List;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 订单评论转换
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/19 23:06
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderCommentConvert {
|
||||
|
||||
OrderCommentConvert INSTANCE = Mappers.getMapper(OrderCommentConvert.class);
|
||||
|
||||
/**
|
||||
* 参数转成 DO
|
||||
*
|
||||
* @param orderCommentAddDTO
|
||||
* @return
|
||||
*/
|
||||
OrderCommentDO convert(OrderCommentAddDTO orderCommentAddDTO);
|
||||
|
||||
/**
|
||||
* 参数转成BO
|
||||
*
|
||||
* @param orderCommentList
|
||||
* @return
|
||||
*/
|
||||
List<OrderCommentPageBO> convert(List<OrderCommentDO> orderCommentList);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param orderCommentDO
|
||||
* @return
|
||||
*/
|
||||
OrderCommentInfoBO convert(OrderCommentDO orderCommentDO);
|
||||
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.comment;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论 mapper
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 20:52
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderCommentMapper{
|
||||
|
||||
|
||||
// /**
|
||||
// * 插入订单评论
|
||||
// * @param orderCommentDO
|
||||
// * @return
|
||||
// */
|
||||
// void insert(OrderCommentDO orderCommentDO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据 sku id 查询评论总条数
|
||||
// * @param productSkuId
|
||||
// * @return
|
||||
// */
|
||||
// int selectCommentTotalCountByProductSkuId(@Param("productSkuId") Integer productSkuId);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 分页获取评论
|
||||
// * @param orderCommentPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentDO> selectCommentPage(OrderCommentPageDTO orderCommentPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据评论 id 查询评论详情
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentDO selectCommentInfoByCommentId(@Param("id") Integer id);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 订单评论状态信息详情
|
||||
// * @param orderCommentStateInfoPageDTO
|
||||
// * @return
|
||||
// */
|
||||
//// List<OrderCommentDO> selectOrderCommentStateInfoPage(
|
||||
//// OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 订单评论状态总数
|
||||
// * @param userId,commentState
|
||||
// * @return
|
||||
// */
|
||||
// int selectOrderCommentStateInfoTotal(@Param("userId") Integer userId,
|
||||
// @Param("commentState") Integer commentState);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 订单评论超时分页
|
||||
// * @param orderCommentTimeOutPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentDO> selectOrderCommentTimeOutPage(
|
||||
// @Param("commentTimeOut") OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO);
|
||||
//
|
||||
// /**
|
||||
// * 批量更新订单评论状态
|
||||
// * @param orderCommentTimeOutBOList
|
||||
// * @param commentState
|
||||
// */
|
||||
// void updateBatchOrderCommentState(@Param("commentState") Integer commentState,
|
||||
// @Param("list") List<OrderCommentTimeOutBO> orderCommentTimeOutBOList);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.comment;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 订单评论回复 mapper
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 21:33
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderCommentReplayMapper {
|
||||
|
||||
// /**
|
||||
// * 插入订单评论回复
|
||||
// * @param orderCommentReplyDO
|
||||
// * @return
|
||||
// */
|
||||
// void insert(OrderCommentReplyDO orderCommentReplyDO);
|
||||
//
|
||||
// /**
|
||||
// * 根据评论 id 和用户类型获取商家回复
|
||||
// * @param commentId,userType
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentReplyDO> selectCommentMerchantReplyByCommentIdAndUserType(
|
||||
// @Param("commentId") Integer commentId,
|
||||
// @Param("userType") Integer userType);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 分页获取评论回复
|
||||
// * @param orderCommentReplyPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentReplyDO> selectCommentReplyPage(
|
||||
// OrderCommentReplyPageDTO orderCommentReplyPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据评论 id 和用户类型获取评论回复总数
|
||||
// * @param commentId,userType
|
||||
// * @return
|
||||
// */
|
||||
// int selectCommentReplyTotalCountByCommentId(@Param("commentId") Integer commentId,
|
||||
// @Param("userType") Integer userType);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据评论 id 查询最新的商家回复
|
||||
// * @param commentIds
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentReplyDO> selectCommentNewMerchantReplyByCommentIds(
|
||||
// @Param("commentIds") Collection<Integer> commentIds,
|
||||
// @Param("userType") Integer userType);
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderCancelDO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 订单取消 mapper
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 16:27
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderCancelMapper {
|
||||
|
||||
int insert(OrderCancelDO orderCancelDO);
|
||||
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderItemDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单 item mapper
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 15:09
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderItemMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param orderItemDOList
|
||||
*/
|
||||
void insert(@Param("list") List<OrderItemDO> orderItemDOList);
|
||||
|
||||
/**
|
||||
* 更新 - 根据Id
|
||||
*
|
||||
* @param orderItemDO
|
||||
*/
|
||||
void updateById(@Param("orderItemDO") OrderItemDO orderItemDO);
|
||||
|
||||
/**
|
||||
* 更新 - 根据 orderId
|
||||
* @param orderId
|
||||
* @param orderItemDO
|
||||
*/
|
||||
void updateByOrderId(
|
||||
@Param("orderId") Integer orderId,
|
||||
@Param("orderItemDO") OrderItemDO orderItemDO
|
||||
);
|
||||
|
||||
/**
|
||||
* 更新 - 根据Ids
|
||||
*
|
||||
* @param ids
|
||||
* @param orderItemDO
|
||||
*/
|
||||
void updateByIds(
|
||||
@Param("ids") List<Integer> ids,
|
||||
@Param("orderItemDO") OrderItemDO orderItemDO
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取 - 根据 ids 查询
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<OrderItemDO> selectByIds(@Param("ids") Collection<Integer> ids);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 orderIds 和 status
|
||||
*
|
||||
* @param orderIds
|
||||
* @param deleted
|
||||
* @return
|
||||
*/
|
||||
List<OrderItemDO> selectByDeletedAndOrderIds(
|
||||
@Param("orderIds") Collection<Integer> orderIds,
|
||||
@Param("deleted") Integer deleted
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 orderId 下的 item
|
||||
*
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
List<OrderItemDO> selectByDeletedAndOrderId(
|
||||
@Param("deleted") Integer deleted,
|
||||
@Param("orderId") Integer orderId
|
||||
);
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单物流 - 物流详细信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-12 21:35
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderLogisticsDetailMapper {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param orderLogisticsDetailDO
|
||||
* @return
|
||||
*/
|
||||
int insert(OrderLogisticsDetailDO orderLogisticsDetailDO);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 物流id
|
||||
*
|
||||
* @param orderLogisticsId
|
||||
* @return
|
||||
*/
|
||||
List<OrderLogisticsDetailDO> selectByOrderLogisticsId(
|
||||
@Param("orderLogisticsId") Integer orderLogisticsId
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 物流ids
|
||||
*
|
||||
* @param orderLogisticsIds
|
||||
* @return
|
||||
*/
|
||||
List<OrderLogisticsDetailDO> selectByOrderLogisticsIds(
|
||||
@Param("orderLogisticsIds") Collection<Integer> orderLogisticsIds
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 获取最新的物流信息
|
||||
*
|
||||
* @param orderLogisticsIds
|
||||
* @return
|
||||
*/
|
||||
OrderLogisticsDetailDO selectLast(
|
||||
@Param("orderLogisticsIds") Collection<Integer> orderLogisticsIds
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 last 根据物理id
|
||||
*
|
||||
* @param orderLogisticsId
|
||||
* @return
|
||||
*/
|
||||
OrderLogisticsDetailDO selectLastByLogisticsId(
|
||||
@Param("orderLogisticsId") Integer orderLogisticsId
|
||||
);
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单 item mapper
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 15:09
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderLogisticsMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param orderLogisticsDO
|
||||
*/
|
||||
void insert(OrderLogisticsDO orderLogisticsDO);
|
||||
|
||||
/**
|
||||
* 更新 - 根据id
|
||||
*
|
||||
* @param orderLogisticsDO
|
||||
*/
|
||||
void updateById(OrderLogisticsDO orderLogisticsDO);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 ids
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OrderLogisticsDO selectById(
|
||||
@Param("id") Integer id
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 ids
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<OrderLogisticsDO> selectByIds(
|
||||
@Param("ids") Collection<Integer> ids
|
||||
);
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单收件人 信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-31 12:16
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderRecipientMapper {
|
||||
|
||||
/**
|
||||
* 插入 - 订单收件人
|
||||
*
|
||||
* @param orderRecipient
|
||||
* @return
|
||||
*/
|
||||
int insert(OrderRecipientDO orderRecipient);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 orderId
|
||||
*
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
OrderRecipientDO selectByOrderId(
|
||||
@Param("orderId") Integer orderId
|
||||
);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 orderIds
|
||||
*
|
||||
* @param orderIds
|
||||
* @return
|
||||
*/
|
||||
List<OrderRecipientDO> selectByOrderIds(
|
||||
@Param("orderIds") Collection<Integer> orderIds
|
||||
);
|
||||
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dao.order;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 订单退货 mapper
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:36
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderReturnMapper {
|
||||
|
||||
// /**
|
||||
// * 插入 - 退货信息
|
||||
// *
|
||||
// * @param orderReturnDO
|
||||
// * @return
|
||||
// */
|
||||
// int insert(OrderReturnDO orderReturnDO);
|
||||
//
|
||||
// /**
|
||||
// * 更新 - 根据 orderId
|
||||
// *
|
||||
// * @param orderReturnDO
|
||||
// * @return
|
||||
// */
|
||||
// int updateById(OrderReturnDO orderReturnDO);
|
||||
//
|
||||
// /**
|
||||
// * 查询 - 根据 orderId
|
||||
// *
|
||||
// * @param orderId
|
||||
// * @return
|
||||
// */
|
||||
// OrderReturnDO selectByOrderId(
|
||||
// @Param("orderId") Integer orderId
|
||||
// );
|
||||
//
|
||||
// /**
|
||||
// * 列表查询 - queryDTO
|
||||
// *
|
||||
// * @param queryDTO
|
||||
// * @return
|
||||
// */
|
||||
// int selectListCount(OrderReturnQueryDTO queryDTO);
|
||||
//
|
||||
// /**
|
||||
// * 列表查询 - queryDTO
|
||||
// *
|
||||
// * @param queryDTO
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderReturnDO> selectList(OrderReturnQueryDTO queryDTO);
|
||||
//
|
||||
// /**
|
||||
// * 查询 - 根据 id 查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// OrderReturnDO selectById(Integer id);
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 商品评价回复表
|
||||
*
|
||||
* // TODO FROM 芋艿 TO wtz 商品评价回复表 =》订单评论回复表
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-14 21:00
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "order_comment_replay")
|
||||
public class OrderCommentReplyDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 回复 id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
|
||||
/**
|
||||
* 回复的类型 // TODO FROM 芋艿 TO wtz 记得加下枚举类
|
||||
*/
|
||||
private Integer replyType;
|
||||
|
||||
/**
|
||||
* 父 id
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 回复目标用户 id
|
||||
*/
|
||||
private Integer parentUserId;
|
||||
|
||||
/**
|
||||
* 回复目标用户昵称
|
||||
*/
|
||||
private String parentUserNickName;
|
||||
|
||||
/**
|
||||
* 回复目标用户头像
|
||||
*/
|
||||
private String parentUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复用户 id
|
||||
*/
|
||||
private Integer replyUserId;
|
||||
|
||||
/**
|
||||
* 回复用户昵称
|
||||
*/
|
||||
private String replyUserNickName;
|
||||
|
||||
/**
|
||||
* 回复用户头像
|
||||
*/
|
||||
private String replyUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复用户身份 // TODO FROM 芋艿 TO wtz 【提示】userType 和 UserTypeEnum 记录保持一致。
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 回复点赞数
|
||||
*/
|
||||
private Integer replyLikeCount;
|
||||
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 换货订单
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-19 19:48
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderExchangeDO extends DeletableDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 订单 item 编号
|
||||
*/
|
||||
private Integer orderItemId;
|
||||
/**
|
||||
* 商品id(保存一个冗余,如果一个订单下存在多个商品,会有很大的作用)
|
||||
*/
|
||||
private String skuId;
|
||||
/**
|
||||
* 换货商品id
|
||||
*/
|
||||
private String exchangeSkuId;
|
||||
/**
|
||||
* 换货物流id
|
||||
*/
|
||||
private Integer exchangeOrderLogisticsId;
|
||||
/**
|
||||
* 收件物流id
|
||||
*/
|
||||
private Integer receiverOrderLogisticsId;
|
||||
|
||||
///
|
||||
/// 原因
|
||||
|
||||
/**
|
||||
* 原因 (关联字典)
|
||||
*
|
||||
* {@link cn.iocoder.mall.order.biz.constants.OrderExchangeReasonEnum}
|
||||
*/
|
||||
private Integer orderReasonId;
|
||||
/**
|
||||
* 原因(如果选择其他,原因保存在这)
|
||||
*
|
||||
* {@link cn.iocoder.mall.order.biz.constants.OrderExchangeReasonEnum#REASON_000}
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
///
|
||||
/// 时间信息
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* supper baseDO
|
||||
*/
|
||||
// private LocalDateTime createTime;
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private LocalDateTime paymentTime;
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private LocalDateTime deliveryTime;
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
private LocalDateTime receiverTime;
|
||||
/**
|
||||
* 成交时间
|
||||
*/
|
||||
private LocalDateTime closingTime;
|
||||
|
||||
///
|
||||
/// 其他
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*
|
||||
* - 0、为 Order 订单 (对整个订单退货)
|
||||
* - 1、为 OrderItem 订单 (对订单某一个商品退货)
|
||||
*/
|
||||
private Integer orderType;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* - 申请换货
|
||||
* - 申请成功
|
||||
* - 申请失败
|
||||
* - 换货中
|
||||
* - 换货成功
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单物流信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-19 20:47
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderLogisticsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 收件区域编号
|
||||
*/
|
||||
private String areaNo;
|
||||
/**
|
||||
* 收件人名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 收件手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 收件详细地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 物流 (字典)
|
||||
*/
|
||||
private Integer logistics;
|
||||
/**
|
||||
* 物流编号
|
||||
*/
|
||||
private String logisticsNo;
|
||||
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单物流 - 详细信息
|
||||
*
|
||||
* - 同步第三方物流信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-19 20:48
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderLogisticsDetailDO extends DeletableDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 物流id
|
||||
*/
|
||||
private Integer orderLogisticsId;
|
||||
/**
|
||||
* 物流时间
|
||||
*/
|
||||
private LocalDateTime logisticsTime;
|
||||
/**
|
||||
* 物流信息
|
||||
*/
|
||||
private String logisticsInformation;
|
||||
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 退货订单
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-19 19:48
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderReturnDO extends BaseDO {
|
||||
|
||||
// TODO FROM 芋艿 TO 小范,存储下支付中心的退款单号
|
||||
|
||||
/**
|
||||
* 编号自动增长
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 服务号
|
||||
*/
|
||||
// TODO FROM 芋艿 to 小范,换个名字,看着怪怪的 哈哈哈哈。
|
||||
private String serviceNumber;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单号 (保存一个冗余)
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 物流id
|
||||
*/
|
||||
private Integer orderLogisticsId;
|
||||
|
||||
///
|
||||
/// 退货原因
|
||||
|
||||
/**
|
||||
* 退货金额
|
||||
*/
|
||||
private Integer refundPrice;
|
||||
/**
|
||||
* 退货原因(字典值)
|
||||
*
|
||||
* {@link cn.iocoder.mall.order.biz.constants.OrderReturnReasonEnum}
|
||||
*/
|
||||
private Integer reason;
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
// TODO FROM 芋艿 to 小范,describe 是动词,换成名词 description
|
||||
private String describe;
|
||||
|
||||
///
|
||||
/// 时间信息
|
||||
|
||||
/**
|
||||
* 同意时间
|
||||
*/
|
||||
private LocalDateTime approvalTime;
|
||||
/**
|
||||
* 拒绝时间
|
||||
*/
|
||||
private LocalDateTime refuseTime;
|
||||
/**
|
||||
* 物流时间(填写物流单号时间)
|
||||
*/
|
||||
private LocalDateTime logisticsTime;
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
private LocalDateTime receiverTime;
|
||||
/**
|
||||
* 成交时间(确认时间)
|
||||
*/
|
||||
private LocalDateTime closingTime;
|
||||
/**
|
||||
* 服务类型
|
||||
*
|
||||
* - 1、退货退款
|
||||
* - 2、退款
|
||||
*/
|
||||
private Integer serviceType;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* - 1、退货申请
|
||||
* - 2、申请成功
|
||||
* - 3、申请失败
|
||||
* - 4、退货中
|
||||
* - 5、已收货
|
||||
* - 6、退货成功
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
## 订单
|
||||
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
**退货**
|
||||
|
||||
1. 商家未发货,退货原因
|
||||
|
||||
- 拍错/勿拍/多拍
|
||||
- 缺货
|
||||
|
||||
2. 商家已发货,退货原因
|
||||
|
||||
- 七天无理由
|
||||
- 质量问题
|
||||
- 不想要了
|
||||
- 其他
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dataobject.comment;
|
||||
|
||||
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
/**
|
||||
* 订单评论 MONGODB
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/19 22:30
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Document(collection = "order_comment")
|
||||
public class OrderCommentDO extends BaseDO {
|
||||
|
||||
@Id
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 订单 id
|
||||
*/
|
||||
private Integer orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商品 id
|
||||
*/
|
||||
private Integer productSpuId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productSpuName;
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
private Integer productSkuId;
|
||||
|
||||
/**
|
||||
* 商品 sku 属性
|
||||
*/
|
||||
private String productSkuAttrs;
|
||||
|
||||
/**
|
||||
* 商品 sku 价格
|
||||
*/
|
||||
private Integer productSkuPrice;
|
||||
|
||||
/**
|
||||
* 商品 sku url
|
||||
*/
|
||||
private String productSkuPicUrl;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 用户的真实姓名
|
||||
*/
|
||||
private String userNickName;
|
||||
|
||||
/**
|
||||
* 评价星
|
||||
*/
|
||||
private Integer star;
|
||||
|
||||
/**
|
||||
* 商品描述
|
||||
*/
|
||||
private Integer productDescriptionStar;
|
||||
|
||||
/**
|
||||
* 物流评价
|
||||
*/
|
||||
private Integer logisticsStar;
|
||||
|
||||
/**
|
||||
* 商家评价
|
||||
*/
|
||||
private Integer merchantStar;
|
||||
|
||||
/**
|
||||
* 回复条数
|
||||
*/
|
||||
private Integer replayCount;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
private Integer likeCount;
|
||||
|
||||
/**
|
||||
* 评论的内容
|
||||
*/
|
||||
private String commentContent;
|
||||
|
||||
/**
|
||||
* 评论的图片地址
|
||||
*/
|
||||
private String commentPics;
|
||||
|
||||
/**
|
||||
* 订单评论状态
|
||||
*/
|
||||
private Integer commentState;
|
||||
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单评论创建
|
||||
*
|
||||
* @author wtz
|
||||
* @update xiaofeng
|
||||
* @time 2019-05-15 20:42
|
||||
* @update time 2020-05-13 0:07
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentAddDTO implements Serializable {
|
||||
|
||||
@NotNull(message = "订单 id 不能为空")
|
||||
private Integer orderId;
|
||||
|
||||
@NotEmpty(message = "订单编号不能为空")
|
||||
private String orderNo;
|
||||
|
||||
@NotNull(message = "商品的 spu id 不能为空")
|
||||
private Integer productSpuId;
|
||||
|
||||
@NotEmpty(message = "商品的 spu name 不能为空")
|
||||
private String productSpuName;
|
||||
|
||||
@NotNull(message = "商品的 sku id 不能为空")
|
||||
private Integer productSkuId;
|
||||
|
||||
@NotEmpty(message = "商品的 sku attrs 不能为空")
|
||||
private String productSkuAttrs;
|
||||
|
||||
@NotNull(message = "商品的 sku price 不能为空")
|
||||
private Integer productSkuPrice;
|
||||
|
||||
@NotEmpty(message = "商品的 sku url 不能为空")
|
||||
private String productSkuPicUrl;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String userAvatar;
|
||||
|
||||
@NotEmpty(message = "用户昵称不能为空")
|
||||
private String userNickName;
|
||||
|
||||
private Integer star;
|
||||
|
||||
private Integer productDescriptionStar;
|
||||
|
||||
private Integer logisticsStar;
|
||||
|
||||
private Integer merchantStar;
|
||||
|
||||
private String commentContent;
|
||||
|
||||
private String commentPics;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单评论 page
|
||||
*
|
||||
* @author xiaofeng
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentPageDTO extends PageParam implements Serializable {
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
private Integer productSkuId;
|
||||
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单回复评论创建
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 19:07
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentReplyCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
|
||||
/**
|
||||
* 评论目标对象 id
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 评论目标用户 id
|
||||
*/
|
||||
private Integer parentUserId;
|
||||
|
||||
/**
|
||||
* 评论目标用户昵称
|
||||
*/
|
||||
private String parentUserNickName;
|
||||
|
||||
/**
|
||||
* 评论目标用户头像
|
||||
*/
|
||||
private String parentUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复用户 id
|
||||
*/
|
||||
private Integer replyUserId;
|
||||
|
||||
/**
|
||||
* 回复用户昵称
|
||||
*/
|
||||
private String replyUserNickName;
|
||||
|
||||
/**
|
||||
* 回复用户头像
|
||||
*/
|
||||
private String replyUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复用户类型
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论信息详情 query
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-19 10:16
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentReplyPageDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论状态分页信息 query
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-06-07 10:45
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentStateInfoPageDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 评论状态
|
||||
*/
|
||||
private Integer commentState;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.comment;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单评论超时
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-06-15 10:59
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentTimeOutPageDTO implements Serializable {
|
||||
/**
|
||||
* 超过的天数
|
||||
*/
|
||||
private Integer overDay;
|
||||
|
||||
/**
|
||||
* 评论的状态
|
||||
*/
|
||||
private Integer commentState;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 计算订单价格 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class CalcOrderPriceDTO {
|
||||
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 优惠劵编号
|
||||
*/
|
||||
private Integer couponCardId;
|
||||
|
||||
@NotNull(message = "商品数组不能为空")
|
||||
private List<Item> items;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Item {
|
||||
|
||||
/**
|
||||
* SKU 编号
|
||||
*/
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
/**
|
||||
* 是否选中
|
||||
*
|
||||
* 注意下,目前只有在购物车的时候,才可能出现该属性为 false 。其它情况下,都会为 true 为主。
|
||||
*/
|
||||
private Boolean selected;
|
||||
|
||||
public Item() {
|
||||
}
|
||||
|
||||
public Item(Integer skuId, Integer quantity, Boolean selected) {
|
||||
this.skuId = skuId;
|
||||
this.quantity = quantity;
|
||||
this.selected = selected;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单创建
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 14:42
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
// TODO FROM 芋艿 to xiaofeng:辛苦后续补充下 Validation 注解哈
|
||||
public class OrderCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 用户地址
|
||||
*/
|
||||
private Integer userAddressId;
|
||||
/**
|
||||
* 优惠劵编号
|
||||
*/
|
||||
private Integer couponCardId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* ip信息
|
||||
*/
|
||||
private String ip;
|
||||
|
||||
///
|
||||
/// order item
|
||||
|
||||
private List<OrderItem> orderItems;
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class OrderItem {
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
@NotNull
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull
|
||||
@Max(value = 1000)
|
||||
private Integer quantity;
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单发货
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 22:31
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderDeliveryDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
// TODO 芋艿,物流方式。会存在无需物流的情况
|
||||
/**
|
||||
* 物流公司 (字典)
|
||||
*/
|
||||
private Integer logistics;
|
||||
/**
|
||||
* 物流单编号
|
||||
*/
|
||||
private String logisticsNo;
|
||||
|
||||
///
|
||||
/// 物理信息是跟 orderItem 走
|
||||
|
||||
/**
|
||||
* 订单 orderItemId
|
||||
*/
|
||||
private List<Integer> orderItemIds;
|
||||
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Sin
|
||||
* @time 2019-03-23 10:22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderItemDeletedDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单item id
|
||||
*/
|
||||
private List<Integer> orderItemIds;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单更新
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-16 14:46
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderItemUpdateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@NotNull
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
@NotNull
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull
|
||||
private Integer quantity;
|
||||
/**
|
||||
* 金额(分)
|
||||
*/
|
||||
@NotNull
|
||||
private Integer price;
|
||||
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单收件人信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-17 20:22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderLogisticsUpdateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单 id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 收件区域编号
|
||||
*/
|
||||
@NotNull
|
||||
private String areaNo;
|
||||
/**
|
||||
* 收件人名称
|
||||
*/
|
||||
@NotNull
|
||||
private String name;
|
||||
/**
|
||||
* 收件手机号
|
||||
*/
|
||||
@NotNull
|
||||
@Size(max = 11, min = 11)
|
||||
// TODO: 2019-03-17 Sin 此处需要添加 手机号校验,需要添加新的注解
|
||||
private String mobile;
|
||||
/**
|
||||
* 收件详细地址
|
||||
*/
|
||||
@NotNull
|
||||
@Size(max = 250, min = 10, message = "收件地址应该在 10 ~ 250 个字符之间")
|
||||
private String address;
|
||||
/**
|
||||
* 物流编号
|
||||
*/
|
||||
private String logisticsNo;
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 订单 query
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-23 14:15
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderQueryDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 物流id
|
||||
*/
|
||||
private Integer orderLogisticsId;
|
||||
/**
|
||||
* 是否退换货
|
||||
*/
|
||||
private Integer hasReturnExchange;
|
||||
/**
|
||||
* 付款时间(待发货)
|
||||
*/
|
||||
private LocalDateTime startPaymentTime;
|
||||
private LocalDateTime endPaymentTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime startCreateTime;
|
||||
private LocalDateTime endCreateTime;
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
private Integer deleted;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Sin
|
||||
* @time 2019-04-25 21:06
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderReturnApplyDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 退货原因(字典值)
|
||||
*/
|
||||
private Integer reason;
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
private String describe;
|
||||
/**
|
||||
* 退款类型
|
||||
*
|
||||
* - 1、退货退款
|
||||
* - 2、退款
|
||||
*/
|
||||
private Integer returnType;
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单退货 - 创建
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:34
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderReturnCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单 item 编号
|
||||
*/
|
||||
private Integer orderItemId;
|
||||
/**
|
||||
* 退货原因(字典值)
|
||||
*/
|
||||
private Integer orderReason;
|
||||
/**
|
||||
* 原因(如果选择其他,原因保存在这)
|
||||
*/
|
||||
private String otherReasons;
|
||||
/**
|
||||
* 订单类型
|
||||
*
|
||||
* - 0、为 Order 订单 (对整个订单退货)
|
||||
* - 1、为 OrderItem 订单 (对订单某一个商品退货)
|
||||
*/
|
||||
private Integer orderType;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 订单退货 查询 po
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-05-06 21:36
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderReturnQueryDTO implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderNo;
|
||||
/**
|
||||
* 服务号
|
||||
*/
|
||||
private String serviceNumber;
|
||||
/**
|
||||
* 创建时间 - 开始
|
||||
*/
|
||||
private LocalDateTime startCreateTime;
|
||||
/**
|
||||
* 创建时间 - 结束
|
||||
*/
|
||||
private LocalDateTime endCreateTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
///
|
||||
/// 分页信息
|
||||
|
||||
/**
|
||||
* 分页 index
|
||||
*/
|
||||
private Integer index;
|
||||
/**
|
||||
* 分页大小
|
||||
*/
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户订单 page
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-08 17:50
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderUserPageDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 付款时间(待发货)
|
||||
*/
|
||||
private LocalDateTime startPaymentTime;
|
||||
private LocalDateTime endPaymentTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime startCreateTime;
|
||||
private LocalDateTime endCreateTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论回复模块
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-29 14:30
|
||||
*
|
||||
*/
|
||||
public interface OrderCommentReplyService {
|
||||
|
||||
// /**
|
||||
// * 分页获取评论回复
|
||||
// * @param orderCommentReplyPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentReplyPageBO getOrderCommentReplyPage(
|
||||
// OrderCommentReplyPageDTO orderCommentReplyPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 评论回复创建
|
||||
// * @param orderCommentReplyCreateDTO
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentReplyCreateBO createOrderCommentReply(
|
||||
// OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取商家评论回复
|
||||
// * @param commentId
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentMerchantReplyBO> getOrderCommentMerchantReply(Integer commentId);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service;
|
||||
|
||||
/**
|
||||
* 订单评论模块
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-14 22:10
|
||||
*/
|
||||
public interface OrderCommentService {
|
||||
|
||||
// /**
|
||||
// * 评论创建
|
||||
// * @param orderCommentCreateDTO
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentCreateBO createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO);
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取评论列表的分页
|
||||
// * @param orderCommentPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentPageBO getOrderCommentPage(OrderCommentPageDTO orderCommentPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取评论详情
|
||||
// * @param commentId
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentInfoBO getOrderCommentInfo(Integer commentId);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取订单评论状态详情
|
||||
// * @param orderCommentStateInfoPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// OrderCommentStateInfoPageBO getOrderCommentStateInfoPage(
|
||||
// OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO);
|
||||
//
|
||||
// /**
|
||||
// * 获取订单评论超时分页
|
||||
// * @param orderCommentTimeOutPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// List<OrderCommentTimeOutBO> getOrderCommentTimeOutPage(
|
||||
// OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 批量更新订单评论状态
|
||||
// * @param orderCommentTimeOutBOList
|
||||
// */
|
||||
// void updateBatchOrderCommentState(List<OrderCommentTimeOutBO> orderCommentTimeOutBOList);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service;
|
||||
|
||||
/**
|
||||
* 订单物流信息
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-12 21:29
|
||||
*/
|
||||
public interface OrderLogisticsService {
|
||||
|
||||
|
||||
// /**
|
||||
// * 获取物流信息 - 根据id
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult<OrderLogisticsInfoBO> getLogisticsInfo(Integer id);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 获取 last 物流信息 - 根据id
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult<OrderLastLogisticsInfoBO> getLastLogisticsInfo(Integer id);
|
||||
//
|
||||
// /**
|
||||
// * 获取物流信息 - 根据 orderId
|
||||
// *
|
||||
// * @param userId
|
||||
// * @param orderId
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult<OrderLogisticsInfoWithOrderBO> getOrderLogisticsInfo(Integer userId,
|
||||
// Integer orderId);
|
||||
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service;
|
||||
|
||||
/**
|
||||
* 订单退货
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:33
|
||||
*/
|
||||
public interface OrderReturnService {
|
||||
|
||||
|
||||
// /**
|
||||
// * 订单 - 退货
|
||||
// *
|
||||
// * @param orderReturnApplyDTO
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult orderReturnApply(OrderReturnApplyDTO orderReturnApplyDTO);
|
||||
//
|
||||
// /**
|
||||
// * 更新退款成功
|
||||
// *
|
||||
// * 如果成功,则返回 success
|
||||
// * 如果失败,则返回具体原因
|
||||
// *
|
||||
// * @param orderId 订单编号
|
||||
// * @param refundPrice 退款金额
|
||||
// * @return 支付结果
|
||||
// */
|
||||
// String updateRefundSuccess(String orderId, Integer refundPrice);
|
||||
//
|
||||
// /**
|
||||
// * 订单申请信息
|
||||
// *
|
||||
// * @param orderId
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult<OrderReturnInfoBO> orderApplyInfo(Integer orderId);
|
||||
//
|
||||
// /**
|
||||
// * 订单退货 - 列表
|
||||
// *
|
||||
// * @param queryDTO
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult<OrderReturnListBO> orderReturnList(OrderReturnQueryDTO queryDTO);
|
||||
//
|
||||
// /**
|
||||
// * 订单退货 - 接受
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult orderReturnAgree(Integer id);
|
||||
//
|
||||
// /**
|
||||
// * 订单退货 - 拒绝
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult orderReturnRefuse(Integer id);
|
||||
//
|
||||
// /**
|
||||
// * 订单退货 - 确认收货
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult confirmReceipt(Integer id);
|
||||
//
|
||||
// /**
|
||||
// * 订单退货 - 确认订单
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// CommonResult refund(Integer id, String ip);
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.comment;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentStateInfoPageBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentTimeOutBO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentStateInfoPageDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentTimeOutPageDTO;
|
||||
import java.util.List;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 订单评论业务
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/17 15:24
|
||||
*/
|
||||
@Validated
|
||||
public interface OrderCommentService {
|
||||
|
||||
/**
|
||||
* 添加订单评论
|
||||
*
|
||||
* @param orderCommentAddDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean addOrderComment(@Valid OrderCommentAddDTO orderCommentAddDTO);
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param orderCommentPageDTO
|
||||
* @return
|
||||
*/
|
||||
PageResult<OrderCommentPageBO> page(OrderCommentPageDTO orderCommentPageDTO);
|
||||
|
||||
/**
|
||||
* 获取订单评论信息
|
||||
*
|
||||
* @param commentId
|
||||
* @return
|
||||
*/
|
||||
OrderCommentInfoBO getOrderCommentInfo(Integer commentId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取订单评论状态详情
|
||||
*
|
||||
* @param orderCommentStateInfoPageDTO
|
||||
* @return
|
||||
*/
|
||||
OrderCommentStateInfoPageBO getOrderCommentStateInfoPage(
|
||||
OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO);
|
||||
|
||||
/**
|
||||
* 获取订单评论超时分页
|
||||
*
|
||||
* @param orderCommentTimeOutPageDTO
|
||||
* @return
|
||||
*/
|
||||
List<OrderCommentTimeOutBO> getOrderCommentTimeOutPage(
|
||||
OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新订单评论状态
|
||||
*
|
||||
* @param orderCommentTimeOutBOList
|
||||
*/
|
||||
void updateBatchOrderCommentState(List<OrderCommentTimeOutBO> orderCommentTimeOutBOList);
|
||||
|
||||
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.comment;
|
||||
|
||||
import cn.iocoder.common.framework.util.CollectionUtil;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentStateInfoPageBO;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentTimeOutBO;
|
||||
import cn.iocoder.mall.order.biz.convert.comment.OrderCommentConvert;
|
||||
import cn.iocoder.mall.order.biz.dataobject.comment.OrderCommentDO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentStateInfoPageDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentTimeOutPageDTO;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Direction;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* OrderCommentServiceImpl
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/17 15:32
|
||||
*/
|
||||
@Service
|
||||
public class OrderCommentServiceImpl implements OrderCommentService {
|
||||
|
||||
private final MongoTemplate mongoTemplate;
|
||||
|
||||
public OrderCommentServiceImpl(final MongoTemplate mongoTemplate) {
|
||||
this.mongoTemplate = mongoTemplate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean addOrderComment(
|
||||
@Valid OrderCommentAddDTO orderCommentAddDTO) {
|
||||
|
||||
OrderCommentDO orderCommentDO = mongoTemplate
|
||||
.save(OrderCommentConvert.INSTANCE.convert(orderCommentAddDTO));
|
||||
return null != orderCommentDO ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<OrderCommentPageBO> page(
|
||||
OrderCommentPageDTO orderCommentPageDTO) {
|
||||
Query query = new Query();
|
||||
query.with(Sort.by(Direction.ASC, "_id"));
|
||||
List<OrderCommentDO> orderCommentList = Collections.EMPTY_LIST;
|
||||
if (orderCommentPageDTO.getPageNo() == 1) {
|
||||
query.limit(orderCommentPageDTO.getPageSize());
|
||||
} else {
|
||||
final int offset = orderCommentPageDTO.getOffset();
|
||||
query.limit(offset);
|
||||
List<OrderCommentDO> list = mongoTemplate.find(query, OrderCommentDO.class);
|
||||
if (!CollectionUtil.isEmpty(list)) {
|
||||
// 获取最后一条记录
|
||||
OrderCommentDO orderCommentDO = list.get(orderCommentList.size() - 1);
|
||||
final Integer orderCommentId = orderCommentDO.getId();
|
||||
// 从上一页最后一条开始查
|
||||
query.addCriteria(Criteria.where("_id").gt(orderCommentId));
|
||||
// 重新赋值
|
||||
query.limit(orderCommentPageDTO.getPageSize());
|
||||
}
|
||||
}
|
||||
orderCommentList = mongoTemplate.find(query, OrderCommentDO.class);
|
||||
|
||||
PageResult<OrderCommentPageBO> pageResult = new PageResult<>();
|
||||
pageResult.setList(OrderCommentConvert.INSTANCE.convert(orderCommentList));
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderCommentInfoBO getOrderCommentInfo(
|
||||
Integer commentId) {
|
||||
OrderCommentDO orderCommentDO = mongoTemplate
|
||||
.findOne(new Query(Criteria.where("_id").is(commentId)), OrderCommentDO.class);
|
||||
return OrderCommentConvert.INSTANCE.convert(orderCommentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderCommentStateInfoPageBO getOrderCommentStateInfoPage(
|
||||
OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderCommentTimeOutBO> getOrderCommentTimeOutPage(
|
||||
OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchOrderCommentState(
|
||||
List<OrderCommentTimeOutBO> orderCommentTimeOutBOList) {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.impl;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dao.comment.OrderCommentReplayMapper;
|
||||
import cn.iocoder.mall.order.biz.service.OrderCommentReplyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论回复 service impl
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-31 18:30
|
||||
*/
|
||||
@Service
|
||||
@org.apache.dubbo.config.annotation.Service(validation = "true",version = "${dubbo.provider.OrderCommentReplyService.version}")
|
||||
public class OrderCommentReplyServiceImpl implements OrderCommentReplyService {
|
||||
|
||||
@Autowired
|
||||
private OrderCommentReplayMapper orderCommentReplayMapper;
|
||||
|
||||
// /**
|
||||
// * 分页获取评论回复
|
||||
// * @param orderCommentReplyPageDTO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public OrderCommentReplyPageBO getOrderCommentReplyPage(OrderCommentReplyPageDTO orderCommentReplyPageDTO) {
|
||||
// OrderCommentReplyPageBO orderCommentReplyPageBO=new OrderCommentReplyPageBO();
|
||||
// //评论回复总数
|
||||
// Integer totalCount=orderCommentReplayMapper.selectCommentReplyTotalCountByCommentId(orderCommentReplyPageDTO.getCommentId(),
|
||||
// orderCommentReplyPageDTO.getUserType());
|
||||
// //分页获取评论回复
|
||||
// List<OrderCommentReplyDO> orderCommentReplyDOList=orderCommentReplayMapper.selectCommentReplyPage(orderCommentReplyPageDTO);
|
||||
// orderCommentReplyPageBO.setTotal(totalCount);
|
||||
// orderCommentReplyPageBO.setOrderCommentReplayItems(OrderCommentReplyConvert.INSTANCE.convertOrderCommentReplayItem(orderCommentReplyDOList));
|
||||
// return orderCommentReplyPageBO;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 创建评论回复
|
||||
// * @param orderCommentReplyCreateDTO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public OrderCommentReplyCreateBO createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO) {
|
||||
// OrderCommentReplyDO orderCommentReplyDO=OrderCommentReplyConvert.INSTANCE.convert(orderCommentReplyCreateDTO);
|
||||
// orderCommentReplyDO.setCreateTime(new Date());
|
||||
//
|
||||
// Integer replyType=orderCommentReplyCreateDTO.getCommentId()==orderCommentReplyCreateDTO.getParentId()?
|
||||
// OrderCommentRelpyTypeEnum.COMMENT_REPLY.getValue():OrderCommentRelpyTypeEnum.REPLY_REPLY.getValue();
|
||||
//
|
||||
// orderCommentReplyDO.setReplyType(replyType);
|
||||
//
|
||||
// orderCommentReplayMapper.insert(orderCommentReplyDO);
|
||||
//
|
||||
// return OrderCommentReplyConvert.INSTANCE.convert(orderCommentReplyDO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取商家评论回复
|
||||
// * @param commentId
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<OrderCommentMerchantReplyBO> getOrderCommentMerchantReply(Integer commentId) {
|
||||
// List<OrderCommentReplyDO> orderCommentReplyDOList=orderCommentReplayMapper.selectCommentMerchantReplyByCommentIdAndUserType(commentId,
|
||||
// OrderReplyUserTypeEnum.MERCHANT.getValue());
|
||||
// return OrderCommentReplyConvert.INSTANCE.convert(orderCommentReplyDOList);
|
||||
// }
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.impl;
|
||||
|
||||
import cn.iocoder.mall.order.biz.dao.comment.OrderCommentMapper;
|
||||
import cn.iocoder.mall.order.biz.dao.comment.OrderCommentReplayMapper;
|
||||
import cn.iocoder.mall.order.biz.service.OrderCommentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论 service impl
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019
|
||||
*/
|
||||
@Service
|
||||
@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.OrderCommentService.version}")
|
||||
public class OrderCommentServiceImpl implements OrderCommentService {
|
||||
|
||||
@Autowired
|
||||
private OrderCommentMapper orderCommentMapper;
|
||||
|
||||
@Autowired
|
||||
private OrderCommentReplayMapper orderCommentReplayMapper;
|
||||
|
||||
|
||||
// @Override
|
||||
// public OrderCommentCreateBO createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO) {
|
||||
// OrderCommentDO orderCommentDO=OrderCommentConvert.INSTANCE.convertOrderCommentDO(orderCommentCreateDTO);
|
||||
// orderCommentDO.setCreateTime(new Date());
|
||||
// orderCommentMapper.insert(orderCommentDO);
|
||||
// return OrderCommentConvert.INSTANCE.convertOrderCommentCreateBO(orderCommentDO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public OrderCommentPageBO getOrderCommentPage(OrderCommentPageDTO orderCommentPageDTO) {
|
||||
// OrderCommentPageBO orderCommentPageBO=new OrderCommentPageBO();
|
||||
// //分页内容
|
||||
// List<OrderCommentDO> orderCommentDOList=orderCommentMapper.selectCommentPage(orderCommentPageDTO);
|
||||
// //分页评论的 id
|
||||
// List<Integer> commentIds=orderCommentDOList.stream().map(x->x.getId()).collect(Collectors.toList());
|
||||
// //获取商家最新的评论回复
|
||||
// List<OrderCommentReplyDO> orderCommentReplyDOList=orderCommentReplayMapper.selectCommentNewMerchantReplyByCommentIds(commentIds,
|
||||
// OrderReplyUserTypeEnum.MERCHANT.getValue());
|
||||
// //评论组装
|
||||
// List<OrderCommentPageBO.OrderCommentItem> orderCommentItemList=orderCommentDOList.stream()
|
||||
// .flatMap(x->orderCommentReplyDOList.stream()
|
||||
// .filter(y->x.getId()==y.getCommentId())
|
||||
// .map(y->new OrderCommentPageBO.OrderCommentItem(x.getId(),x.getUserAvatar(),x.getUserNickName(),x.getStar(),
|
||||
// x.getCommentContent(),x.getCommentPics(),x.getReplayCount(),x.getLikeCount(),x.getCreateTime(),y.getReplyContent()))
|
||||
// ).collect(Collectors.toList());
|
||||
// //总数
|
||||
// int totalCount=orderCommentMapper.selectCommentTotalCountByProductSkuId(orderCommentPageDTO.getProductSkuId());
|
||||
// orderCommentPageBO.setOrderCommentItems(orderCommentItemList);
|
||||
// orderCommentPageBO.setTotal(totalCount);
|
||||
// return orderCommentPageBO;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public OrderCommentInfoBO getOrderCommentInfo(Integer commentId) {
|
||||
// //查询评论详情
|
||||
// OrderCommentDO orderCommentDO=orderCommentMapper.selectCommentInfoByCommentId(commentId);
|
||||
// return OrderCommentConvert.INSTANCE.convertOrderCommentInfoBO(orderCommentDO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public OrderCommentStateInfoPageBO getOrderCommentStateInfoPage(OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO) {
|
||||
// OrderCommentStateInfoPageBO orderCommentStateInfoPageBO=new OrderCommentStateInfoPageBO();
|
||||
// //总数
|
||||
// int total=orderCommentMapper.selectOrderCommentStateInfoTotal(orderCommentStateInfoPageDTO.getUserId(),
|
||||
// orderCommentStateInfoPageDTO.getCommentState());
|
||||
// //查询评论状态详情
|
||||
// List<OrderCommentDO> orderCommentDOList=orderCommentMapper.selectOrderCommentStateInfoPage(orderCommentStateInfoPageDTO);
|
||||
// //转化评论状态详情
|
||||
// List<OrderCommentStateInfoPageBO.OrderCommentStateInfoItem> orderCommentStateInfoItemList=
|
||||
// OrderCommentConvert.INSTANCE.convertOrderCommentStateInfoItems(orderCommentDOList);
|
||||
// orderCommentStateInfoPageBO.setTotal(total);
|
||||
// orderCommentStateInfoPageBO.setOrderCommentStateInfoItems(orderCommentStateInfoItemList);
|
||||
// return orderCommentStateInfoPageBO;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<OrderCommentTimeOutBO> getOrderCommentTimeOutPage(OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO) {
|
||||
// List<OrderCommentDO> orderCommentDOList=orderCommentMapper.selectOrderCommentTimeOutPage(orderCommentTimeOutPageDTO);
|
||||
// return OrderCommentConvert.INSTANCE.convertOrderCommentTimeOutBOList(orderCommentDOList);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void updateBatchOrderCommentState(List<OrderCommentTimeOutBO> orderCommentTimeOutBOList) {
|
||||
// orderCommentMapper.updateBatchOrderCommentState(OrderCommentStatusEnum.SUCCESS_COMMENT.getValue(),orderCommentTimeOutBOList);
|
||||
// }
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.impl;
|
||||
|
||||
import cn.iocoder.mall.order.biz.service.OrderLogisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 订单物流
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-12 21:32
|
||||
*/
|
||||
@Service
|
||||
@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.OrderLogisticsService.version}")
|
||||
public class OrderLogisticsServiceImpl implements OrderLogisticsService {
|
||||
|
||||
// @Autowired
|
||||
// private OrderMapper orderMapper;
|
||||
// @Autowired
|
||||
// private OrderItemMapper orderItemMapper;
|
||||
// @Autowired
|
||||
// private OrderLogisticsMapper orderLogisticsMapper;
|
||||
// @Autowired
|
||||
// private OrderLogisticsDetailMapper orderLogisticsDetailMapper;
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult<OrderLogisticsInfoBO> getLogisticsInfo(Integer id) {
|
||||
// OrderLogisticsDO orderLogisticsDO = orderLogisticsMapper.selectById(id);
|
||||
// if (orderLogisticsDO == null) {
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// List<OrderLogisticsDetailDO> orderLogisticsDetailDOList = orderLogisticsDetailMapper
|
||||
// .selectByOrderLogisticsId(orderLogisticsDO.getId());
|
||||
//
|
||||
// // 转换数据结构
|
||||
// List<OrderLogisticsInfoBO.LogisticsDetail> logisticsDetails
|
||||
// = OrderLogisticsConvert.INSTANCE.convert(orderLogisticsDetailDOList);
|
||||
//
|
||||
// OrderLogisticsInfoBO orderLogisticsInfo2BO = OrderLogisticsConvert.INSTANCE.convert(orderLogisticsDO);
|
||||
// orderLogisticsInfo2BO.setDetails(logisticsDetails);
|
||||
// return CommonResult.success(orderLogisticsInfo2BO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult<OrderLastLogisticsInfoBO> getLastLogisticsInfo(Integer id) {
|
||||
// OrderLogisticsDO orderLogisticsDO = orderLogisticsMapper.selectById(id);
|
||||
// if (orderLogisticsDO == null) {
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// OrderLogisticsDetailDO orderLastLogisticsDetailDO = orderLogisticsDetailMapper.selectLastByLogisticsId(id);
|
||||
//
|
||||
// // 转换数据结构
|
||||
// OrderLastLogisticsInfoBO.LogisticsDetail lastLogisticsDetail
|
||||
// = OrderLogisticsConvert.INSTANCE.convertLastLogisticsDetail(orderLastLogisticsDetailDO);
|
||||
//
|
||||
// OrderLastLogisticsInfoBO lastLogisticsInfoBO = OrderLogisticsConvert
|
||||
// .INSTANCE.convertOrderLastLogisticsInfoBO(orderLogisticsDO);
|
||||
//
|
||||
// lastLogisticsInfoBO.setLastLogisticsDetail(lastLogisticsDetail);
|
||||
// return CommonResult.success(lastLogisticsInfoBO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult<OrderLogisticsInfoWithOrderBO> getOrderLogisticsInfo(Integer userId, Integer orderId) {
|
||||
// OrderDO orderDO = orderMapper.selectById(orderId);
|
||||
//
|
||||
// if (orderDO == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// if (!userId.equals(orderDO.getUserId())) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_NOT_USER_ORDER.getCode());
|
||||
// }
|
||||
//
|
||||
// // 获取订单所发货的订单 id
|
||||
// List<OrderItemDO> orderItemDOList = orderItemMapper.selectByDeletedAndOrderId(
|
||||
// DeletedStatusEnum.DELETED_NO.getValue(), orderId);
|
||||
//
|
||||
// // 获取物流 信息
|
||||
// Set<Integer> orderLogisticsIds = orderItemDOList.stream()
|
||||
// .filter(o -> o.getOrderLogisticsId() != null)
|
||||
// .map(o -> o.getOrderLogisticsId())
|
||||
// .collect(Collectors.toSet());
|
||||
//
|
||||
// List<OrderLogisticsDO> orderLogisticsDOList = Collections.emptyList();
|
||||
// List<OrderLogisticsDetailDO> orderLogisticsDetailDOList = Collections.emptyList();
|
||||
// if (!CollectionUtils.isEmpty(orderLogisticsIds)) {
|
||||
// orderLogisticsDOList = orderLogisticsMapper.selectByIds(orderLogisticsIds);
|
||||
// orderLogisticsDetailDOList = orderLogisticsDetailMapper.selectByOrderLogisticsIds(orderLogisticsIds);
|
||||
// }
|
||||
//
|
||||
// // 转换 return 的数据
|
||||
// List<OrderLogisticsInfoWithOrderBO.Logistics> logistics
|
||||
// = OrderLogisticsConvert.INSTANCE.convertLogistics(orderLogisticsDOList);
|
||||
//
|
||||
// List<OrderLogisticsInfoWithOrderBO.LogisticsDetail> logisticsDetails
|
||||
// = OrderLogisticsConvert.INSTANCE.convertLogisticsDetail(orderLogisticsDetailDOList);
|
||||
//
|
||||
// logisticsDetails.stream().map(o -> {
|
||||
// o.setLogisticsTimeText(DateUtil.format(o.getLogisticsTime(), "yyyy-MM-dd HH:mm"));
|
||||
// return o;
|
||||
// }).collect(Collectors.toList());
|
||||
//
|
||||
// Map<Integer, List<OrderLogisticsInfoWithOrderBO.LogisticsDetail>> logisticsDetailMultimap
|
||||
// = logisticsDetails.stream().collect(
|
||||
// Collectors.toMap(
|
||||
// o -> o.getOrderLogisticsId(),
|
||||
// item -> Lists.newArrayList(item),
|
||||
// (oldVal, newVal) -> {
|
||||
// oldVal.addAll(newVal);
|
||||
// return oldVal;
|
||||
// }
|
||||
// )
|
||||
// );
|
||||
//
|
||||
// logistics.stream().map(o -> {
|
||||
// if (logisticsDetailMultimap.containsKey(o.getId())) {
|
||||
// o.setDetails(logisticsDetailMultimap.get(o.getId()));
|
||||
// }
|
||||
// return o;
|
||||
// }).collect(Collectors.toList());
|
||||
//
|
||||
// return CommonResult.success(
|
||||
// new OrderLogisticsInfoWithOrderBO()
|
||||
// .setOrderId(orderId)
|
||||
// .setOrderNo(orderDO.getOrderNo())
|
||||
// .setLogistics(logistics)
|
||||
// );
|
||||
// }
|
||||
}
|
|
@ -1,235 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.service.impl;
|
||||
|
||||
import cn.iocoder.mall.order.biz.service.OrderReturnService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 订单退货 service
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-30 15:35
|
||||
*/
|
||||
@Service
|
||||
@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.OrderReturnService.version}")
|
||||
public class OrderReturnServiceImpl implements OrderReturnService {
|
||||
|
||||
// @Autowired
|
||||
// private OrderMapper orderMapper;
|
||||
// @Autowired
|
||||
// private OrderItemMapper orderItemMapper;
|
||||
// @Autowired
|
||||
// private OrderReturnMapper orderReturnMapper;
|
||||
// @Autowired
|
||||
// private OrderLogisticsService orderLogisticsService;
|
||||
//
|
||||
// @Reference(validation = "true", version = "${dubbo.consumer.PayRefundService.version}")
|
||||
// private PayRefundService payRefundService;
|
||||
// @Reference(validation = "true", version = "${dubbo.consumer.DataDictService.version}")
|
||||
// private DataDictService dataDictService;
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult orderReturnApply(OrderReturnApplyDTO orderReturnDTO) {
|
||||
// OrderDO checkOrder = orderMapper.selectById(orderReturnDTO.getOrderId());
|
||||
//
|
||||
// // 检查订单是否 存在
|
||||
// if (checkOrder == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// // 转换 DO
|
||||
// OrderReturnDO orderReturnDO = OrderReturnConvert.INSTANCE.convert(orderReturnDTO);
|
||||
// orderReturnDO
|
||||
// .setOrderId(checkOrder.getId())
|
||||
// // TODO: 2019-04-27 Sin 服务号生成规则
|
||||
// .setServiceNumber(UUID.randomUUID().toString().replaceAll("-", "").substring(0, 16))
|
||||
// .setOrderNo(checkOrder.getOrderNo())
|
||||
// .setStatus(OrderReturnStatusEnum.RETURN_APPLICATION.getValue())
|
||||
// .setCreateTime(new Date());
|
||||
//
|
||||
// // 保存申请信息
|
||||
// orderReturnMapper.insert(orderReturnDO);
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String updateRefundSuccess(String orderId, Integer refundPrice) {
|
||||
// return "success";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult<OrderReturnInfoBO> orderApplyInfo(Integer orderId) {
|
||||
//
|
||||
// // 检查订单是否退货
|
||||
// OrderReturnDO orderReturnDO = orderReturnMapper.selectByOrderId(orderId);
|
||||
// if (orderReturnDO == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NO_RETURN_APPLY.getCode());
|
||||
// }
|
||||
//
|
||||
// List<OrderItemDO> orderItemDOList = orderItemMapper
|
||||
// .selectByDeletedAndOrderId(DeletedStatusEnum.DELETED_NO.getValue(), orderId);
|
||||
//
|
||||
// // 订单不存在
|
||||
// if (CollectionUtils.isEmpty(orderItemDOList)) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// // 转换 returnInfo
|
||||
// OrderReturnInfoBO.ReturnInfo returnInfo = OrderReturnConvert.INSTANCE.convert(orderReturnDO);
|
||||
// List<OrderReturnInfoBO.OrderItem> itemList = OrderReturnConvert.INSTANCE.convert(orderItemDOList);
|
||||
//
|
||||
// // 物流信息
|
||||
// CommonResult<OrderLastLogisticsInfoBO> lastLogisticsCommonResult = orderLogisticsService
|
||||
// .getLastLogisticsInfo(orderReturnDO.getOrderLogisticsId());
|
||||
//
|
||||
// if (lastLogisticsCommonResult.isError()) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_LOGISTICS_INVOKING_FAIL.getCode());
|
||||
// }
|
||||
//
|
||||
// OrderLastLogisticsInfoBO lastLogisticsInfoBO = lastLogisticsCommonResult.getData();
|
||||
// OrderReturnInfoBO orderReturnInfoBO = new OrderReturnInfoBO()
|
||||
// .setOrderItems(itemList)
|
||||
// .setReturnInfo(returnInfo)
|
||||
// .setLastLogisticsInfo(lastLogisticsInfoBO);
|
||||
//
|
||||
// return CommonResult.success(orderReturnInfoBO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult<OrderReturnListBO> orderReturnList(OrderReturnQueryDTO queryDTO) {
|
||||
// int totalCount = orderReturnMapper.selectListCount(queryDTO);
|
||||
// if (totalCount <= 0) {
|
||||
// return CommonResult.success(
|
||||
// new OrderReturnListBO()
|
||||
// .setData(Collections.EMPTY_LIST)
|
||||
// .setIndex(queryDTO.getIndex())
|
||||
// .setPageSize(queryDTO.getPageSize())
|
||||
// .setTotalCount(0)
|
||||
// );
|
||||
// }
|
||||
// List<OrderReturnDO> orderReturnDOList = orderReturnMapper.selectList(queryDTO);
|
||||
// List<OrderReturnListBO.OrderReturn> orderReturnListBOList
|
||||
// = OrderReturnConvert.INSTANCE.convertListBO(orderReturnDOList);
|
||||
//
|
||||
// return CommonResult.success(
|
||||
// new OrderReturnListBO()
|
||||
// .setData(orderReturnListBOList)
|
||||
// .setIndex(queryDTO.getIndex())
|
||||
// .setPageSize(queryDTO.getPageSize())
|
||||
// .setTotalCount(totalCount)
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult orderReturnAgree(Integer id) {
|
||||
// OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id);
|
||||
// if (orderReturnDO == null) {
|
||||
// return ServiceExceptionUtil
|
||||
// .error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// orderReturnMapper.updateById(
|
||||
// new OrderReturnDO()
|
||||
// .setId(id)
|
||||
// .setApprovalTime(new Date())
|
||||
// .setStatus(OrderReturnStatusEnum.APPLICATION_SUCCESSFUL.getValue())
|
||||
// );
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult orderReturnRefuse(Integer id) {
|
||||
// OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id);
|
||||
// if (orderReturnDO == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// orderReturnMapper.updateById(
|
||||
// new OrderReturnDO()
|
||||
// .setId(id)
|
||||
// .setRefuseTime(new Date())
|
||||
// .setStatus(OrderReturnStatusEnum.APPLICATION_FAIL.getValue())
|
||||
// );
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CommonResult confirmReceipt(Integer id) {
|
||||
// OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id);
|
||||
// if (orderReturnDO == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// orderReturnMapper.updateById(
|
||||
// new OrderReturnDO()
|
||||
// .setId(id)
|
||||
// .setReceiverTime(new Date())
|
||||
// .setStatus(OrderReturnStatusEnum.ORDER_RECEIPT.getValue())
|
||||
// );
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public CommonResult refund(Integer id, String ip) {
|
||||
// OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id);
|
||||
// if (orderReturnDO == null) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_NOT_EXISTENT.getCode());
|
||||
// }
|
||||
//
|
||||
// // TODO: 2019/5/8 sin, 发送 MQ 消息,申请退货成功!
|
||||
// // TODO: 2019/5/8 sin 退款:支付系统退款
|
||||
// // TODO: 2019/5/8 sin 退货+退款:退回商品签收后,支付系统退款
|
||||
// // TODO: 2019/5/8 sin 事务一致性 [重要]
|
||||
//
|
||||
//
|
||||
// CommonResult<DataDictBO> dataDictResult = dataDictService
|
||||
// .getDataDict(DictKeyConstants.ORDER_RETURN_REASON, orderReturnDO.getReason());
|
||||
//
|
||||
// if (dataDictResult.isError()) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.DICT_SERVER_INVOKING_FAIL.getCode());
|
||||
// }
|
||||
//
|
||||
// // 支付退款
|
||||
// String orderDescription = dataDictResult.getData()
|
||||
// .getDisplayName() + "(" + orderReturnDO.getDescribe() + ")";
|
||||
//
|
||||
// CommonResult payResult = payRefundService.submitRefund(
|
||||
// new PayRefundSubmitDTO()
|
||||
// .setAppId(PayAppId.APP_ID_SHOP_ORDER)
|
||||
// .setOrderId(String.valueOf(orderReturnDO.getOrderId()))
|
||||
// .setPrice(orderReturnDO.getRefundPrice())
|
||||
// .setOrderDescription(orderDescription)
|
||||
// .setCreateIp(ip)
|
||||
// );
|
||||
//
|
||||
// if (!payResult.isSuccess()) {
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_RETURN_REFUND_FAILED.getCode());
|
||||
// }
|
||||
//
|
||||
// // 更新 订单退货 信息
|
||||
// orderReturnMapper.updateById(
|
||||
// new OrderReturnDO()
|
||||
// .setId(id)
|
||||
// .setClosingTime(new Date())
|
||||
// .setStatus(OrderReturnStatusEnum.RETURN_SUCCESS.getValue())
|
||||
// );
|
||||
//
|
||||
// // 更新订单
|
||||
// orderMapper.updateById(
|
||||
// new OrderDO()
|
||||
// .setId(orderReturnDO.getOrderId())
|
||||
// .setClosingTime(new Date())
|
||||
// .setStatus(OrderStatusEnum.COMPLETED.getValue())
|
||||
// );
|
||||
//
|
||||
// // 更新订单
|
||||
// orderItemMapper.updateByOrderId(
|
||||
// orderReturnDO.getOrderId(),
|
||||
// new OrderItemDO()
|
||||
// .setClosingTime(new Date())
|
||||
// .setStatus(OrderStatusEnum.COMPLETED.getValue())
|
||||
// );
|
||||
// return CommonResult.success(null);
|
||||
// }
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.comment.OrderCommentMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,order_id,order_no,product_spu_id,product_spu_name,product_sku_id,product_sku_attrs,product_sku_price,product_sku_pic_url,
|
||||
user_id,user_avatar,user_nick_name,star,product_description_star,logistics_star,merchant_star,replay_count,like_count,comment_content,
|
||||
comment_pics,comment_state,create_time,update_time
|
||||
</sql>
|
||||
|
||||
<!--插入-->
|
||||
<insert id="insert" parameterType="OrderCommentDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO order_comment(order_id,order_no,product_spu_id,product_spu_name,product_sku_id,
|
||||
product_sku_attrs,product_sku_price,product_sku_pic_url,user_id,user_avatar,user_nick_name,star,
|
||||
product_description_star,logistics_star,merchant_star,comment_content,comment_pics,comment_state,create_time,update_time)
|
||||
VALUES (#{orderId},#{orderNo},#{productSpuId},#{productSpuName},#{productSkuId},#{productSkuAttrs},
|
||||
#{productSkuPrice},#{productSkuPicUrl},#{userId},#{userAvatar},#{userNickName},#{star},
|
||||
#{productDescriptionStar},#{logisticsStar},#{merchantStar},#{commentContent},#{commentPics},#{commentState},#{createTime}, #{updateTime});
|
||||
</insert>
|
||||
|
||||
<!--根据 sku id 获取评论总数-->
|
||||
<select id="selectCommentTotalCountByProductSkuId" parameterType="Integer" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM order_comment
|
||||
WHERE
|
||||
product_sku_id = #{productSkuId}
|
||||
</select>
|
||||
|
||||
<!--分页获取评论分页-->
|
||||
<select id="selectCommentPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
product_sku_id = #{productSkuId}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo*pageSize},${pageSize}
|
||||
</select>
|
||||
|
||||
<!--根据评论 id 获取用户详情-->
|
||||
<select id="selectCommentInfoByCommentId" parameterType="Integer" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!--分页获取订单评论状态信息详情-->
|
||||
<select id="selectOrderCommentStateInfoPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND
|
||||
comment_state = #{commentState}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo*pageSize},${pageSize}
|
||||
</select>
|
||||
|
||||
<!--获取订单评论状态信息详情总数-->
|
||||
<select id="selectOrderCommentStateInfoTotal" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM order_comment
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND
|
||||
comment_state = #{commentState}
|
||||
</select>
|
||||
|
||||
<!--订单评论超时分页-->
|
||||
<select id="selectOrderCommentTimeOutPage" parameterType="cn.iocoder.mall.order.api.dto.OrderCommentTimeOutPageDTO" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
comment_state = #{commentTimeOut.commentState}
|
||||
HAVING
|
||||
TIMESTAMPDIFF(DAY,create_time,NOW()) > #{commentTimeOut.overDay}
|
||||
LIMIT ${commentTimeOut.pageNo*commentTimeOut.pageSize},${commentTimeOut.pageSize}
|
||||
</select>
|
||||
|
||||
<!--批量更新订单评论-->
|
||||
<update id="updateBatchOrderCommentState">
|
||||
UPDATE order_comment
|
||||
SET
|
||||
comment_state = #{commentState}
|
||||
WHERE
|
||||
id
|
||||
IN
|
||||
<if test="list !=null">
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -1,81 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.comment.OrderCommentReplayMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,
|
||||
reply_user_id,reply_user_nick_name,reply_user_avatar,user_type,reply_like_count,create_time,update_time
|
||||
</sql>
|
||||
|
||||
<!--插入-->
|
||||
<insert id="insert" parameterType="OrderCommentReplyDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id,
|
||||
reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time)
|
||||
VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId},
|
||||
#{replyUserNickName},#{replyUserAvatar},#{userType},#{createTime},#{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--根据评论 id 和用户类型获取商家回复列表-->
|
||||
<select id="selectCommentMerchantReplyByCommentIdAndUserType" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!--根据评论 id 和用户类型获取评论总数-->
|
||||
<select id="selectCommentReplyTotalCountByCommentId" parameterType="Integer" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
</select>
|
||||
|
||||
<!--分页用户回复-->
|
||||
<select id="selectCommentReplyPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo*pageSize},${pageSize}
|
||||
</select>
|
||||
|
||||
<!--根据评论 id 查询商家最新的评论列表-->
|
||||
<select id="selectCommentNewMerchantReplyByCommentIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
create_time=(SELECT
|
||||
a.maxtime
|
||||
FROM
|
||||
(SELECT
|
||||
MAX(create_time) AS maxtime,comment_id
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id IN
|
||||
<foreach collection="commentIds" item="commentId" separator="," open="(" close=")">
|
||||
#{commentId}
|
||||
</foreach>
|
||||
GROUP BY comment_id ) AS a)
|
||||
AND
|
||||
comment_id IN
|
||||
<foreach collection="commentIds" item="commentId" separator="," open="(" close=")">
|
||||
#{commentId}
|
||||
</foreach>
|
||||
AND
|
||||
user_type = #{userType}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,76 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.order.OrderLogisticsDetailMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,
|
||||
order_logistics_id,
|
||||
logistics_time,
|
||||
logistics_information,
|
||||
create_time,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入
|
||||
-->
|
||||
<insert id="insert" parameterType="CartItemDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO cart_item (order_logistics_id, logistics_time, logistics_information,
|
||||
create_time, update_time)
|
||||
VALUES (#{orderLogisticsId}, #{logisticsTime}, #{logisticsInformation},
|
||||
#{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
查询 - 根据 物流id
|
||||
-->
|
||||
<select id="selectByOrderLogisticsId"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id = #{orderLogisticsId}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 物流ids
|
||||
-->
|
||||
<select id="selectByOrderLogisticsIds"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id IN
|
||||
<foreach collection="orderLogisticsIds" item="orderLogisticsId" separator="," open="(" close=")">
|
||||
#{orderLogisticsId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 最新的物流信息
|
||||
-->
|
||||
<select id="selectLast" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id IN
|
||||
<foreach collection="orderLogisticsIds" item="orderLogisticsId" separator="," open="(" close=")">
|
||||
#{orderLogisticsId}
|
||||
</foreach>
|
||||
ORDER BY create_time DESC
|
||||
LIMIT 0, 1
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 last 根据物理id
|
||||
-->
|
||||
<select id="selectLastByLogisticsId"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id = #{orderLogisticsId}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,80 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.order.OrderLogisticsMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderLogisticsDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_logistics` (
|
||||
area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
|
||||
) VALUES (
|
||||
#{areaNo}, #{name}, #{mobile}, #{address},
|
||||
#{logistics}, #{logisticsNo}, #{createTime}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
可更新字段
|
||||
-->
|
||||
<sql id="updateFieldSql" >
|
||||
<set>
|
||||
<if test="areaNo != null">
|
||||
, area_no = #{areaNo}
|
||||
</if>
|
||||
<if test="name != null">
|
||||
, `name` = #{name}
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
, mobile = #{mobile}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
, address = #{address}
|
||||
</if>
|
||||
<if test="logistics != null">
|
||||
, logistics = #{logistics}
|
||||
</if>
|
||||
<if test="logisticsNo != null">
|
||||
, logistics_no = #{logisticsNo}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
更新 - 根据id
|
||||
-->
|
||||
<update id="updateById">
|
||||
UPDATE `order_logistics`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
查询 - 根据 ids
|
||||
-->
|
||||
<select id="selectByIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_logistics`
|
||||
WHERE `id`
|
||||
IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 ids
|
||||
-->
|
||||
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_logistics`
|
||||
WHERE `id` = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.order.OrderRecipientMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, order_id, `area_no`, `name`, mobile, address, `type`,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderRecipientDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_recipient` (
|
||||
order_id, `area_no`, `name`, mobile, address,
|
||||
`type`, create_time, update_time
|
||||
) VALUES (
|
||||
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
|
||||
#{type}, #{createTime,jdbcType=TIMESTAMP} , #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderId
|
||||
-->
|
||||
<select id="selectByOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_recipient`
|
||||
WHERE order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderIds
|
||||
-->
|
||||
<select id="selectByOrderIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_recipient`
|
||||
WHERE order_id IN
|
||||
<foreach collection="orderIds" item="orderId" separator="," open="(" close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.order.OrderReturnMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,
|
||||
service_number,
|
||||
order_id,
|
||||
order_no,
|
||||
order_logistics_id,
|
||||
refund_price,
|
||||
reason,
|
||||
`describe`,
|
||||
approval_time,
|
||||
refuse_time,
|
||||
logistics_time,
|
||||
receiver_time,
|
||||
closing_time,
|
||||
service_type,
|
||||
status,
|
||||
create_time,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderReturnDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_return` (
|
||||
service_number, order_id, order_no, order_logistics_id,
|
||||
refund_price, reason, `describe`,
|
||||
approval_time, refuse_time, logistics_time, receiver_time, closing_time,
|
||||
service_type, status,
|
||||
create_time, update_time)
|
||||
VALUES (
|
||||
#{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId},
|
||||
${refundPrice}, #{reason}, #{describe},
|
||||
#{approvalTime}, #{refuse_time}, #{logisticsTime}, #{receiverTime}, #{closingTime},
|
||||
#{serviceType}, #{status}, #{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
更新 - 可更新的字段
|
||||
-->
|
||||
<sql id="updateFieldSql">
|
||||
<set>
|
||||
<if test="orderLogisticsId != null">
|
||||
, order_logistics_id = #{orderLogisticsId}
|
||||
</if>
|
||||
<if test="refundPrice != null">
|
||||
, refund_price = #{refundPrice}
|
||||
</if>
|
||||
<if test="reason != null">
|
||||
, reason = #{reason}
|
||||
</if>
|
||||
<if test="describe != null">
|
||||
, `describe` = #{describe}
|
||||
</if>
|
||||
<if test="approvalTime != null">
|
||||
, approval_time = #{approvalTime}
|
||||
</if>
|
||||
<if test="refuseTime != null">
|
||||
, refuse_time = #{refuseTime}
|
||||
</if>
|
||||
<if test="logisticsTime != null">
|
||||
, logistics_time = #{logisticsTime}
|
||||
</if>
|
||||
<if test="receiverTime != null">
|
||||
, receiver_time = #{receiverTime}
|
||||
</if>
|
||||
<if test="closingTime != null">
|
||||
, closing_time = #{closingTime}
|
||||
</if>
|
||||
<if test="serviceType != null">
|
||||
, service_type = #{serviceType}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
, status = #{status}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
, create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
, update_time = #{updateTime}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
更新 - 根据 id 更新
|
||||
-->
|
||||
<update id="updateById" parameterType="OrderReturnDO">
|
||||
UPDATE `order_return`
|
||||
<include refid="updateFieldSql"/>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
查询 - 根据id 查询
|
||||
-->
|
||||
<select id="selectByOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE order_id = #{orderId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!--
|
||||
列表查询 - where
|
||||
-->
|
||||
<sql id="selectListWhere">
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="serviceNumber != null">
|
||||
AND service_number = #{serviceNumber}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
AND order_id = #{orderId}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
AND order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="startCreateTime != null and endCreateTime != null">
|
||||
AND create_time >= #{startCreateTime}
|
||||
AND create_time <= #{endCreateTime}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
列表查询 - count
|
||||
-->
|
||||
<select id="selectListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM `order_return`
|
||||
WHERE 1 = 1
|
||||
<include refid="selectListWhere" />
|
||||
</select>
|
||||
|
||||
|
||||
<!--
|
||||
列表查询 - queryDTO
|
||||
-->
|
||||
<select id="selectList" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE 1 = 1
|
||||
<include refid="selectListWhere" />
|
||||
<bind name="limitIndex" value="pageSize * (index - 1)"/>
|
||||
LIMIT #{limitIndex}, #{pageSize}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 id 查询
|
||||
-->
|
||||
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,37 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.comment;
|
||||
|
||||
import cn.iocoder.common.framework.enums.MallConstants;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复模块 Api(user)
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-31 18:00
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(MallConstants.ROOT_PATH_USER + "/order_comment_reply")
|
||||
@Api("用户评论回复模块 ")
|
||||
public class OrderCommentReplyController {
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.provider.OrderCommentService.version}")
|
||||
// private OrderCommentReplyService orderCommentReplyService;
|
||||
//
|
||||
// @PostMapping("create_order_comment_reply")
|
||||
// //@RequiresLogin
|
||||
// @ApiOperation(value = "创建订单回复")
|
||||
// public CommonResult<OrderCommentReplyCreateBO> createOrderCommentReply(@RequestBody @Validated OrderCommentReplyCreateDTO orderCommentReplyCreateDTO){
|
||||
// return success(orderCommentReplyService.createOrderCommentReply(orderCommentReplyCreateDTO));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("order_comment_reply_page")
|
||||
// //@RequiresLogin
|
||||
// @ApiOperation(value = "分页获取评论回复")
|
||||
// public CommonResult<OrderCommentReplyPageBO> getOrderCommentReplyPage(@Validated OrderCommentReplyPageDTO orderCommentReplyCreateDTO){
|
||||
// return success(orderCommentReplyService.getOrderCommentReplyPage(orderCommentReplyCreateDTO));
|
||||
// }
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.comment;
|
||||
|
||||
import cn.iocoder.common.framework.enums.MallConstants;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO;
|
||||
import cn.iocoder.mall.order.biz.service.comment.OrderCommentService;
|
||||
import cn.iocoder.mall.order.rest.convert.comment.UsersOrderCommentConvert;
|
||||
import cn.iocoder.mall.order.rest.request.comment.UsersOrderCommentAddRequest;
|
||||
import cn.iocoder.mall.order.rest.request.comment.UsersOrderCommentPageRequest;
|
||||
import cn.iocoder.mall.order.rest.response.comment.UsersOrderCommentPageResponse;
|
||||
import cn.iocoder.mall.security.core.context.UserSecurityContextHolder;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* UsersOrderCommentController
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/12 22:56
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(MallConstants.ROOT_PATH_USER + "/order_comment")
|
||||
@Api("订单商品评论模块")
|
||||
public class UsersOrderCommentController {
|
||||
|
||||
private final OrderCommentService orderCommentService;
|
||||
|
||||
public UsersOrderCommentController(
|
||||
OrderCommentService orderCommentService) {
|
||||
this.orderCommentService = orderCommentService;
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加订单评论")
|
||||
public CommonResult<Boolean> add(
|
||||
@RequestBody @Validated UsersOrderCommentAddRequest request) {
|
||||
Integer userId = UserSecurityContextHolder.getContext().getUserId();
|
||||
request.setUserId(userId);
|
||||
|
||||
return CommonResult.success(orderCommentService.addOrderComment(
|
||||
UsersOrderCommentConvert.INSTANCE.convert(request)));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation(value = "获取订单评论")
|
||||
public CommonResult<PageResult<UsersOrderCommentPageResponse>> page(
|
||||
UsersOrderCommentPageRequest request) {
|
||||
OrderCommentPageDTO orderCommentPageDTO = UsersOrderCommentConvert.INSTANCE
|
||||
.convert(request);
|
||||
return CommonResult.success(UsersOrderCommentConvert.INSTANCE
|
||||
.convert(orderCommentService.page(orderCommentPageDTO)));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.order;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单退货
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-05-06 21:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("admins/order_return")
|
||||
@Api("订单退货(admins api)")
|
||||
public class AdminOrderReturnController {
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.provider.OrderReturnService.version}")
|
||||
// private OrderReturnService orderReturnService;
|
||||
//
|
||||
// @GetMapping("list")
|
||||
// public CommonResult<OrderReturnListBO> list(@Validated OrderReturnQueryPO queryPO) {
|
||||
// OrderReturnQueryDTO queryDTO = OrderReturnConvert.INSTANCE.convert(queryPO);
|
||||
// return orderReturnService.orderReturnList(queryDTO);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("agree")
|
||||
// public CommonResult agree(@RequestParam("id") Integer id) {
|
||||
// return orderReturnService.orderReturnAgree(id);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("refuse")
|
||||
// public CommonResult refuse(@RequestParam("id") Integer id) {
|
||||
// return orderReturnService.orderReturnRefuse(id);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("confirm_receipt")
|
||||
// public CommonResult confirmReceipt(@RequestParam("id") Integer id) {
|
||||
// return orderReturnService.confirmReceipt(id);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("confirm_refund")
|
||||
// public CommonResult confirmRefund(HttpServletRequest request, @RequestParam("id") Integer id) {
|
||||
// String ip = HttpUtil.getIp(request);
|
||||
// return orderReturnService.refund(id, ip);
|
||||
// }
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.order;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单API(admins)
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-24 10:22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("admins/order")
|
||||
@Api(value = "订单 API(admins)")
|
||||
public class AdminsOrderController {
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.provider.OrderService.version}")
|
||||
// private OrderService orderService;
|
||||
//
|
||||
// @GetMapping("page")
|
||||
// @ApiOperation("订单列表")
|
||||
// public CommonResult<OrderPageBO> getOrderPage(@Validated OrderPageQueryPO orderPageQueryVO) {
|
||||
// OrderQueryDTO orderQueryDTO = OrderConvertAPP.INSTANCE.convert(orderPageQueryVO);
|
||||
// return orderService.getOrderPage(orderQueryDTO);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("order_items")
|
||||
// @ApiOperation("订单列表")
|
||||
// public CommonResult<List<OrderItemBO>> getOrderItems(@RequestParam("orderId") Integer orderId) {
|
||||
// return orderService.getOrderItems(orderId);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("order_recipient_info")
|
||||
// @ApiOperation("订单收件人信息")
|
||||
// public CommonResult<OrderRecipientBO> getOrderRecipientBO(@RequestParam("orderId") Integer orderId) {
|
||||
// return orderService.getOrderRecipientBO(orderId);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("order_deliver")
|
||||
// @ApiOperation("订单发货")
|
||||
// public CommonResult<OrderRecipientBO> orderDeliver(@RequestBody @Validated OrderDeliverPO orderDeliverPO) {
|
||||
// return orderService.orderDelivery(OrderDeliveryConvert.INSTANCE.convert(orderDeliverPO));
|
||||
// }
|
||||
//
|
||||
// @PutMapping("update_remark")
|
||||
// @ApiOperation("更新-更新订单备注")
|
||||
// public CommonResult updateRemark(@RequestParam("orderId") Integer orderId,
|
||||
// @RequestParam("remark") String remark) {
|
||||
// return orderService.updateOrderRemake(orderId, remark);
|
||||
// }
|
||||
//
|
||||
// @PutMapping("cancel_order")
|
||||
// @ApiOperation("取消订单")
|
||||
// public CommonResult cancelOrder(
|
||||
// @RequestParam("orderId") Integer orderId,
|
||||
// @RequestParam("reasons") Integer reasons,
|
||||
// @RequestParam(value = "otherReasons", required = false) String otherReasons) {
|
||||
// return orderService.cancelOrder(orderId, reasons, otherReasons);
|
||||
// }
|
||||
//
|
||||
// @PutMapping("order_item/update_pay_amount")
|
||||
// @ApiOperation("更新-订单item实付金额")
|
||||
// public CommonResult updateOrderItemPayAmount(@RequestParam("orderId") Integer orderId,
|
||||
// @RequestParam("orderItemId") Integer orderItemId,
|
||||
// @RequestParam("payAmount") Integer payAmount) {
|
||||
// return orderService.updateOrderItemPayAmount(orderId, orderItemId, payAmount);
|
||||
// }
|
||||
//
|
||||
// @PutMapping("order_item/update")
|
||||
// @ApiOperation("更新-订单item")
|
||||
// public CommonResult updateOrderItem(@RequestBody @Validated OrderItemUpdatePO orderItemUpdateVO) {
|
||||
// OrderItemUpdateDTO dto = OrderConvertAPP.INSTANCE.convert(orderItemUpdateVO);
|
||||
// return orderService.updateOrderItem(dto);
|
||||
// }
|
||||
//
|
||||
// @PutMapping("logistics/update")
|
||||
// @ApiOperation("更新-订单物流")
|
||||
// public CommonResult updateLogistics(@RequestBody @Validated OrderLogisticsPO orderLogisticsVO) {
|
||||
// OrderLogisticsUpdateDTO dto = OrderConvertAPP.INSTANCE.convert(orderLogisticsVO);
|
||||
// return orderService.updateLogistics(dto);
|
||||
// }
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.order;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单API(users)
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-24 11:24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("users/order")
|
||||
@Api(description = "用户订单") // TODO FROM 芋艿 to 小范,description 已经废弃啦
|
||||
public class UsersOrderController {
|
||||
|
||||
//
|
||||
// @PostMapping("confirm_receiving")
|
||||
// @RequiresLogin
|
||||
// @ApiOperation("确认收货")
|
||||
// public CommonResult confirmReceiving(@RequestParam("orderId") Integer orderId) {
|
||||
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
|
||||
// return orderService.confirmReceiving(userId, orderId);
|
||||
// }
|
||||
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.order;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单物流 controller
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-12 22:24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("users/order_logistics")
|
||||
@Api(description = "订单物流信息")
|
||||
public class UsersOrderLogisticsController {
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.provider.OrderLogisticsService.version}")
|
||||
// private OrderLogisticsService orderLogisticsService;
|
||||
//
|
||||
// @Reference(validation = "true", version = "${dubbo.consumer.DataDictService.version}")
|
||||
// private DataDictService dataDictService;
|
||||
//
|
||||
// @GetMapping("info")
|
||||
// @ApiOperation("物流详细 - 物流通用")
|
||||
// public CommonResult<OrderLogisticsInfoBO> logistics(@RequestParam("logisticsId") Integer logisticsId) {
|
||||
// return orderLogisticsService.getLogisticsInfo(logisticsId);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("info_order")
|
||||
// @ApiOperation("物流详细 - 返回订单所关联的所有物流信息(订单用的)")
|
||||
// public CommonResult<OrderLogisticsInfoWithOrderBO> logisticsInfoWithOrder(@RequestParam("orderId") Integer orderId) {
|
||||
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
|
||||
// CommonResult<OrderLogisticsInfoWithOrderBO> commonResult = orderLogisticsService.getOrderLogisticsInfo(userId, orderId);
|
||||
// if (commonResult.isSuccess()) {
|
||||
// OrderLogisticsInfoWithOrderBO orderLogisticsInfoBO = commonResult.getData();
|
||||
// List<OrderLogisticsInfoWithOrderBO.Logistics> logisticsList = orderLogisticsInfoBO.getLogistics();
|
||||
//
|
||||
// // 获取字典值
|
||||
// Set<Integer> dictValues = logisticsList.stream().map(o -> o.getLogistics()).collect(Collectors.toSet());
|
||||
// if (!CollectionUtils.isEmpty(dictValues)) {
|
||||
// CommonResult<List<DataDictBO>> dictResult = dataDictService
|
||||
// .getDataDictList(DictKeyConstants.ORDER_LOGISTICS_COMPANY, dictValues);
|
||||
//
|
||||
// if (dictResult.isError()) {
|
||||
// // 错误情况
|
||||
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.DICT_SERVER_INVOKING_FAIL.getCode());
|
||||
// }
|
||||
//
|
||||
// // 转换结果字典值
|
||||
// Map<String, DataDictBO> dataDictBOMap = dictResult.getData()
|
||||
// .stream().collect(Collectors.toMap(o -> o.getValue(), o -> o));
|
||||
//
|
||||
// logisticsList.stream().map(o -> {
|
||||
// String dicValue = o.getLogistics().toString();
|
||||
// if (dataDictBOMap.containsKey(dicValue)) {
|
||||
// o.setLogisticsText(dataDictBOMap.get(dicValue).getDisplayName());
|
||||
// }
|
||||
// return o;
|
||||
// }).collect(Collectors.toList());
|
||||
// }
|
||||
// }
|
||||
// return commonResult;
|
||||
// }
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.controller.order;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 订单退款/售后流程
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-25 22:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("users/order_return")
|
||||
public class UsersOrderReturnController {
|
||||
|
||||
// @Reference(validation = "true", version = "${dubbo.provider.OrderReturnService.version}")
|
||||
// private OrderReturnService orderReturnService;
|
||||
//
|
||||
// @Reference(validation = "true", version = "${dubbo.consumer.DataDictService.version}")
|
||||
// private DataDictService dataDictService;
|
||||
//
|
||||
// @GetMapping("reason")
|
||||
// @ApiOperation("原因")
|
||||
// public CommonResult<List<DataDictBO>> orderReturnReason() {
|
||||
// return dataDictService.getDataDict(DictKeyConstants.ORDER_RETURN_REASON);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("apply")
|
||||
// @ApiOperation("订单售后")
|
||||
// public CommonResult orderReturnApply(@RequestBody OrderReturnApplyPO orderReturnApplyPO) {
|
||||
// OrderReturnApplyDTO applyDTO = OrderReturnConvert.INSTANCE.convert(orderReturnApplyPO);
|
||||
// return orderReturnService.orderReturnApply(applyDTO);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("info")
|
||||
// @ApiOperation("订单售后详细")
|
||||
// public CommonResult<OrderReturnInfoBO> orderApplyInfo(@RequestParam("orderId") Integer orderId) {
|
||||
// CommonResult<OrderReturnInfoBO> commonResult = orderReturnService.orderApplyInfo(orderId);
|
||||
//
|
||||
// // 转换 字典值
|
||||
// if (commonResult.isSuccess()) {
|
||||
// CommonResult<DataDictBO> dataDictResult = dataDictService.getDataDict(
|
||||
// DictKeyConstants.ORDER_RETURN_SERVICE_TYPE,
|
||||
// commonResult.getData().getReturnInfo().getServiceType());
|
||||
//
|
||||
// if (dataDictResult.isSuccess()) {
|
||||
// commonResult.getData().getReturnInfo().setServiceTypeText(dataDictResult.getData().getDisplayName());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return commonResult;
|
||||
// }
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.convert.comment;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO;
|
||||
import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO;
|
||||
import cn.iocoder.mall.order.rest.request.comment.UsersOrderCommentAddRequest;
|
||||
import cn.iocoder.mall.order.rest.request.comment.UsersOrderCommentPageRequest;
|
||||
import cn.iocoder.mall.order.rest.response.comment.UsersOrderCommentPageResponse;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* UsersOrderCommentConvert
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/13 0:15
|
||||
*/
|
||||
@Mapper
|
||||
public interface UsersOrderCommentConvert {
|
||||
|
||||
UsersOrderCommentConvert INSTANCE = Mappers.getMapper(UsersOrderCommentConvert.class);
|
||||
|
||||
|
||||
/**
|
||||
* 保存订单评论参数转换
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
OrderCommentAddDTO convert(UsersOrderCommentAddRequest request);
|
||||
|
||||
/**
|
||||
* 分页参数转换
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
OrderCommentPageDTO convert(UsersOrderCommentPageRequest request);
|
||||
|
||||
/**
|
||||
* 分页转换
|
||||
*
|
||||
* @param pageResult
|
||||
* @return
|
||||
*/
|
||||
PageResult<UsersOrderCommentPageResponse> convert(PageResult<OrderCommentPageBO> pageResult);
|
||||
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单发货
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-05 16:55
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(description = "订单发货PO")
|
||||
public class AdminsOrderDeliverRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@ApiModelProperty("订单id")
|
||||
@NotNull(message = "orderId不能为空")
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 物流 (字典)
|
||||
*/
|
||||
@ApiModelProperty("物流商家")
|
||||
@NotNull(message = "必须选择商家")
|
||||
private Integer logistics;
|
||||
/**
|
||||
* 物流编号
|
||||
*/
|
||||
@ApiModelProperty("物流单号")
|
||||
@NotNull(message = "没有物流单号")
|
||||
private String logisticsNo;
|
||||
/**
|
||||
* 订单 items
|
||||
*/
|
||||
@ApiModelProperty("订单items")
|
||||
@NotNull(message = "没有选择发货的商品")
|
||||
private List<Integer> orderItemIds;
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单 item 更新
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-24 11:16
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("订单item更新")
|
||||
public class AdminsOrderItemUpdateRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@NotNull(message = "id不能为空!")
|
||||
@ApiModelProperty("编号(orderItemId)")
|
||||
private Integer id;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
@NotNull(message = "商品id不能为空!")
|
||||
@ApiModelProperty("商品id")
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull(message = "数量不能为空!")
|
||||
@Size(max = 9999, min = 1, message = "商品数量 1 ~ 9999")
|
||||
@ApiModelProperty("商品数量")
|
||||
private Integer quantity;
|
||||
/**
|
||||
* 金额(分)
|
||||
*/
|
||||
@NotNull(message = "商品金额")
|
||||
@Size(max = 99999999, min = 0, message = "商品金额 0 ~ 99999999")
|
||||
@ApiModelProperty("商品金额")
|
||||
private Integer price;
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 订单物流
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-24 11:01
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("订单物流信息")
|
||||
public class AdminsOrderLogisticsRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单 id
|
||||
*/
|
||||
@NotNull(message = "订单id不能为空!")
|
||||
@ApiModelProperty("物流id")
|
||||
private Integer id;
|
||||
/**
|
||||
* 收件区域编号
|
||||
*/
|
||||
@NotNull(message = "区域编号不能为空!")
|
||||
@ApiModelProperty("区域编号")
|
||||
private String areaNo;
|
||||
/**
|
||||
* 收件人名称
|
||||
*/
|
||||
@NotNull(message = "收件人姓名不能为空!")
|
||||
@ApiModelProperty("收件人姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 收件手机号
|
||||
*/
|
||||
@NotNull(message = "手机号不能为空!")
|
||||
@Size(max = 11, min = 11, message = "手机号在11位!")
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
/**
|
||||
* 收件详细地址
|
||||
*/
|
||||
@NotNull(message = "收件详细地址不能为空")
|
||||
@Size(max = 250, min = 5, message = "收件地址应该在 5 ~ 250 个字符之间")
|
||||
@ApiModelProperty("手机地址")
|
||||
private String address;
|
||||
/**
|
||||
* 物流编号
|
||||
*/
|
||||
@ApiModelProperty("物流订号")
|
||||
private String logisticsNo;
|
||||
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 订单 page 查询 vo
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-24 10:40
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("订单查询")
|
||||
public class AdminsOrderPageQueryRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("订单id")
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@ApiModelProperty("订单号")
|
||||
private String orderNo;
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 付款时间(待发货)
|
||||
*/
|
||||
@ApiModelProperty("start付款时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startPaymentTime;
|
||||
@ApiModelProperty("end付款时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endPaymentTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("start订单创建时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startCreateTime;
|
||||
@ApiModelProperty("end订单创建时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endCreateTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty("start成交时间")
|
||||
private LocalDateTime startClosingTime;
|
||||
@ApiModelProperty("end成交时间")
|
||||
private LocalDateTime endClosingTime;
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
@ApiModelProperty("订单状态")
|
||||
private Integer status;
|
||||
@ApiModelProperty("删除状态")
|
||||
private Integer deleted;
|
||||
@ApiModelProperty("分页pageNo")
|
||||
private Integer pageNo;
|
||||
@ApiModelProperty("每页大小")
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import cn.iocoder.mall.order.biz.bo.order.OrderBO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单分页 vo
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-27 21:23
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("订单VO")
|
||||
// TODO FROM 芋艿 to jwf1173:命名要改下,rest 以 Admins 和 Users 开头 [DONE]
|
||||
public class AdminsOrderPageRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@ApiModelProperty("分页下表当前")
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 总条数
|
||||
*/
|
||||
@ApiModelProperty("总条数")
|
||||
private Integer total;
|
||||
/**
|
||||
* 订单 list
|
||||
*/
|
||||
@ApiModelProperty("订单信息")
|
||||
private List<OrderBO> orders;
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.admin;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 订单退货 查询 po
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-05-06 21:36
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdminsOrderReturnQueryRequest implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderNo;
|
||||
/**
|
||||
* 服务号
|
||||
*/
|
||||
private String serviceNumber;
|
||||
/**
|
||||
* 创建时间 - 开始
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startCreateTime;
|
||||
/**
|
||||
* 创建时间 - 结束
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endCreateTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
///
|
||||
/// 分页信息
|
||||
|
||||
/**
|
||||
* 分页 index
|
||||
*/
|
||||
@NotNull
|
||||
private Integer index;
|
||||
/**
|
||||
* 分页大小
|
||||
*/
|
||||
@NotNull
|
||||
private Integer pageSize;
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.comment;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 添加订单评论
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/12 23:02
|
||||
*/
|
||||
@ApiModel("用户 - Order 模块 - 添加订单评论")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UsersOrderCommentAddRequest {
|
||||
|
||||
@ApiModelProperty(value = "订单 id", required = true)
|
||||
@NotNull(message = "订单 id 不能为空")
|
||||
private Integer orderId;
|
||||
|
||||
@ApiModelProperty(value = "订单编号", required = true)
|
||||
@NotEmpty(message = "订单编号不能为空")
|
||||
private String orderNo;
|
||||
|
||||
@ApiModelProperty(value = "商品 spu id", required = true)
|
||||
@NotNull(message = "商品的 spu id 不能为空")
|
||||
private Integer productSpuId;
|
||||
|
||||
@ApiModelProperty(value = "商品 spu name", required = true)
|
||||
@NotEmpty(message = "商品的 spu name 不能为空")
|
||||
private String productSpuName;
|
||||
|
||||
@ApiModelProperty(value = "商品 sku id", required = true)
|
||||
@NotNull(message = "商品的 sku id 不能为空")
|
||||
private Integer productSkuId;
|
||||
|
||||
@ApiModelProperty(value = "商品 sku attrs", required = true)
|
||||
@NotEmpty(message = "商品的 sku attrs 不能为空")
|
||||
private String productSkuAttrs;
|
||||
|
||||
@ApiModelProperty(value = "商品 sku price", required = true)
|
||||
@NotNull(message = "商品的 sku price 不能为空")
|
||||
private Integer productSkuPrice;
|
||||
|
||||
@ApiModelProperty(value = "商品 sku url", required = true)
|
||||
@NotEmpty(message = "商品的 sku url 不能为空")
|
||||
private String productSkuPicUrl;
|
||||
|
||||
@ApiModelProperty(value = "用户 id", required = true)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "用户头像", required = true)
|
||||
private String userAvatar;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称", required = true)
|
||||
@NotEmpty(message = "用户昵称不能为空")
|
||||
private String userNickName;
|
||||
|
||||
@ApiModelProperty(value = "评价星级", required = true, example = "1-5")
|
||||
private Integer star;
|
||||
|
||||
@ApiModelProperty(value = "商品描述星级", required = true, example = "1-5")
|
||||
private Integer productDescriptionStar;
|
||||
|
||||
@ApiModelProperty(value = "物流评价星级", required = true, example = "1-5")
|
||||
private Integer logisticsStar;
|
||||
|
||||
@ApiModelProperty(value = "商家评价星级", required = true, example = "1-5")
|
||||
private Integer merchantStar;
|
||||
|
||||
@ApiModelProperty(value = "商家评价内容", required = true, example = "1-5")
|
||||
private String commentContent;
|
||||
|
||||
@ApiModelProperty(value = "评价图片", required = true)
|
||||
private String commentPics;
|
||||
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.comment;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* UsersOrderCommentPageRequest
|
||||
*
|
||||
* @author xiaofeng
|
||||
* @version 1.0
|
||||
* @date 2020/05/20 23:21
|
||||
*/
|
||||
@ApiModel("用户 - Order 模块 - 订单评论分页")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UsersOrderCommentPageRequest extends PageParam {
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
@ApiModelProperty(value = "商品 SKU id", required = true)
|
||||
@NotNull(message = "商品 SKU id 不能为空")
|
||||
private Integer productSkuId;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
package cn.iocoder.mall.order.rest.request.users;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单售后
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-04-25 20:59
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderReturnApplyRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@NotNull(message = "orderId 不能为空!")
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 退款类型
|
||||
*
|
||||
* - 1、退货退款
|
||||
* - 2、退款
|
||||
*
|
||||
* / TODO FROM 芋艿 to xiaofeng:可以瞅瞅 @InEnum 注解,直接校验退货类型
|
||||
*/
|
||||
@NotNull(message = "退货类型不能为空!")
|
||||
private Integer returnType;
|
||||
/**
|
||||
* 退货原因(字典值)
|
||||
*
|
||||
* {@link cn.iocoder.mall.order.biz.constants.OrderReturnReasonEnum}
|
||||
*/
|
||||
@NotNull(message = "必须选择退货原因")
|
||||
private Integer reason;
|
||||
/**
|
||||
* 原因(如果选择其他,原因保存在这)
|
||||
*
|
||||
* {@link cn.iocoder.mall.order.biz.constants.OrderReturnReasonEnum#REASON_000}
|
||||
*/
|
||||
@Size(max = 200)
|
||||
private String describe;
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue