package com.icloud.server.scala.engine.contect

import com.icloud.server.payutils.enums.PayTypeEnum
import com.icloud.server.scala.engine.service.{GoodsPayService, Goodspaye, PayOrderServer}
import com.icloud.server.scala.payorder.OrderServer
import org.springframework.stereotype.Component

import scala.beans.BeanProperty

/**
 * @Author : yang
 * @Date : 2022-07-15 01:01
 * @Version : 2.1.2
 */
class Context(@BeanProperty var goodspayservice: GoodsPayService, @BeanProperty val request: PayType, @BeanProperty var payurl: PayUrl) {

  @BeanProperty var payLink: String = _
  @BeanProperty
  var aliappid: String = _
  @BeanProperty
  var wxappid: String = _
  @BeanProperty
  var wxappid2: String = _
  //微信
  @BeanProperty
  var mchid: String = _
  @BeanProperty
  var mchkey: String = _
  //支付宝
  @BeanProperty
  var privatekey: String = _
  @BeanProperty
  var alipaypublickey: String = _
  @BeanProperty
  var goodspaye: Goodspaye = _

  @BeanProperty
  var wxpayid: Long = _

  @BeanProperty
  var alipayid: Long = _

  @BeanProperty
  var phone: String = _

  @BeanProperty
  var uid: Long = _

//  def payurlall(): PayTypeEnum = {
//    if (request.paytypeenum == PayTypeEnum.WXPAY) {
//      return PayTypeEnum.WXPAY
//    } else if (request.paytypeenum == PayTypeEnum.ALIPAY) {
//      return PayTypeEnum.ALIPAY
//    }
//    null
//  }
}

case class PayUrl(@BeanProperty var aliurl: Object, @BeanProperty var wxurl: Object)


