1. 将需要迁移的代码,统一移到 moved 目录下

This commit is contained in:
YunaiV
2020-11-29 01:51:05 +08:00
parent c60f9c71bf
commit 9345166422
203 changed files with 0 additions and 55 deletions

View File

@@ -0,0 +1,35 @@
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;
}
}

View File

@@ -0,0 +1,34 @@
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;
}
}

View File

@@ -0,0 +1,36 @@
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;
}
}

View File

@@ -0,0 +1,27 @@
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";
}

View File

@@ -0,0 +1,17 @@
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]
}

View File

@@ -0,0 +1,41 @@
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;
}
}

View File

@@ -0,0 +1,15 @@
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";
}

View File

@@ -0,0 +1,54 @@
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;
}
}

View File

@@ -0,0 +1,41 @@
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;
}
}

View File

@@ -0,0 +1,40 @@
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;
}}

View File

@@ -0,0 +1,34 @@
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;
}
}

View File

@@ -0,0 +1,39 @@
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;
}
}

View File

@@ -0,0 +1,52 @@
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;
}}

View File

@@ -0,0 +1,36 @@
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;
}
}

View File

@@ -0,0 +1,85 @@
package cn.iocoder.mall.order.biz.bo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 最后一个物流信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLastLogisticsInfoBO implements Serializable {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
/**
* 最后一个物流信息
*/
private LogisticsDetail lastLogisticsDetail;
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,41 @@
package cn.iocoder.mall.order.biz.bo;
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 OrderLogisticsBO extends BaseDO {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流编号
*/
private String logisticsNo;
}

View File

@@ -0,0 +1,82 @@
package cn.iocoder.mall.order.biz.bo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 详细信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLogisticsInfoBO implements Serializable {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
private List<LogisticsDetail> details;
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,100 @@
package cn.iocoder.mall.order.biz.bo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 详细信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLogisticsInfoWithOrderBO implements Serializable {
/**
* 订单id
*/
private Integer orderId;
/**
* 订单编号
*/
private String orderNo;
/**
* 物流信息
*/
private List<Logistics> logistics;
@Data
@Accessors(chain = true)
public static class Logistics {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
private List<LogisticsDetail> details;
}
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,141 @@
package cn.iocoder.mall.order.biz.bo;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单退货 info
*
* @author Sin
* @time 2019-04-27 10:19
*/
@Data
@Accessors(chain = true)
public class OrderReturnInfoBO implements Serializable {
/**
* 退货信息
*/
private ReturnInfo returnInfo;
/**
* 订单 item
*/
private List<OrderItem> orderItems;
/**
* 最后一个物流信息/最新物流信息
*/
private OrderLastLogisticsInfoBO lastLogisticsInfo;
@Data
@Accessors(chain = true)
public static class OrderItem {
/**
* 商品编号
*/
private Integer skuId;
/**
* 商品名称
*/
private String skuName;
/**
* 商品图片
*/
private String skuImage;
/**
* 数量
*/
private Integer quantity;
/**
* 最终总金额,单位:分。
*/
private Integer presentTotal;
}
@Data
@Accessors(chain = true)
public static class ReturnInfo {
/**
* 编号自动增长
*/
private Integer id;
/**
* 服务号
*/
private String serviceNumber;
/**
* 订单编号
*/
private Integer orderId;
/**
* 订单号 (保存一个冗余)
*/
private String orderNo;
/**
* 物流id
*/
private Integer orderLogisticsId;
///
/// 退货原因
/**
* 退货金额
*/
private Integer refundPrice;
/**
* 退货原因(字典值)
*/
private Integer reason;
/**
* 问题描述
*/
private String describe;
///
/// 时间信息
/**
* 同意时间
*/
private Date approvalTime;
/**
* 物流时间(填写物流单号时间)
*/
private Date logisticsTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间(确认时间)
*/
private Date closingTime;
/**
* 退款类型
*
* - 1、退货退款
* - 2、退款
*/
private Integer serviceType;
/**
* 退款类型 转换值
*/
private String serviceTypeText;
/**
* 状态
*
* - 1、退货申请
* - 2、申请成功
* - 3、申请失败
* - 4、退货中
* - 5、退货成功
*/
private Integer status;
}
}

View File

@@ -0,0 +1,122 @@
package cn.iocoder.mall.order.biz.bo;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 订单退货 list
*
* @author Sin
* @time 2019-05-06 21:54
*/
@Data
@Accessors(chain = true)
public class OrderReturnListBO implements Serializable {
/**
* 分页当前 index
*/
private Integer index;
/**
* pageSize
*/
private Integer pageSize;
/**
* totalCount
*/
private Integer totalCount;
/**
* data
*/
private List<OrderReturn> data;
@Data
@Accessors(chain = true)
public static class OrderReturn {
/**
* 编号自动增长
*/
private Integer id;
/**
* 服务号
*/
private String serviceNumber;
/**
* 订单编号
*/
private Integer orderId;
/**
* 订单号 (保存一个冗余)
*/
private String orderNo;
/**
* 物流id
*/
private Integer orderLogisticsId;
///
/// 退货原因
/**
* 退货金额
*/
private Integer refundPrice;
/**
* 退货原因(字典值)
*/
private Integer reason;
/**
* 问题描述
*/
private String describe;
///
/// 时间信息
/**
* 同意时间
*/
private Date approvalTime;
/**
* 物流时间(填写物流单号时间)
*/
private Date logisticsTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间(确认时间)
*/
private Date closingTime;
/**
* 服务类型
*
* - 1、退货退款
* - 2、退款
*/
private Integer serviceType;
/**
* 状态
*
* - 1、退货申请
* - 2、申请成功
* - 3、申请失败
* - 4、退货中
* - 5、退货成功
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}
}

View File

@@ -0,0 +1,86 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
*
* 订单评价
*
* @author wtz
* @time 2019-05-14 20:00:00
*/
@Data
@Accessors(chain = true)
public class OrderCommentBO implements Serializable {
/**
* 总条数
*/
private Integer total;
/**
* 好评
*/
private Integer positiveTotal;
/**
* 中评
*/
private Integer moderateTotal;
/**
* 差评
*/
private Integer negativeTotal;
/**
* 评论 id
*/
private Integer id;
/**
* 用户头像
*/
private String userAvatar;
/**
* 用户的真实姓名
*/
private String userNickName;
/**
* 评价星
*/
private Integer star;
/**
* 评论的内容
*/
private String commentContent;
/**
* 评论的图片地址
*/
private String commentPics;
/**
* 回复条数
*/
private Integer replayCount;
/**
* 点赞数
*/
private Integer collectCount;
/**
* 创建时间
*/
private Date createTime;
}

View File

@@ -0,0 +1,25 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
*
* 订单评论创建
*
* @author wtz
* @time 2019-05-19 18:32
*
*/
@Data
@Accessors(chain = true)
public class OrderCommentCreateBO implements Serializable {
/**
* 订单评论 id
*/
private Integer id;
}

View File

@@ -0,0 +1,29 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
*
* 评论详情和商家评论回复
*
* @author wtz
* @time 2019-06-03 20:30
*/
@Data
@Accessors(chain = true)
public class OrderCommentInfoAndMerchantReplyBO {
/**
* 评论详情
*/
private OrderCommentInfoBO orderCommentInfoBO;
/**
* 商家评论回复
*/
private List<OrderCommentMerchantReplyBO> orderCommentMerchantReplyBOS;
}

View File

@@ -0,0 +1,84 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
*
* 订单回复评价详情
*
* @author wtz
* @time 2019-05-16 18:40
*
*/
@Data
@Accessors(chain = true)
public class OrderCommentInfoBO implements Serializable {
/**
* 评论 id
*/
private Integer id;
/**
* 用户头像
*/
private String userAvatar;
/**
* 用户昵称
*/
private String userNickName;
/**
* 评价星
*/
private Integer star;
/**
* 评论的内容
*/
private String commentContent;
/**
* 评论的图片地址
*/
private String commentPics;
/**
* 点赞数
*/
private Integer likeCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 商品 sku id
*/
private int productSkuId;
/**
* 商品 sku 属性
*/
private String productSkuAttrs;
/**
* 商品 sku 价格
*/
private String productSkuPrice;
/**
* 商品 sku 地址
*/
private String productSkuPicUrl;
}

View File

@@ -0,0 +1,21 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
/**
*
* 商家评论回复
*
* @author wtz
* @time 2019-06-03 19:30
*/
@Data
@Accessors(chain = true)
public class OrderCommentMerchantReplyBO {
/**
* 商家评论回复
*/
private String replyContent;
}

View File

@@ -0,0 +1,159 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
*
* 订单评论分页展示
*
* @author wtz
* @time 2019-05-14 20:00:00
*/
@Data
@Accessors(chain = true)
public class OrderCommentPageBO implements Serializable {
/**
* 总条数
*/
private Integer total;
// 评论标签化等等在做
// /**
// * 好评
// */
// private Integer positiveTotal;
//
// /**
// * 中评
// */
// private Integer moderateTotal;
//
// /**
// * 差评
// */
// private Integer negativeTotal;
// /**
// * 评论列表
// */
// private List<OrderCommentItem> orderCommentItems;
/**
* 评论 id
*/
private Integer id;
/**
* 用户头像
*/
private String userAvatar;
/**
* 用户的真实姓名
*/
private String userNickName;
/**
* 评价星
*/
private Integer star;
/**
* 评论的内容
*/
private String commentContent;
/**
* 评论的图片地址
*/
private String commentPics;
/**
* 回复条数
*/
private Integer replayCount;
/**
* 点赞数
*/
private Integer likeCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 商家回复列表
* 只展示最近的一条
*/
private String replyContent;
@Data
@Accessors(chain = true)
@AllArgsConstructor
public static class OrderCommentItem{
// /**
// * 评论 id
// */
// private Integer id;
//
// /**
// * 用户头像
// */
// private String userAvatar;
//
// /**
// * 用户的真实姓名
// */
// private String userNickName;
//
// /**
// * 评价星
// */
// private Integer star;
//
// /**
// * 评论的内容
// */
// private String commentContent;
//
// /**
// * 评论的图片地址
// */
// private String commentPics;
//
// /**
// * 回复条数
// */
// private Integer replayCount;
//
// /**
// * 点赞数
// */
// private Integer likeCount;
//
// /**
// * 创建时间
// */
// private Date createTime;
//
// /**
// * 商家回复列表
// * 只展示最近的一条
// */
// private String replyContent;
}
}

View File

@@ -0,0 +1,24 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
*
* 订单回复创建
*
* @author wtz
* @time 2019-05-19 18:35
*/
@Data
@Accessors(chain = true)
public class OrderCommentReplyCreateBO implements Serializable {
/**
* 评论回复 id
*/
private Integer id;
}

View File

@@ -0,0 +1,83 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
*
* 评论回复分页展示
*
* @author wtz
* @time 2019-05-19 14:19
*
*/
@Data
@Accessors(chain = true)
public class OrderCommentReplyPageBO implements Serializable {
/**
* 评论回复总数
*/
private Integer total;
/**
* 用户回复
*/
List<OrderCommentReplayItem> orderCommentReplayItems;
@Data
@Accessors(chain = true)
public static class OrderCommentReplayItem{
/**
* 回复 id
*/
private Integer id;
/**
* 回复的类型
*/
private Integer replyType;
/**
* 回复的内容
*/
private String replyContent;
/**
* 回复的用户 id
*/
private int replyUserId;
/**
* 回复用户的真实姓名
*/
private String replyUserNickName;
/**
* 回复用户的头像
*/
private String replyUserAvatar;
/**
* 回复的点赞数
*/
private int replyCollectCount;
/**
* 回复目标用户昵称
*/
private String parentUserNickName;
/**
* 创建时间
*/
private Date createTime;
}
}

View File

@@ -0,0 +1,87 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
*
* 订单评论状态详情分页(这么设计因为这个接口需要登陆以后才能看到所以与订单分页接口分开)
*
* @author wtz
* @time 2019-06-07 10:39
*/
@Data
@Accessors(chain = true)
public class OrderCommentStateInfoPageBO implements Serializable {
/**
* (待/已)评论总数
*/
private Integer total;
/**
* 评论状态
*/
private List<OrderCommentStateInfoItem> orderCommentStateInfoItems;
@Data
@Accessors(chain = true)
public static class OrderCommentStateInfoItem{
/**
* 订单 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;
/**
* 订单评论状态
*/
private Integer commentState;
/**
* 创建时间
*/
private Date createTime;
}
}

View File

@@ -0,0 +1,25 @@
package cn.iocoder.mall.order.biz.bo.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.Serializable;
/**
* 订单评论超时
*
* @author wtz
* @time 2019-06-15 13:52
*/
@Data
@Accessors(chain = true)
public class OrderCommentTimeOutBO implements Serializable {
/**
* 评论 id
*/
private Integer id;
}

View File

@@ -0,0 +1,85 @@
package cn.iocoder.mall.order.biz.bo.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 最后一个物流信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLastLogisticsInfoBO implements Serializable {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
/**
* 最后一个物流信息
*/
private LogisticsDetail lastLogisticsDetail;
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,41 @@
package cn.iocoder.mall.order.biz.bo.order;
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 OrderLogisticsBO extends BaseDO {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流编号
*/
private String logisticsNo;
}

View File

@@ -0,0 +1,82 @@
package cn.iocoder.mall.order.biz.bo.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 详细信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLogisticsInfoBO implements Serializable {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
private List<LogisticsDetail> details;
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,100 @@
package cn.iocoder.mall.order.biz.bo.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单物流 - 详细信息
*
* @author Sin
* @time 2019-04-12 22:03
*/
@Data
@Accessors(chain = true)
public class OrderLogisticsInfoWithOrderBO implements Serializable {
/**
* 订单id
*/
private Integer orderId;
/**
* 订单编号
*/
private String orderNo;
/**
* 物流信息
*/
private List<Logistics> logistics;
@Data
@Accessors(chain = true)
public static class Logistics {
/**
* id
*/
private Integer id;
/**
* 收件区域编号
*/
private String areaNo;
/**
* 收件人名称
*/
private String name;
/**
* 收件手机号
*/
private String mobile;
/**
* 收件详细地址
*/
private String address;
/**
* 物流 (字典)
*/
private Integer logistics;
/**
* 物流 (字典) 转换后的值
*/
private String logisticsText;
/**
* 物流编号
*/
private String logisticsNo;
///
/// 物流信息
private List<LogisticsDetail> details;
}
@Data
@Accessors(chain = true)
public static class LogisticsDetail {
/**
* id
*/
private Integer id;
/**
* 物流id
*/
private Integer orderLogisticsId;
/**
* 物流时间
*/
private Date logisticsTime;
/**
* 物流时间 text
*/
private String logisticsTimeText;
/**
* 物流信息
*/
private String logisticsInformation;
}
}

View File

@@ -0,0 +1,141 @@
package cn.iocoder.mall.order.biz.bo.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 订单退货 info
*
* @author Sin
* @time 2019-04-27 10:19
*/
@Data
@Accessors(chain = true)
public class OrderReturnInfoBO implements Serializable {
/**
* 退货信息
*/
private ReturnInfo returnInfo;
/**
* 订单 item
*/
private List<OrderItem> orderItems;
/**
* 最后一个物流信息/最新物流信息
*/
private OrderLastLogisticsInfoBO lastLogisticsInfo;
@Data
@Accessors(chain = true)
public static class OrderItem {
/**
* 商品编号
*/
private Integer skuId;
/**
* 商品名称
*/
private String skuName;
/**
* 商品图片
*/
private String skuImage;
/**
* 数量
*/
private Integer quantity;
/**
* 最终总金额,单位:分。
*/
private Integer presentTotal;
}
@Data
@Accessors(chain = true)
public static class ReturnInfo {
/**
* 编号自动增长
*/
private Integer id;
/**
* 服务号
*/
private String serviceNumber;
/**
* 订单编号
*/
private Integer orderId;
/**
* 订单号 (保存一个冗余)
*/
private String orderNo;
/**
* 物流id
*/
private Integer orderLogisticsId;
///
/// 退货原因
/**
* 退货金额
*/
private Integer refundPrice;
/**
* 退货原因(字典值)
*/
private Integer reason;
/**
* 问题描述
*/
private String describe;
///
/// 时间信息
/**
* 同意时间
*/
private Date approvalTime;
/**
* 物流时间(填写物流单号时间)
*/
private Date logisticsTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间(确认时间)
*/
private Date closingTime;
/**
* 退款类型
*
* - 1、退货退款
* - 2、退款
*/
private Integer serviceType;
/**
* 退款类型 转换值
*/
private String serviceTypeText;
/**
* 状态
*
* - 1、退货申请
* - 2、申请成功
* - 3、申请失败
* - 4、退货中
* - 5、退货成功
*/
private Integer status;
}
}

View File

@@ -0,0 +1,122 @@
package cn.iocoder.mall.order.biz.bo.order;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 订单退货 list
*
* @author Sin
* @time 2019-05-06 21:54
*/
@Data
@Accessors(chain = true)
public class OrderReturnListBO implements Serializable {
/**
* 分页当前 index
*/
private Integer index;
/**
* pageSize
*/
private Integer pageSize;
/**
* totalCount
*/
private Integer totalCount;
/**
* data
*/
private List<OrderReturn> data;
@Data
@Accessors(chain = true)
public static class OrderReturn {
/**
* 编号自动增长
*/
private Integer id;
/**
* 服务号
*/
private String serviceNumber;
/**
* 订单编号
*/
private Integer orderId;
/**
* 订单号 (保存一个冗余)
*/
private String orderNo;
/**
* 物流id
*/
private Integer orderLogisticsId;
///
/// 退货原因
/**
* 退货金额
*/
private Integer refundPrice;
/**
* 退货原因(字典值)
*/
private Integer reason;
/**
* 问题描述
*/
private String describe;
///
/// 时间信息
/**
* 同意时间
*/
private Date approvalTime;
/**
* 物流时间(填写物流单号时间)
*/
private Date logisticsTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间(确认时间)
*/
private Date closingTime;
/**
* 服务类型
*
* - 1、退货退款
* - 2、退款
*/
private Integer serviceType;
/**
* 状态
*
* - 1、退货申请
* - 2、申请成功
* - 3、申请失败
* - 4、退货中
* - 5、退货成功
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}
}

View File

@@ -0,0 +1,30 @@
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);
}

View File

@@ -0,0 +1,48 @@
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);
}

View File

@@ -0,0 +1,20 @@
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);
}

View File

@@ -0,0 +1,31 @@
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);
}

View File

@@ -0,0 +1,31 @@
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);
}

View File

@@ -0,0 +1,46 @@
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);
}

View File

@@ -0,0 +1,84 @@
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);
}

View File

@@ -0,0 +1,58 @@
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);
}

View File

@@ -0,0 +1,17 @@
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);
}

View File

@@ -0,0 +1,84 @@
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
);
}

View File

@@ -0,0 +1,66 @@
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
);
}

View File

@@ -0,0 +1,53 @@
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
);
}

View File

@@ -0,0 +1,53 @@
package cn.iocoder.mall.order.biz.dao.order;
import cn.iocoder.mall.order.biz.dataobject.OrderDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 订单 mapper
*
* @author Sin
* @time 2019-03-16 15:09
*/
@Repository
public interface OrderMapper extends BaseMapper<OrderDO> {
// /**
// * 更新 - 根据 id 更新
// *
// * @param orderDO
// * @return
// */
// int updateById(OrderDO orderDO);
//
// int updateByIdAndStatus(@Param("id") Integer id,
// @Param("status") Integer status,
// @Param("updateObj") OrderDO updateObj);
//
// /**
// * 查询 - 根据id 查询
// *
// * @param id
// * @return
// */
// OrderDO selectById(
// @Param("id") Integer id
// );
//
// /**
// * 查询 - 后台分页page
// *
// * @param orderQueryDTO
// * @return
// */
// int selectPageCount(OrderQueryDTO orderQueryDTO);
//
// /**
// * 查询 - 后台分页page
// *
// * @param orderQueryDTO
// * @return
// */
// List<OrderDO> selectPage(OrderQueryDTO orderQueryDTO);
}

View File

@@ -0,0 +1,47 @@
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
);
}

View File

@@ -0,0 +1,63 @@
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);
}

View File

@@ -0,0 +1,87 @@
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;
}

View File

@@ -0,0 +1,113 @@
package cn.iocoder.mall.order.biz.dataobject;
import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
import java.util.Date;
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 Date createTime;
/**
* 付款时间
*/
private Date paymentTime;
/**
* 发货时间
*/
private Date deliveryTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间
*/
private Date closingTime;
///
/// 其他
/**
* 订单类型
*
* - 0、为 Order 订单 (对整个订单退货)
* - 1、为 OrderItem 订单 (对订单某一个商品退货)
*/
private Integer orderType;
/**
* 状态
*
* - 申请换货
* - 申请成功
* - 申请失败
* - 换货中
* - 换货成功
*/
private Integer status;
}

View File

@@ -0,0 +1,46 @@
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;
}

View File

@@ -0,0 +1,37 @@
package cn.iocoder.mall.order.biz.dataobject;
import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
import java.util.Date;
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 Date logisticsTime;
/**
* 物流信息
*/
private String logisticsInformation;
}

View File

@@ -0,0 +1,102 @@
package cn.iocoder.mall.order.biz.dataobject;
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
import java.util.Date;
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 Date approvalTime;
/**
* 拒绝时间
*/
private Date refuseTime;
/**
* 物流时间(填写物流单号时间)
*/
private Date logisticsTime;
/**
* 收货时间
*/
private Date receiverTime;
/**
* 成交时间(确认时间)
*/
private Date closingTime;
/**
* 服务类型
*
* - 1、退货退款
* - 2、退款
*/
private Integer serviceType;
/**
* 状态
*
* - 1、退货申请
* - 2、申请成功
* - 3、申请失败
* - 4、退货中
* - 5、已收货
* - 6、退货成功
*/
private Integer status;
}

View File

@@ -0,0 +1,21 @@
## 订单
TODO
**退货**
1. 商家未发货,退货原因
- 拍错/勿拍/多拍
- 缺货
2. 商家已发货,退货原因
- 七天无理由
- 质量问题
- 不想要了
- 其他

View File

@@ -0,0 +1,124 @@
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;
}

View File

@@ -0,0 +1,63 @@
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;
}

View File

@@ -0,0 +1,22 @@
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;
}

View File

@@ -0,0 +1,70 @@
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;
}

View File

@@ -0,0 +1,41 @@
package cn.iocoder.mall.order.biz.dto.comment;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
*
* 订单评论信息详情 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;
}

View File

@@ -0,0 +1,38 @@
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;
}

View File

@@ -0,0 +1,36 @@
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;
}

View File

@@ -0,0 +1,56 @@
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;
}
}
}

View File

@@ -0,0 +1,65 @@
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;
}
}

View File

@@ -0,0 +1,41 @@
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;
}

View File

@@ -0,0 +1,25 @@
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;
}

View File

@@ -0,0 +1,40 @@
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;
}

View File

@@ -0,0 +1,51 @@
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;
}

View File

@@ -0,0 +1,59 @@
package cn.iocoder.mall.order.biz.dto.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* 订单 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 Date startPaymentTime;
private Date endPaymentTime;
/**
* 创建时间
*/
private Date startCreateTime;
private Date endCreateTime;
/**
* 删除状态
*/
private Integer deleted;
/**
* 状态
*/
private Integer status;
private Integer pageNo;
private Integer pageSize;
}

View File

@@ -0,0 +1,37 @@
package cn.iocoder.mall.order.biz.dto.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @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;
}

View File

@@ -0,0 +1,41 @@
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;
}

View File

@@ -0,0 +1,56 @@
package cn.iocoder.mall.order.biz.dto.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* 订单退货 查询 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 Date startCreateTime;
/**
* 创建时间 - 结束
*/
private Date endCreateTime;
/**
* 状态
*/
private Integer status;
///
/// 分页信息
/**
* 分页 index
*/
private Integer index;
/**
* 分页大小
*/
private Integer pageSize;
}

View File

@@ -0,0 +1,45 @@
package cn.iocoder.mall.order.biz.dto.order;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* 用户订单 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 Date startPaymentTime;
private Date endPaymentTime;
/**
* 创建时间
*/
private Date startCreateTime;
private Date endCreateTime;
/**
* 状态
*/
private Integer status;
}

View File

@@ -0,0 +1,40 @@
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);
}

View File

@@ -0,0 +1,61 @@
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);
}

View File

@@ -0,0 +1,39 @@
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);
}

View File

@@ -0,0 +1,79 @@
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);
}

View File

@@ -0,0 +1,78 @@
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);
}

View File

@@ -0,0 +1,104 @@
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) {
}
}

View File

@@ -0,0 +1,72 @@
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);
// }
}

View File

@@ -0,0 +1,93 @@
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);
// }
}

View File

@@ -0,0 +1,131 @@
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)
// );
// }
}

View File

@@ -0,0 +1,235 @@
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);
// }
}

View File

@@ -0,0 +1,104 @@
<?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>

View File

@@ -0,0 +1,81 @@
<?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>

View File

@@ -0,0 +1,76 @@
<?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>

View File

@@ -0,0 +1,80 @@
<?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>

View File

@@ -0,0 +1,46 @@
<?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>

View File

@@ -0,0 +1,165 @@
<?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 &gt;= #{startCreateTime}
AND create_time &lt;= #{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>

View File

@@ -0,0 +1,37 @@
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));
// }
}

View File

@@ -0,0 +1,63 @@
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)));
}
}

View File

@@ -0,0 +1,47 @@
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);
// }
}

View File

@@ -0,0 +1,83 @@
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);
// }
}

View File

@@ -0,0 +1,58 @@
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("create_order_from_cart")
// @RequiresLogin
// @ApiOperation("创建订单购物车")
// public CommonResult<OrderCreateBO> createOrderFromCart(@RequestParam("userAddressId") Integer userAddressId,
// @RequestParam(value = "couponCardId", required = false) Integer couponCardId,
// @RequestParam(value = "remark", required = false) String remark,
// HttpServletRequest request) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// // 获得购物车中选中的商品
// List<CartItemBO> cartItems = cartService.list(userId, true);
// if (cartItems.isEmpty()) {
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_CREATE_CART_IS_EMPTY.getCode());
// }
// // 创建 OrderCreateDTO 对象
// OrderCreateDTO orderCreateDTO = OrderConvertAPP.INSTANCE.createOrderCreateDTO(userId, userAddressId,
// remark, HttpUtil.getIp(request),
// cartItems, couponCardId);
// // 创建订单
// CommonResult<OrderCreateBO> createResult = orderService.createOrder(orderCreateDTO);
// if (createResult.isError()) {
// return CommonResult.error(createResult);
// }
// // 清空购物车 // TODO 芋艿,需要标记删除的原因,即结果为创建为某个订单。
// cartService.deleteList(userId, cartItems.stream().map(CartItemBO::getSkuId).collect(Collectors.toList()));
// // 返回结果
// return createResult;
// }
//
//
// @PostMapping("confirm_receiving")
// @RequiresLogin
// @ApiOperation("确认收货")
// public CommonResult confirmReceiving(@RequestParam("orderId") Integer orderId) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// return orderService.confirmReceiving(userId, orderId);
// }
}

View File

@@ -0,0 +1,65 @@
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;
// }
}

View File

@@ -0,0 +1,53 @@
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;
// }
}

View File

@@ -0,0 +1,50 @@
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);
}

View File

@@ -0,0 +1,46 @@
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;
}

Some files were not shown because too many files have changed in this diff Show More