作者 gpj-dev

定时任务 创建模板 修改

... ... @@ -216,15 +216,18 @@ class Common extends Api
*/
public function CreateMoban()
{
$Time = time();
$date = date('Y-m-d', time());
$dayTime = strtotime($date);
$time = $dayTime + 86400 * 14;
$arr = Db::name('moban')->order('base_id','asc')->select();
foreach ($arr as $k => $v) {
$data = [
'time_id' => $v['time_id'],
'status' => $v['status'],
'plane_id' => $v['plane_id'],
'createtime' => $Time + 60 + 86400 * 14,
'updatetime' => $Time + 60 + 86400 * 14
'createtime' => $time,
'updatetime' => $time
];
$res = Db::name('sun')->insert($data);
if (!$res) {
... ...