| @@ -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(), "请填写有效时间类型"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -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); | ||||
| @@ -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()); | ||||