Kaynağa Gözat

[砍价][修改]:券有效日期类型检查添加

release_toaliyun_real
Stormeye Wu 7 yıl önce
ebeveyn
işleme
951177d271
3 değiştirilmiş dosya ile 12 ekleme ve 6 silme
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  2. +6
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  3. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Dosyayı Görüntüle

@@ -105,6 +105,8 @@ public class WxCouponServiceImpl implements WxCouponService {
record.setValidEndDate(null); record.setValidEndDate(null);
} else if (record.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME)) { } else if (record.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME)) {
record.setValidDays(null); record.setValidDays(null);
} else {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "请填写有效时间类型");
} }
} }




+ 6
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Dosyayı Görüntüle

@@ -817,12 +817,14 @@ public class WxOrderServiceImpl implements WxOrderService {
throw new MallinkException(ErrorCode.USER_IS_EMPTY); throw new MallinkException(ErrorCode.USER_IS_EMPTY);
} }
// 已支付,更新支付时间 // 已支付,更新支付时间
updateOrder.setPaymentTime(currentDate);
updateOrder.setOrderStatus(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode());
updateOrder.setUpdateDate(currentDate);
WxOrder updateT = new WxOrder();
updateT.setId(updateOrder.getId());
updateT.setPaymentTime(currentDate);
updateT.setOrderStatus(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode());
updateT.setUpdateDate(currentDate);
int ret = 0; int ret = 0;
try { try {
wxOrderMapper.updateByPrimaryKey(updateOrder);
wxOrderMapper.updateByPrimaryKeySelective(updateT);
} catch (Exception e) { } catch (Exception e) {
logger.error("订单更新失败:" + e.getMessage()); logger.error("订单更新失败:" + e.getMessage());
throw new MallinkException(ErrorCode.ORDER_UPDATE_ERR); throw new MallinkException(ErrorCode.ORDER_UPDATE_ERR);


+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java Dosyayı Görüntüle

@@ -1156,8 +1156,10 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
if (payStatus == EnumPayStatus.PAY_STATUS_SUCCESS) { if (payStatus == EnumPayStatus.PAY_STATUS_SUCCESS) {
// 已经是成功状态,只更新transactionId // 已经是成功状态,只更新transactionId
try { try {
record.setUpdateTime(currentDate);
record.setTransactionId(transactionId);
WxPayOrder updateT = new WxPayOrder();
updateT.setId(record.getId());
updateT.setUpdateTime(currentDate);
updateT.setTransactionId(transactionId);
wxPayOrderMapper.updateByPrimaryKeySelective(record); wxPayOrderMapper.updateByPrimaryKeySelective(record);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());


Yükleniyor…
İptal
Kaydet