Exemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Withdraw::find()->orderBy('id DESC');
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 10]]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'uid' => $this->uid, 'amount' => $this->amount, 'status' => $this->status, 'create_at' => $this->create_at, 'update_at' => $this->update_at]);
     $query->andFilterWhere(['like', 'identityid', $this->identityid])->andFilterWhere(['like', 'identitytype', $this->identitytype])->andFilterWhere(['like', 'card_top', $this->card_top])->andFilterWhere(['like', 'card_last', $this->card_last])->andFilterWhere(['like', 'userip', $this->userip])->andFilterWhere(['like', 'ybdrawflowid', $this->ybdrawflowid])->andFilterWhere(['like', 'msg', $this->msg]);
     return $dataProvider;
 }
Exemplo n.º 2
0
 /**
  * 记录用户提现操作
  * @param $uid
  * @param $identityid
  * @param $card_top
  * @param $card_last
  * @param $amount
  * @param $userip
  * @param $ybamount
  * @param $ybdrawflowid
  * @param $status
  * @param $msg
  */
 private static function withdrawLog($uid, $identityid, $card_top, $card_last, $amount, $userip, $status, $msg, $ybamount, $ybdrawflowid)
 {
     $withdraw = new Withdraw();
     $withdraw->uid = $uid;
     $withdraw->identityid = $identityid;
     $withdraw->card_top = $card_top;
     $withdraw->card_last = $card_last;
     $withdraw->amount = $amount;
     $withdraw->userip = $userip;
     $withdraw->ybamount = $ybamount;
     $withdraw->ybdrawflowid = $ybdrawflowid;
     $withdraw->status = $status;
     $withdraw->msg = $msg;
     $withdraw->save();
 }
Exemplo n.º 3
0
 /**
  * Finds the Withdraw model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Withdraw the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Withdraw::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }