Esempio n. 1
0
 public function sttPaymentPartnerHourAction()
 {
     $response = array("status" => 0, "result" => array());
     $pkey = $this->request->getQuery("pkey", null, false);
     $date = $this->request->getQuery("date", null, false);
     $payment_obj = new \HaiQuan\Backend\Models\Payment();
     $payment = $payment_obj->hourRevenueByPID($date, $pkey)->toArray();
     $response["status"] = 1;
     $response["result"] = $payment;
     echo json_encode($response);
     exit;
 }
Esempio n. 2
0
 private function calPaymentTrans($distance = false)
 {
     $data_obj = new \HaiQuan\Backend\Models\CtgData();
     $payment_obj = new \HaiQuan\Backend\Models\Payment();
     $trans = 0;
     if (!empty($distance)) {
         $key = $distance . "_PAY_TRANS";
         if ($distance == 7) {
             $trans = $payment_obj->distancePaymentTransaction($this->_7_day, $this->_yesterday)->toArray();
         } else {
             $trans = $payment_obj->distancePaymentTransaction($this->_30_day, $this->_yesterday)->toArray();
         }
         $trans = $this->calAvarage($trans);
     } else {
         $key = "D_PAY_TRANS";
         $trans = $payment_obj->datePaymentTransaction($this->_yesterday)->toArray();
         $trans = $trans["value"];
     }
     $data_obj->replaceKey($this->_yesterday, $key, $trans);
     return $trans;
 }