/**
   * 订单支付成功确认
   *
   * @param orderCode
   * @param memberPin
   * @param payChannel
   * @param payCode
   * @param payTime
   * @return
   */
  @RequestMapping(value = "/update/orderPaySuccessConfirm", method = RequestMethod.POST)
  @ResponseBody
  public RestResultDTO orderPaySuccessConfirm(
      String memberPin,
      String orderCode,
      Integer payMoney,
      Integer payChannel,
      String payCode,
      String payTime) {
    RestResultDTO restResultDTO = new RestResultDTO();
    try {
      CommonValidateUtil.notEmpty(memberPin, "会员不能为空");
      if (!CommonValidateUtil.validateFixedLengthDigital(orderCode, 20)) {
        throw new IllegalArgumentException("请输入正确的订单号");
      }

      Validate.notNull(payMoney, "支付金额不能为空");

      if (payMoney <= 0) {
        throw new IllegalArgumentException("请输入正确的支付金额");
      }

      Validate.notNull(payChannel, "支付渠道不能为空");
      Validate.notNull(OrderPayChannelEnum.get(payChannel), "支付渠道不能为空");

      if (!CommonValidateUtil.validateRangeLengthStr(payCode, 1, 50)) {
        throw new IllegalArgumentException("支付编码不能为空");
      }
      CommonValidateUtil.notEmpty(payTime, "支付时间不能为空");

      restResultDTO =
          orderCreateAndPayService.orderPaySuccessConfirm(
              memberPin,
              orderCode,
              payMoney,
              payChannel,
              payCode,
              DateOperator.parse(payTime, "yyyyMMddHHmmss"));

      /*----- 校验订单上的产品副本是否已和保险公司对接成功 -----*/
      Order order = orderRelatedQueryService.getByOrderCode(orderCode);

      if (order != null && order.getId() != null) {
        if (!order.getProductDocked())
          restResultDTO.setBody(CustomCode.NO_CALL_AUTOMATIC_INS_ACCEPT_INTER);
      }

    } catch (Exception e) {
      exceptionDeal(restResultDTO, e, "orderPaySuccessConfirm", "订单支付成功确认失败");
    }

    return restResultDTO;
  }
  /**
   * 订单支付失败确认
   *
   * @param memberPin
   * @param orderCode
   * @param reason
   * @return
   */
  @RequestMapping(value = "/update/orderPayFailureConfirm", method = RequestMethod.POST)
  @ResponseBody
  public RestResultDTO orderPayFailureConfirm(String memberPin, String orderCode, String reason) {
    RestResultDTO restResultDTO = new RestResultDTO();
    try {
      CommonValidateUtil.notEmpty(memberPin, "会员不能为空");
      if (!CommonValidateUtil.validateFixedLengthDigital(orderCode, 20)) {
        throw new IllegalArgumentException("请输入正确的订单号");
      }

      if (!CommonValidateUtil.validateRangeLengthStr(reason, 1, 50)) {
        throw new IllegalArgumentException("请输入正确的失败原因");
      }
      orderCreateAndPayService.orderPayFailureConfirm(memberPin, orderCode, reason);
      restResultDTO.initStatus(StatusCode.OK);
    } catch (Exception e) {
      exceptionDeal(restResultDTO, e, "orderPayFailureConfirm", "订单支付失败确认失败");
    }
    return restResultDTO;
  }