作者 王智

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

... ... @@ -594,9 +594,9 @@ class Api
$createtime = Db::name('sun')->where(['id' => $id])->value('createtime');
$weekarray = array("", "", "", "", "", "", ""); //先定义一个数组
$is_week = "" . $weekarray[date("w", strtotime(date('Y-m-d', $createtime)))];
$map['createtime'] = ['BETWEEN', [$createtime - 1, $createtime + 86400 - 1]];
$map['createtime'] = ['BETWEEN', [$createtime - 2, $createtime + 5]];
// if ($is_week == '周一') {
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where('createtime', $createtime)->select();
$count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select();
// if (!empty($count)) {
if (count($count) > 1) {
$this->error('超过最大可预约次数', 0);
... ...