예제 #1
0
 public function insertRecord($form, $record_id)
 {
     $this['lr_id'] = $form['lr_id'];
     $this['record_id'] = $record_id;
     if ($this->save()) {
         $lendRecord = LendRecord::find()->where(['id' => $this['lr_id']])->one();
         $lendRecord->refreshstatus($this['lr_id']);
         return null;
     } else {
         return $this->errors;
     }
 }
예제 #2
0
 public function actionAjaxGetBorrowInfo()
 {
     $id = Yii::$app->request->post('account_id');
     $type = Yii::$app->request->post('type');
     $lendRecord = new LendRecord();
     $rel = $lendRecord->findLendInfo($id, $type);
     echo json_encode($rel);
     // echo json_encode($type);
 }