From 47e5316450f7487ff62c0ae9333d070d59d2b397 Mon Sep 17 00:00:00 2001
From: colly_wyx <wangyixiong_007@163.com>
Date: Thu, 29 Mar 2018 15:20:31 +0800
Subject: [PATCH] 修正时间判断
---
Yfs/Domain/Data.php | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Yfs/Domain/Data.php b/Yfs/Domain/Data.php
index 1a39944..826c25c 100644
--- a/Yfs/Domain/Data.php
+++ b/Yfs/Domain/Data.php
@@ -22,6 +22,7 @@
foreach ($data['data'] as $value) {
$arr['value'] = $value['value'];
$arr['create_time'] = $value['time'];
+ $arr['date'] = date('Y-m-d', strtotime($value['time']));
$this->model->add($arr);
if(isset($arr['_id']))
unset($arr['_id']);
@@ -32,4 +33,18 @@
}
+ public function getList(){
+ return $this->model->getList();
+ }
+
+
+
+ //public function updateTime($data){
+ // $id = $data['_id'];
+ // unset($data['_id']);
+ // return $this->model->update($data, array('_id' => $id));
+ //}
+
+
+
}
--
Gitblit v1.8.0