记得上下班打卡 | git大法好,push需谨慎

Commit 25c04940 authored by jiangxiulong's avatar jiangxiulong

copy 2

下单 支付回调 超时支付退款
parent 2933a92a
......@@ -118,6 +118,12 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_TEMP_COUPON_MARKET = PREFIX.concat("temp:coupon:marketId:");//id 列表 $key:$marketId
public static final String REDIS_GOBLIN_TEMP_COUPON = PREFIX.concat("temp:coupon:");//详情 $key:$ucouponId
/* --------------------------------NFT--------------------------------- */
public static final String REDIS_GOBLIN_NFT_ORDER_INFO = PREFIX.concat("nftOrder:");// nft订单详情
public static final String REDIS_GOBLIN_NFT_ORDER_USER_ID_LIST = PREFIX.concat("nftOrder:idList:user:");// nft用户订单id列表
public static final String REDIS_GOBLIN_NFT_ORDER_REFUND_INFO = PREFIX.concat("nftOrder:refund:");// nft退款订单详情
/* ----------------------------------------------------------------- */
/**
* SKU剩余库存
......
......@@ -184,7 +184,35 @@ public class GoblinStatusConst {
}
/* ----------------------------------------------------------------- */
/* -----------------------------NFT订单状态------------------------------------ */
public enum NftStatus {
ORDER_STATUS_1(1, "待付款(用户刚下单)"),
ORDER_STATUS_2(2, "已付款(用户付完款 等待商城发货)"),
ORDER_STATUS_3(3, "已取消(未付款取消订单"),
ORDER_STATUS_4(4, "已退款(超时支付)"),
ORDER_REFUND_STATUS_1(1, "申请"),
ORDER_REFUND_STATUS_2(2, "退款成功"),
ORDER_REFUND_STATUS_3(3, "退款失败"),
;
private final int value;
private final String desc;
NftStatus(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return value;
}
public String getDesc() {
return desc;
}
}
......
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.service.goblin.entity.GoblinNftOrderRefund;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* NFT订单退单退款表
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderCallBackVo", description = "退款订单vo")
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftOrderCallBackVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单退单表id")
private String orderRefundId;
@ApiModelProperty(value = "退款单号")
private String refundCode;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "订单编号")
private String orderCode;
@ApiModelProperty(value = "商铺id")
private String storeId;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "skuIdNums")
private String skuIdNums;
@ApiModelProperty(value = "退货时候实际退款金额")
private BigDecimal realBackPrice;
@ApiModelProperty(value = "退款状态 1申请|2退款成功|3退款失败")
private Integer status;
@ApiModelProperty(value = "退款时间")
private LocalDateTime refundAt;
@ApiModelProperty(value = "退款失败原因")
private String errorReason;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdAt;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
public GoblinNftOrderCallBackVo copy(GoblinNftOrderRefund source) {
this.setOrderRefundId(source.getOrderRefundId());
this.setRefundCode(source.getRefundCode());
this.setOrderId(source.getOrderId());
this.setOrderCode(source.getOrderCode());
this.setStoreId(source.getStoreId());
this.setUserId(source.getUserId());
this.setSkuIdNums(source.getSkuIdNums());
this.setRealBackPrice(source.getRealBackPrice());
this.setStatus(source.getStatus());
this.setRefundAt(source.getRefundAt());
this.setErrorReason(source.getErrorReason());
this.setCreatedAt(source.getCreatedAt());
this.setUpdatedAt(source.getUpdatedAt());
return this;
}
private static final GoblinNftOrderCallBackVo obj = new GoblinNftOrderCallBackVo();
public static GoblinNftOrderCallBackVo getNew() {
try {
return (GoblinNftOrderCallBackVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinNftOrderCallBackVo();
}
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* NFT订单表
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderVo", description = "订单详情信息")
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftOrderVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "订单id")
private String orderId;
@ApiModelProperty(value = "商品id")
private String spuId;
@ApiModelProperty(value = "款式id")
private String skuId;
@ApiModelProperty(value = "数量")
private Integer num;
@ApiModelProperty(value = "店铺id")
private String storeId;
@ApiModelProperty(value = "商铺名称")
private String storeName;
@ApiModelProperty(value = "订单号")
private String orderCode;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "用户昵称")
private String userName;
@ApiModelProperty(value = "用户手机号")
private String userMobile;
@ApiModelProperty(value = "是否会员")
private Integer isMember;
@ApiModelProperty(value = "应付金额")
private BigDecimal priceTotal;
@ApiModelProperty(value = "券优惠金额")
private BigDecimal priceCoupon;
@ApiModelProperty(value = "商铺券优惠金额")
private BigDecimal storePriceCoupon;
@ApiModelProperty(value = "红包优惠金额")
private BigDecimal priceRedEnvelope;
@ApiModelProperty(value = "总优惠价格")
private BigDecimal priceVoucher;
@ApiModelProperty(value = "实付金额")
private BigDecimal priceActual;
@ApiModelProperty(value = "券id")
private String ucouponId;
@ApiModelProperty(value = "商铺券id")
private String storeCouponId;
@ApiModelProperty(value = "红包code")
private String redEnvelopeCode;
@ApiModelProperty(value = "订单状态 0-待付款(用户刚下单)|1-已付款|2-已取消(未付款取消订单)|3-已退款(超时支付)")
private Integer status;
@ApiModelProperty(value = "订单来源 app|h5|applet")
private String source;
@ApiModelProperty(value = "订单类型 0-购买订单|1-兑换订单|2-演出赠送订单")
private Integer orderType;
@ApiModelProperty(value = "支付时间")
private LocalDateTime payTime;
@ApiModelProperty(value = "支付单号")
private String payCode;
@ApiModelProperty(value = "支付类型 wepay-微信支付|alipay-阿里支付|douyinpay-抖音支付|unionpay-银联支付")
private String payType;
@ApiModelProperty(value = "支付类型来源[wap|js]")
private String deviceFrom;
@ApiModelProperty(value = "支付中心返回实际支付类型")
private String paymentType;
@ApiModelProperty(value = "支付中心返回支付id")
private String paymentId;
@ApiModelProperty(value = "钱到了哪个支付平台 平台的订单id为")
private String payStoreId;
@ApiModelProperty(value = "订单过期时间(分钟)")
private Integer payCountdownMinute;
@ApiModelProperty(value = "取消原因")
private String cancelReason;
@ApiModelProperty(value = "取消时间")
private LocalDateTime cancelTime;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "ip地址")
private String ipAddress;
@ApiModelProperty(value = "ip地域全名称")
private String area;
@ApiModelProperty(value = "ip地域省")
private String areaProvince;
@ApiModelProperty(value = "ip地域市")
private String areaCity;
@ApiModelProperty(value = "ip地域县")
private String areaCounty;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdAt;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updatedAt;
public GoblinNftOrderVo copy(GoblinNftOrder source) {
if (null == source) return this;
this.setOrderId(source.getOrderId());
this.setStoreId(source.getStoreId());
this.setStoreName(source.getStoreName());
this.setOrderCode(source.getOrderCode());
this.setPayCode(source.getPayCode());
this.setUserId(source.getUserId());
this.setUserName(source.getUserName());
this.setUserMobile(source.getUserMobile());
this.setPriceTotal(source.getPriceTotal());
this.setPriceActual(source.getPriceActual());
this.setPriceCoupon(source.getPriceCoupon());
this.setStorePriceCoupon(source.getStorePriceCoupon());
this.setPriceVoucher(source.getPriceVoucher());
this.setStatus(source.getStatus());
this.setUcouponId(source.getUcouponId());
this.setStoreCouponId(source.getStoreCouponId());
this.setPayType(source.getPayType());
this.setDeviceFrom(source.getDeviceFrom());
this.setCancelReason(source.getCancelReason());
this.setSource(source.getSource());
this.setVersion(source.getVersion());
this.setIsMember(source.getIsMember());
this.setOrderType(source.getOrderType());
this.setPayCountdownMinute(source.getPayCountdownMinute());
this.setIpAddress(source.getIpAddress());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPaymentType());
this.setCreatedAt(source.getCreatedAt());
return this;
}
private static final GoblinNftOrderVo obj = new GoblinNftOrderVo();
public static GoblinNftOrderVo getNew() {
try {
return (GoblinNftOrderVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNftOrderVo();
}
}
}
......@@ -7,9 +7,9 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@ApiModel(value = "GoblinNtfPayResultVo", description = "下单唤起支付参数信息")
@ApiModel(value = "GoblinNftPayResultVo", description = "下单唤起支付参数信息")
@Data
public class GoblinNtfPayResultVo implements Serializable, Cloneable {
public class GoblinNftPayResultVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
......@@ -25,9 +25,6 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable {
@ApiModelProperty(position = 12, value = "orderCode")
private String orderCode;
@ApiModelProperty(position = 13, value = "orderMasterCode")
private String orderMasterCode;
@ApiModelProperty(position = 19, value = "金额")
private BigDecimal price;
......@@ -43,13 +40,13 @@ public class GoblinNtfPayResultVo implements Serializable, Cloneable {
@ApiModelProperty(position = 20, value = "payData")
private Object payData;
private static final GoblinNtfPayResultVo obj = new GoblinNtfPayResultVo();
private static final GoblinNftPayResultVo obj = new GoblinNftPayResultVo();
public static GoblinNtfPayResultVo getNew() {
public static GoblinNftPayResultVo getNew() {
try {
return (GoblinNtfPayResultVo) obj.clone();
return (GoblinNftPayResultVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNtfPayResultVo();
return new GoblinNftPayResultVo();
}
}
......
......@@ -6,9 +6,9 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
@ApiModel(value = "GoblinNtfOrderPayAgainParam", description = "再次支付所需参数")
@ApiModel(value = "GoblinNftOrderPayAgainParam", description = "再次支付所需参数")
@Data
public class GoblinNtfOrderPayAgainParam {
public class GoblinNftOrderPayAgainParam {
@ApiModelProperty(value = "openId")
private String openId;
......
......@@ -6,9 +6,9 @@ import lombok.Data;
import java.math.BigDecimal;
@ApiModel(value = "GoblinNtfOrderPayCallbackParam", description = "支付成功回调所需参数")
@ApiModel(value = "GoblinNftOrderPayCallbackParam", description = "支付成功回调所需参数")
@Data
public class GoblinNtfOrderPayCallbackParam implements Cloneable {
public class GoblinNftOrderPayCallbackParam implements Cloneable {
@ApiModelProperty(value = "支付状态[1-成功|0-失败]")
private Integer status;
......@@ -16,37 +16,34 @@ public class GoblinNtfOrderPayCallbackParam implements Cloneable {
@ApiModelProperty(value = "订单ID")
private String orderId;
@ApiModelProperty(value = "masterOrderCode")
@ApiModelProperty(value = "订单编号")
private String orderCode;
@ApiModelProperty(value = "不用管")
private String orderCodeId;
@ApiModelProperty(value = "[写死]HUIFU_PAY_CODE")
@ApiModelProperty(value = "支付code")
private String code;
@ApiModelProperty(value = "不用管")
@ApiModelProperty(value = "price")
private BigDecimal price;
@ApiModelProperty(value = "不用管")
@ApiModelProperty(value = "type")
private String type;
@ApiModelProperty(value = "汇付相关id")
private String paymentId;
@ApiModelProperty(value = "[写死]huifu")
@ApiModelProperty(value = "paymentType")
private String paymentType;
@ApiModelProperty(value = "支付时间")
private String paymentAt;
private static final GoblinNtfOrderPayCallbackParam obj = new GoblinNtfOrderPayCallbackParam();
private static final GoblinNftOrderPayCallbackParam obj = new GoblinNftOrderPayCallbackParam();
public static GoblinNtfOrderPayCallbackParam getNew() {
public static GoblinNftOrderPayCallbackParam getNew() {
try {
return (GoblinNtfOrderPayCallbackParam) obj.clone();
return (GoblinNftOrderPayCallbackParam) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinNtfOrderPayCallbackParam();
return new GoblinNftOrderPayCallbackParam();
}
}
}
package com.liquidnet.service.goblin.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* <p>
* NFT下单所需商品相关参数
* </p>
*
* @author jiangxiulong
* @since 2022-03-24
*/
@ApiModel(value = "GoblinNftOrderPayGoodsParam", description = "下单所需商品相关参数")
@Data
public class GoblinNftOrderPayGoodsParam {
@ApiModelProperty(position = 10, required = true, value = "商铺id")
@NotBlank(message = "storeId不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = true, value = "spuId")
@NotBlank(message = "spuId不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = true, value = "skuId")
@NotBlank(message = "skuId不能为空")
private String skuId;
@ApiModelProperty(position = 13, value = "平台券码")
private String platVoucherCode;
@ApiModelProperty(position = 14, value = "商品券码")
private String storeVoucherCode;
}
package com.liquidnet.service.goblin.param;
import com.liquidnet.commons.lang.constant.LnsRegex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
@ApiModel(value = "GoblinNftOrderPayParam", description = "下单所需参数")
@Data
public class GoblinNftOrderPayParam {
@ApiModelProperty(position = 10, value = "openId微信内网页及小程序支付必传")
private String openId;
@ApiModelProperty(position = 11, required = true, value = "支付方式", allowableValues = "alipay,wepay,douyinpay,unionpay")
@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY, message = "支付方式无效")
@NotBlank(message = "支付方式不能为空")
private String payType;
@ApiModelProperty(position = 12, required = true, value = "支付终端", allowableValues = "app,wap,js,applet")
@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY_TERMINAL, message = "支付终端类型无效")
@NotBlank(message = "支付终端不能为空")
private String deviceFrom;
@ApiModelProperty(position = 13, value = "showUrl 之前h5需要 app不需要再说")
private String showUrl;
@ApiModelProperty(position = 14, value = "returnUrl 之前h5需要 app不需要再说")
private String returnUrl;
@ApiModelProperty(position = 15, required = true, value = "下单所需商品相关参数")
@Valid
private GoblinNftOrderPayGoodsParam goblinNtfOrderPayGoodsParam;
}
......@@ -16,9 +16,9 @@ import java.math.BigDecimal;
* @since 2021-05-31 11:19 上午
*/
@ApiModel(value = "GoblinNtfOrderRefundCallbackParam", description = "退款回调所需参数")
@ApiModel(value = "GoblinNftOrderRefundCallbackParam", description = "退款回调所需参数")
@Data
public class GoblinNtfOrderRefundCallbackParam implements Serializable {
public class GoblinNftOrderRefundCallbackParam implements Serializable {
@ApiModelProperty(value = "状态 1成功 0失败")
private Integer status;
......
package com.liquidnet.service.goblin.param;
import com.liquidnet.service.goblin.dto.manage.AddressVo;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderStoreParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
@ApiModel(value = "GoblinNtfOrderPayParam", description = "下单所需参数")
@Data
public class GoblinNtfOrderPayParam {
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "用户id")
private String uid;
@ApiModelProperty(value = "扫码枪code")
private String authCode;
@ApiModelProperty(value = "支付类型")
@NotNull(message = "支付类型不能为空")
private String payType;
@ApiModelProperty(value = "支付来源 [新增micropay-微信扫码支付]")
@NotNull(message = "支付来源不能为空")
private String deviceFrom;
@ApiModelProperty(value = "代理id")
private String agentId;
@ApiModelProperty(value = "收货地址id[虚拟物品不需要]")
private ArrayList<String> addressIds;
@ApiModelProperty(value = "入场人地址vo")
private AddressVo addressesVo;
@ApiModelProperty(value = "showUrl")
private String showUrl;
@ApiModelProperty(value = "returnUrl")
private String returnUrl;
@ApiModelProperty(value = "商品相关参数集合")
private List<GoblinOrderStoreParam> goblinOrderStoreParamList;
}
package com.liquidnet.service.goblin.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinNtfPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam;
import com.liquidnet.service.goblin.dto.vo.GoblinNftPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderRefundCallbackParam;
/**
* <p>
......@@ -16,13 +16,13 @@ import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam;
* @since 2022-03-23
*/
public interface IGoblinNftOrderService {
ResponseDto<GoblinNtfPayResultVo> checkOrder(GoblinNtfOrderPayParam param, String uid);
ResponseDto<GoblinNftPayResultVo> checkOrder(GoblinNftOrderPayParam payParam);
ResponseDto<GoblinNtfPayResultVo> payAgain(GoblinNtfOrderPayAgainParam param);
ResponseDto<GoblinNftPayResultVo> payAgain(GoblinNftOrderPayAgainParam payParam);
ResponseDto<Integer> checkOrderResult(String orderId);
String syncOrder(GoblinNtfOrderPayCallbackParam syncOrderParam);
String syncOrder(GoblinNftOrderPayCallbackParam syncOrderParam);
String refundSyncOrder(GoblinNtfOrderRefundCallbackParam refundCallbackParam);
String refundSyncOrder(GoblinNftOrderRefundCallbackParam refundCallbackParam);
}
package com.liquidnet.service.order.controller;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.codec.vo.EncryptedReq;
import com.liquidnet.service.goblin.dto.vo.GoblinNtfPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNtfOrderRefundCallbackParam;
import com.liquidnet.service.goblin.dto.vo.GoblinNftPayResultVo;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayCallbackParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderRefundCallbackParam;
import com.liquidnet.service.goblin.service.IGoblinNftOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -26,24 +25,21 @@ public class GoblinNftOrderController {
@PostMapping("pre")
@ApiOperation("下单(加密)")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> checkOrder(@RequestBody EncryptedReq<GoblinNtfOrderPayParam> param) {
GoblinNtfOrderPayParam payOrderParam = param.getData();
String uid = CurrentUtil.getCurrentUid();
return iGoblinNftOrderService.checkOrder(payOrderParam, uid);
public ResponseDto<GoblinNftPayResultVo> checkOrder(@RequestBody EncryptedReq<GoblinNftOrderPayParam> payParam) {
return iGoblinNftOrderService.checkOrder(payParam.getData());
}
@PostMapping("fc7bce6d6c2213b866f76493f92224b8")
@ApiOperation("下单(非加密)")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> checkOrder(@RequestBody GoblinNtfOrderPayParam param) {
String uid = CurrentUtil.getCurrentUid();
return iGoblinNftOrderService.checkOrder(param, uid);
public ResponseDto<GoblinNftPayResultVo> checkOrder(@RequestBody GoblinNftOrderPayParam payParam) {
return iGoblinNftOrderService.checkOrder(payParam);
}
@PostMapping("payAgain")
@ApiOperation("再次支付")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<GoblinNtfPayResultVo> payAgain(@RequestBody @Valid GoblinNtfOrderPayAgainParam param) {
public ResponseDto<GoblinNftPayResultVo> payAgain(@RequestBody @Valid GoblinNftOrderPayAgainParam param) {
return iGoblinNftOrderService.payAgain(param);
}
......@@ -60,14 +56,14 @@ public class GoblinNftOrderController {
@PostMapping("syncOrder")
@ApiOperation("支付回调")
@ApiResponse(code = 200, message = "接口返回对象参数")
public String syncOrder(@ModelAttribute @Valid GoblinNtfOrderPayCallbackParam syncOrderParam) {
public String syncOrder(@ModelAttribute @Valid GoblinNftOrderPayCallbackParam syncOrderParam) {
return iGoblinNftOrderService.syncOrder(syncOrderParam);
}
@ApiOperation(value = "退款回调")
@PostMapping(value = "refundSyncOrder")
@ApiResponse(code = 200, message = "接口返回对象参数")
public String refundSyncOrder(GoblinNtfOrderRefundCallbackParam refundCallbackParam) {
public String refundSyncOrder(GoblinNftOrderRefundCallbackParam refundCallbackParam) {
return iGoblinNftOrderService.refundSyncOrder(refundCallbackParam);
}
......
package com.liquidnet.service.order.utils;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.PagedResult;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtCouponFilterParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsFilterParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtNoticeFilterParam;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinMgtCategorySpecVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtCouponListVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import com.mongodb.BasicDBObject;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.model.UpdateOneModel;
import com.mongodb.client.model.WriteModel;
import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult;
import org.apache.commons.lang3.StringUtils;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.BulkOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Component
public class GoblinMongoUtils {
......@@ -140,4 +107,22 @@ public class GoblinMongoUtils {
return mongoTemplate.insert(vo, GoblinBackOrderVo.class.getSimpleName());
}
/* --------------------------------NFT--------------------------------- */
// 订单详情vo
public void setGoblinNftOrderVo(GoblinNftOrderVo vo) {
mongoTemplate.insert(vo, GoblinNftOrderVo.class.getSimpleName());
}
public UpdateResult updateGoblinNftOrderVo(GoblinNftOrderVo data) {
BasicDBObject object = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
return mongoTemplate.getCollection(GoblinNftOrderVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderId").is(data.getOrderId())).getQueryObject(),
object);
}
//添加 订单退款数据
public GoblinNftOrderCallBackVo insertGoblinNftOrderRefundVo(GoblinNftOrderCallBackVo vo) {
return mongoTemplate.insert(vo, GoblinNftOrderCallBackVo.class.getSimpleName());
}
}
......@@ -44,4 +44,9 @@ goblin_order.store.refundBackOrder=UPDATE goblin_back_order SET status = ? ,refu
goblin_user_coupon.updateState=UPDATE goblin_user_coupon SET state = ? , used_for = ? ,updated_at = ? where ucoupon_id = ?
#----
goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#-------- NFT -------
goblin_nft_order.insert=INSERT INTO goblin_nft_order (`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`pay_code`,`price_actual`,`price_coupon`,`store_price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`store_coupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`pay_countdown_minute`,`ip_address`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_nft_order.update.pay=UPDATE goblin_nft_order SET payment_type = ?, payment_id=?, pay_code = ?, pay_time = ?, status = ?, updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_nft_order_refund.insert=INSERT INTO goblin_nft_order_refund (`order_refund_id`,`refund_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`real_back_price`,`status`,`refund_at`,`error_reason`) VALUES (?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment