Commit 7172713c authored by 刘小敏's avatar 刘小敏

AI试戴接口 试戴次数调高 方便调试

parent 9353698a
...@@ -45,7 +45,8 @@ class User ...@@ -45,7 +45,8 @@ class User
// 查询我的试戴列表 // 查询我的试戴列表
$res = userModel::where('id', $user_id) $res = userModel::where('id', $user_id)
->find(); ->find();
if ($res->ai_count > 4 && $res->ai_time > Time::today()[0]) { // if ($res->ai_count > 4 && $res->ai_time > Time::today()[0]) {
if ($res->ai_count > 999999 && $res->ai_time > Time::today()[0]) {
return 0; // 不可以试戴 return 0; // 不可以试戴
} else { } else {
if($res->ai_time < Time::today()[0]) { if($res->ai_time < Time::today()[0]) {
...@@ -53,10 +54,8 @@ class User ...@@ -53,10 +54,8 @@ class User
} else { } else {
$ai_count = intval($res->ai_count)+1; $ai_count = intval($res->ai_count)+1;
} }
// userModel::where('id', $user_id)->update(['ai_count' => $ai_count, 'ai_time' => time()]);
return 1; // 可以试戴 return 1; // 可以试戴
} }
} }
/** /**
...@@ -77,6 +76,7 @@ class User ...@@ -77,6 +76,7 @@ class User
} else { } else {
$ai_count = intval($res->ai_count)+1; $ai_count = intval($res->ai_count)+1;
} }
// 试戴次数+1
userModel::where('id', $user_id)->update(['ai_count' => $ai_count, 'ai_time' => time()]); userModel::where('id', $user_id)->update(['ai_count' => $ai_count, 'ai_time' => time()]);
return 1; // 可以试戴 return 1; // 可以试戴
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment