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

Commit d7cb0082 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/hjc' into hjc

parents ce924ec9 83069919
...@@ -99,8 +99,9 @@ public class GoblinStatusConst { ...@@ -99,8 +99,9 @@ public class GoblinStatusConst {
BACK_REASON_TYPE_5(5, "不想买了"), BACK_REASON_TYPE_5(5, "不想买了"),
BACK_REASON_TYPE_6(6, "商品质量问题"), BACK_REASON_TYPE_6(6, "商品质量问题"),
BACK_REASON_TYPE_7(7, "收到商品与描述不符"), BACK_REASON_TYPE_7(7, "收到商品与描述不符"),
BACK_REASON_TYPE_8(8, "商铺发起"),//todo BACK_REASON_TYPE_8(8, "商铺发起"),
BACK_REASON_TYPE_9(9, "系统自动申请"), BACK_REASON_TYPE_9(9, "系统自动申请"),
BACK_REASON_TYPE_10(10, "超时支付自动退款"),
BACK_TYPE_1(1, "退款"), BACK_TYPE_1(1, "退款"),
BACK_TYPE_2(2, "退货"), BACK_TYPE_2(2, "退货"),
......
...@@ -94,7 +94,7 @@ public class GoblinBackOrderVo implements Serializable, Cloneable { ...@@ -94,7 +94,7 @@ public class GoblinBackOrderVo implements Serializable, Cloneable {
public GoblinBackOrderVo copy(GoblinBackOrder source) { public GoblinBackOrderVo copy(GoblinBackOrder source) {
this.setBackOrderId(source.getBackOrderId()); this.setBackOrderId(source.getBackOrderId());
this.setBackCode(source.getBackCode()); this.setBackCode(source.getBackCode());
this.setOrderId(source.getBackOrderId()); this.setOrderId(source.getOrderId());
this.setOrderCode(source.getOrderCode()); this.setOrderCode(source.getOrderCode());
this.setStoreId(source.getStoreId()); this.setStoreId(source.getStoreId());
this.setUserId(source.getUserId()); this.setUserId(source.getUserId());
......
package com.liquidnet.service.dragon.config;
import org.springframework.context.annotation.Configuration;
@Configuration
public class RedisStreamConfig {
// @Autowired
// private RedisPayNotifyReceiver redisPayNotifyReceiver;
// @Bean
// public Subscription subscriptionAlipayNotify0(RedisConnectionFactory factory) {
// var options = StreamMessageListenerContainer
// .StreamMessageListenerContainerOptions
// .builder()
// .pollTimeout(Duration.ofMillis(1))
// .build();
// var listenerContainer = StreamMessageListenerContainer.create(factory, options);
// var subscription = listenerContainer.receiveAutoAck(Consumer.from(DragonConstant.ChannelRedisQueueEnum.ALIPAY_PAY_GROUP.getCode(), "alipay-pay-notify-0"),
// StreamOffset.create(DragonConstant.ChannelRedisQueueEnum.ALIPAY_PAY_KEY.getCode(), ReadOffset.lastConsumed()), redisPayNotifyReceiver);
// listenerContainer.start();
// return subscription;
// }
//
// @Bean
// public Subscription subscriptionAlipayNotify1(RedisConnectionFactory factory) {
// var options = StreamMessageListenerContainer
// .StreamMessageListenerContainerOptions
// .builder()
// .pollTimeout(Duration.ofMillis(1))
// .build();
// var listenerContainer = StreamMessageListenerContainer.create(factory, options);
// var subscription = listenerContainer.receiveAutoAck(Consumer.from(DragonConstant.ChannelRedisQueueEnum.ALIPAY_PAY_GROUP.getCode(), "alipay-pay-notify-1"),
// StreamOffset.create(DragonConstant.ChannelRedisQueueEnum.ALIPAY_PAY_KEY.getCode(), ReadOffset.lastConsumed()), redisPayNotifyReceiver);
// listenerContainer.start();
// return subscription;
// }
//
// @Bean
// public Subscription subscriptionWepayNotify0(RedisConnectionFactory factory) {
// var options = StreamMessageListenerContainer
// .StreamMessageListenerContainerOptions
// .builder()
// .pollTimeout(Duration.ofMillis(1))
// .build();
// var listenerContainer = StreamMessageListenerContainer.create(factory, options);
// var subscription = listenerContainer.receiveAutoAck(Consumer.from(DragonConstant.ChannelRedisQueueEnum.WECHAT_PAY_GROUP.getCode(), "wepay-pay-notify-0"),
// StreamOffset.create(DragonConstant.ChannelRedisQueueEnum.WECHAT_PAY_KEY.getCode(), ReadOffset.lastConsumed()), redisPayNotifyReceiver);
// listenerContainer.start();
// return subscription;
// }
//
// @Bean
// public Subscription subscriptionWepayNotify1(RedisConnectionFactory factory) {
// var options = StreamMessageListenerContainer
// .StreamMessageListenerContainerOptions
// .builder()
// .pollTimeout(Duration.ofMillis(1))
// .build();
// var listenerContainer = StreamMessageListenerContainer.create(factory, options);
// var subscription = listenerContainer.receiveAutoAck(Consumer.from(DragonConstant.ChannelRedisQueueEnum.WECHAT_PAY_GROUP.getCode(), "wepay-pay-notify-1"),
// StreamOffset.create(DragonConstant.ChannelRedisQueueEnum.WECHAT_PAY_KEY.getCode(), ReadOffset.lastConsumed()), redisPayNotifyReceiver);
// listenerContainer.start();
// return subscription;
// }
}
...@@ -154,6 +154,9 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer ...@@ -154,6 +154,9 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
return ResponseDto.failure("无法查看"); return ResponseDto.failure("无法查看");
} }
GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId); GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId);
if(backOrderVo.getStatus().equals(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue())){
return ResponseDto.failure("已经发起");
}
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue()); backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_0.getValue());
backOrderVo.setAuditAt(nowStr); backOrderVo.setAuditAt(nowStr);
//添加日志 //添加日志
......
...@@ -349,7 +349,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -349,7 +349,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (addressesVo == null) { if (addressesVo == null) {
storeOrder.setPriceExpress(BigDecimal.ZERO); storeOrder.setPriceExpress(BigDecimal.ZERO);
} else { } else {
storeOrder.setPriceExpress(BigDecimal.TEN); storeOrder.setPriceExpress(BigDecimal.ZERO);
} }
storeOrder.setPriceTotal(storeTotalPrice.add(storeOrder.getPriceExpress())); storeOrder.setPriceTotal(storeTotalPrice.add(storeOrder.getPriceExpress()));
BigDecimal priceActual = storeOrder.getPriceTotal().subtract(voucherPrice).subtract(storeVoucherPrice); BigDecimal priceActual = storeOrder.getPriceTotal().subtract(voucherPrice).subtract(storeVoucherPrice);
...@@ -901,7 +901,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -901,7 +901,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String orderId = backOrderVo.getOrderId(); String orderId = backOrderVo.getOrderId();
List<GoblinBackOrderSkuVo> backOrderSkuVos = backOrderVo.getBackOrderSkuVos(); List<GoblinBackOrderSkuVo> backOrderSkuVos = backOrderVo.getBackOrderSkuVos();
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId); GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
orderVo.setPriceRefund(orderVo.getPriceRefund().add(refundCallbackParam.getRefundPrice())); orderVo.setPriceRefund(orderVo.getPriceRefund()==null?BigDecimal.ZERO:orderVo.getPriceRefund().add(refundCallbackParam.getRefundPrice()));
if (orderVo.getPriceRefund().compareTo(orderVo.getPriceActual()) >= 0) { if (orderVo.getPriceRefund().compareTo(orderVo.getPriceActual()) >= 0) {
//整单退款 退券 //整单退款 退券
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue()); orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
......
...@@ -296,7 +296,11 @@ public class GoblinOrderUtils { ...@@ -296,7 +296,11 @@ public class GoblinOrderUtils {
//超时支付自动退款 //超时支付自动退款
public Boolean refundOrderSku(String orderId, String paymentId,String paymentType) { public Boolean refundOrderSku(String orderId, String paymentId, String paymentType) {
int autoSize = redisUtils.getBackOrderByOrderId(orderId).size();
if (autoSize > 0) {
return true;
}
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime(); String nowStr = DateUtil.getNowTime();
...@@ -329,7 +333,7 @@ public class GoblinOrderUtils { ...@@ -329,7 +333,7 @@ public class GoblinOrderUtils {
goblinBackOrder.setUserId(orderVo.getUserId()); goblinBackOrder.setUserId(orderVo.getUserId());
// goblinBackOrder.setSkuIdNums(orderSkuId); // goblinBackOrder.setSkuIdNums(orderSkuId);
goblinBackOrder.setType(GoblinStatusConst.Type.BACK_TYPE_1.getValue()); goblinBackOrder.setType(GoblinStatusConst.Type.BACK_TYPE_1.getValue());
goblinBackOrder.setReason(GoblinStatusConst.Type.BACK_REASON_TYPE_8.getDesc()); goblinBackOrder.setReason(GoblinStatusConst.Type.BACK_REASON_TYPE_10.getDesc());
goblinBackOrder.setDescribes("超时支付自动退款"); goblinBackOrder.setDescribes("超时支付自动退款");
refundPrice = refundPrice.add(orderVo.getPriceExpress()); refundPrice = refundPrice.add(orderVo.getPriceExpress());
goblinBackOrder.setRealBackPrice(refundPrice); goblinBackOrder.setRealBackPrice(refundPrice);
......
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