作者 王智

2021/03/08 北京固定翼飞机修改

@@ -152,13 +152,33 @@ class Common extends Api @@ -152,13 +152,33 @@ class Common extends Api
152 'status' => $v['status'], 152 'status' => $v['status'],
153 'cloud_type' => $v['cloud_type'], 153 'cloud_type' => $v['cloud_type'],
154 'plane_type' => $v['plane_type'], 154 'plane_type' => $v['plane_type'],
155 - 'createtime' => time() + 60 + 86400 * 14,  
156 - 'updatetime' => time() + 60 + 86400 * 14 155 + 'createtime' => time() + 60 + 86400 * 14,
  156 + 'updatetime' => time() + 60 + 86400 * 14
157 ]; 157 ];
158 - $res= Db::name('sun')->insert($data);  
159 - if(!$res){  
160 - $this->error('失败',0);  
161 - } 158 + $res = Db::name('sun')->insert($data);
  159 + if (!$res) {
  160 + $this->error('失败', 0);
  161 + }
  162 + }
  163 + }
  164 +
  165 +
  166 + //FooterBook
  167 + public function FooterBook()
  168 + {
  169 + $Info = Db::name('sun')->where('status', 3)->where('id','>',8026)->select();
  170 + foreach ($Info as $k => $v) {
  171 + $Is = Db::name('yuyue')->where('user_id', $v['user_id'])->where('sun_id', $v['id'])->where('createtime', $v['createtime'])->find();
  172 + if (empty($Is)) {
  173 + $data = [
  174 + 'user_id' => $v['user_id'],
  175 + 'sun_id' => $v['id'],
  176 + 'createtime' => $v['createtime'],
  177 + 'type' => 0
  178 + ];
  179 + $Bool = Db::name('yuyue')->insert($data);
  180 + dump($Bool);
  181 + }
162 } 182 }
163 } 183 }
164 184