Browse Source

允许未成团订单进行发货,修复退款通知

sj
1304317391@qq.com 2 years ago
parent
commit
0e217db2ba
  1. 5
      zsw-bxg/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java
  2. 20
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java
  3. 4
      zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java
  4. 2
      zsw-bxg/src/main/java/co/yixiang/utils/OrderUtil.java

5
zsw-bxg/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java

@ -181,13 +181,14 @@ public class TemplateListener implements SmartApplicationListener {
break;
case TYPE_9:
weixinTemplateService.refundSuccessNotice("您的订单退款申请已提交,等待审核。",templateBean.getOrderId(), templateBean.getPrice(),
templateBean.getUid(), templateBean.getTime());
try {
wxbotMsgUtil.inform(Long.parseLong(templateBean.getOrderId()),1);
} catch (IOException e) {
throw new RuntimeException(e);
}
weixinTemplateService.refundSuccessNotice("您的订单退款申请已提交,等待审核。",templateBean.getOrderId(), templateBean.getPrice(),
templateBean.getUid(), templateBean.getTime());
/**************给客服发送消息**************/
try {
List<YxStoreCustomer> yxStoreCustomers = yxStoreCustomerService.lambdaQuery().eq(YxStoreCustomer::getIsEnable, ShopConstants.ZSW_ONE_NUM).list();

20
zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

@ -824,13 +824,13 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
throw new YshopException("请后台先添加快递公司");
}
//判断拼团产品
if (orderQueryVo.getPinkId() != null && orderQueryVo.getPinkId() > 0) {
YxStorePink pink = pinkService.getById(orderQueryVo.getPinkId());
if (!OrderInfoEnum.PINK_STATUS_2.getValue().equals(pink.getStatus())) {
throw new YshopException("拼团未成功不能发货");
}
}
// //判断拼团产品--现允许未成团单独发货
// if (orderQueryVo.getPinkId() != null && orderQueryVo.getPinkId() > 0) {
// YxStorePink pink = pinkService.getById(orderQueryVo.getPinkId());
// if (!OrderInfoEnum.PINK_STATUS_2.getValue().equals(pink.getStatus())) {
// throw new YshopException("拼团未成功不能发货");
// }
// }
YxStoreOrder storeOrder = YxStoreOrder.builder()
.id(orderQueryVo.getId())
@ -2789,11 +2789,11 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
str = "[拼团订单]";
} else {
if (OrderInfoEnum.PINK_STATUS_1.getValue().equals(storePink.getStatus())) {
str = "[拼团订单]正在进行中";
str = "[拼团订单]拼团进行中";
} else if (OrderInfoEnum.PINK_STATUS_2.getValue().equals(storePink.getStatus())) {
str = "[拼团订单]已完成";
str = "[拼团订单]拼团成功";
} else if (OrderInfoEnum.PINK_STATUS_3.getValue().equals(storePink.getStatus())) {
str = "[拼团订单]未完成";
str = "[拼团订单]拼团失败";
} else {
str = "[拼团订单]历史订单";
}

4
zsw-bxg/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java

@ -146,8 +146,8 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now()));
storeAfterSalesStatus.setOperator(nickname);
storeAfterSalesStatusMapper.insert(storeAfterSalesStatus);
//如果订单未发货,直接调用退款方法
if (yxStoreOrder.getStatus().equals(OrderInfoEnum.STATUS_0)|yxStoreOrder.getStatus().equals(OrderInfoEnum.STATUS_5)){
//如果订单未发货,直接调用退款方法(发货审核通过后进行退款需要通知及退款审核)
if (yxStoreOrder.getStatus().equals(OrderInfoEnum.STATUS_0)){
yxStoreOrderService.orderRefund(yxStoreOrder.getOrderId(),yxStoreOrder.getPayPrice(),
ShopCommonEnum.AGREE_1.getValue());
}else {

2
zsw-bxg/src/main/java/co/yixiang/utils/OrderUtil.java

@ -196,6 +196,8 @@ public class OrderUtil {
statusName = "退款中";
} else if (paid == 1 && refund_status == 2) {
statusName = "已退款";
}else if (paid == 0 && status == 8){
statusName = "已取消";
}
return statusName;

Loading…
Cancel
Save