提交新功能 分销商 积分 会员体系

This commit is contained in:
xwxuan
2024-02-08 20:44:58 +08:00
parent 0e255d6c3a
commit 6f5e6e4662
928 changed files with 39318 additions and 1408 deletions

View File

@ -0,0 +1,22 @@
package co.yixiang.yshop.module.order.api.productorder;
import co.yixiang.yshop.module.order.api.productorder.dto.ProductOrderDTO;
import java.util.Map;
public interface ProductOrderApi {
ProductOrderDTO getPayParam(String orderId);
void handleOrder(String orderId, Map<String, String> packageParams);
void handleWeChatPayNotify(String orderId, Map<String, String> resultMap) throws Exception;
/**
* 余额支付
* @param orderId 订单号
* @param uid 用户id
*/
void yuePay(String orderId,Long uid);
}

View File

@ -0,0 +1,27 @@
package co.yixiang.yshop.module.order.api.productorder.dto;
import lombok.Data;
import lombok.ToString;
import java.math.BigDecimal;
@Data
@ToString(callSuper = true)
public class ProductOrderDTO {
/**
* 订单ID
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 充值状态 0-未支付 1-已支付
*/
private Integer status;
/**
* 金额
*/
private BigDecimal amount;
}

View File

@ -0,0 +1,13 @@
package co.yixiang.yshop.module.order.api.rechargeorder;
import co.yixiang.yshop.module.order.api.rechargeorder.dto.RechargeOrderDTO;
import java.util.Map;
public interface RechargeOrderApi {
RechargeOrderDTO getPayParam(String id);
void handleWeChatPayNotify(String orderId) throws Exception;
}

View File

@ -0,0 +1,27 @@
package co.yixiang.yshop.module.order.api.rechargeorder.dto;
import lombok.Data;
import lombok.ToString;
import java.math.BigDecimal;
@Data
@ToString(callSuper = true)
public class RechargeOrderDTO {
/**
* 订单ID
*/
private String id;
/**
* 用户id
*/
private Long userId;
/**
* 充值状态 0-未支付 1-已支付
*/
private Integer status;
/**
* 金额
*/
private Integer rechargeAmount;
}

View File

@ -19,6 +19,7 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_PAY_FINISH = new ErrorCode(1008007010, "该订单已支付");
ErrorCode USER_NOT_BINDING_WX_APPLET = new ErrorCode(1008007011, "该用户未绑定微信小程序openid为空");
ErrorCode USER_NOT_BINDING_WX = new ErrorCode(1008007011, "该用户未绑定微信手机号无法调起支付");
ErrorCode PAY_YUE_NOT = new ErrorCode(1008007011, "余额不足");
ErrorCode ORDER_STATUS_ERROR = new ErrorCode(1008007012, "订单状态错误");
ErrorCode COMMENT_PRODUCT_NOT_EXISTS = new ErrorCode(1008007013, "评价产品不存在");
@ -31,6 +32,15 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_ADDRESS_REQUERED = new ErrorCode(1008007019, "请输入商家收货人信息");
ErrorCode ORDER_PAYINFO_ERROR = new ErrorCode(1008007020, "获取订单支付信息异常");
ErrorCode ORDER_WRITTEN_OFF = new ErrorCode(1008007021, "该订单已核销");
ErrorCode ORDER_WRITE_OFF_CODE_ERROR = new ErrorCode(1008007022, "核销码错误");
ErrorCode ORDER_DETAIL_NOT_EXISTS = new ErrorCode(1008007023, "订单明细不存在!");
ErrorCode ORDER_REFUND_NUMBER_LACK_ERROR = new ErrorCode(1008007024, "可退款商品数量不足!");
ErrorCode ORDER_REFUND_NOT_STORE_PICKUP = new ErrorCode(1008007025, "自提订单不能售后");
ErrorCode NO_WRITE_OFF_AUTHORITY = new ErrorCode(1008007026, "无核销权限");
// ========== 订单电子面单记录 ==========
ErrorCode STORE_ORDER_ELECTRONICS_NOT_EXISTS = new ErrorCode(1008010000, "订单电子面单记录不存在");
@ -43,5 +53,9 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_QUERY_NO_MERCHANT = new ErrorCode(1008012001, "未查到商户配置信息id=4");
ErrorCode RECHARGE_ORDER_NOT_EXISTS = new ErrorCode(1010000001, "充值订单不存在");
ErrorCode RECHARGE_CONFIG_NOT_EXISTS = new ErrorCode(1010000002, "充值配置不存在");
ErrorCode RECHARGE_PACKAGE_NOT_EXISTS = new ErrorCode(1010000003, "充值套餐配置不存在");
ErrorCode RECHARGE_MIN_ERROR = new ErrorCode(1010000004, "小于最小充值金额");
}

View File

@ -0,0 +1,38 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.module.order.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.stream.Stream;
/**
* @author moxiangrong
* 订单详情状态枚举
*/
@Getter
@AllArgsConstructor
public enum OrderDetailStateEnum {
NORMAL(1,"正常"),
IN_AFTER_SALES(2,"售后中"),
AFTER_SALES_COMPLETE(3,"售后完成");
private Integer value;
private String desc;
public static OrderDetailStateEnum toType(int value) {
return Stream.of(OrderDetailStateEnum.values())
.filter(p -> p.value == value)
.findAny()
.orElse(null);
}
}

View File

@ -24,9 +24,11 @@ public enum OrderStatusEnum {
STATUS_WAIT_RECEIVED(2,"待收货"),
STATUS_WAIT_EVALUATE(3,"待评价"),
STATUS_FINISH(4,"已完成"),
STATUS_WAIT_FOR_GROUP(5,"待成团"),
STATUS_MINUS_BEING_REFUND(-1,"退款中"),
STATUS_MINUS_REFUNDED(-2,"已退款"),
STATUS_MINUS_REFUND(-3,"退款");
STATUS_MINUS_REFUND(-3,"退款"),
STATUS_GROUP_FAILURE(-4,"成团失败");

View File

@ -0,0 +1,37 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.module.order.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.stream.Stream;
/**
* @author moxiangrong
* 下单类型枚举
*/
@Getter
@AllArgsConstructor
public enum OrderTypeEnum {
NORMAL_ORDER(1,"正常下单"),
CAMPAIGN_ORDER(2,"活动下单");
private Integer value;
private String desc;
public static OrderTypeEnum toType(int value) {
return Stream.of(OrderTypeEnum.values())
.filter(p -> p.value == value)
.findAny()
.orElse(null);
}
}

View File

@ -0,0 +1,22 @@
package co.yixiang.yshop.module.order.enums;
import lombok.Getter;
/**
* @author pepis
* @apiNote 订单核销枚举类
**/
@Getter
public enum OrderWriteOffStatusEnum {
TO_BE_WRITTEN_OFF(0, "待核销"),
WRITTEN_OFF(1, "已核销");
private final Integer value;
private final String desc;
OrderWriteOffStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
}

View File

@ -0,0 +1,38 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.module.order.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.stream.Stream;
/**
* 售后状态枚举
*
* @author hupeng
* @date 2023/6/23
*/
@Getter
@AllArgsConstructor
public enum ReachargeOrderStatusEnum {
WAIT(0,"待支付"),
SUCCESS(1,"已支付");
private Integer value;
private String name;
public static ReachargeOrderStatusEnum toType(int value) {
return Stream.of(ReachargeOrderStatusEnum.values())
.filter(p -> p.value == value)
.findAny()
.orElse(null);
}
}

View File

@ -0,0 +1,25 @@
package co.yixiang.yshop.module.order.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.stream.Stream;
@Getter
@AllArgsConstructor
public enum RechargePackageStatusEnum {
CLOSE(0,"关闭"),
OPEN(1,"开启"),
;
private Integer status;
private String name;
public static RechargePackageStatusEnum toStatus(Integer status) {
return Stream.of(RechargePackageStatusEnum.values())
.filter(p -> p.status.equals(status))
.findAny()
.orElse(null);
}
}

View File

@ -0,0 +1,20 @@
package co.yixiang.yshop.module.order.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author hupeng
* 配送方式 1=快递 2=门店自提
*/
@Getter
@AllArgsConstructor
public enum ShippingTypeEnum {
SHIPPING_TYPE_EXPRESS_DELIVERY(1,"快递"),
SHIPPING_TYPE_STORE(2,"门店自提"),
;
private Integer value;
private String desc;
}