...
|
...
|
@@ -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);
|
...
|
...
|
|