From 34db7035c9c7880e00b9328d022be65a29c62cb2 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期一, 31 七月 2023 10:40:56 +0800 Subject: [PATCH] Merge branch 'feature/v1.1.5接口' into develop --- application/api/logic/ActivityInfo.php | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/application/api/logic/ActivityInfo.php b/application/api/logic/ActivityInfo.php index c391346..b09270d 100644 --- a/application/api/logic/ActivityInfo.php +++ b/application/api/logic/ActivityInfo.php @@ -6,6 +6,8 @@ use think\Db; use app\common\model\User as ModelUser; use app\api\logic\SettlementRecord as LogicSettlementRecord; +use app\api\logic\UserBrowse as LogicUserBrowse; + class ActivityInfo extends BasicLogic { @@ -81,14 +83,15 @@ try{ //鏌ヨ杩涜涓殑鎷涘嫙娲诲姩 $nowTime= date("Y-m-d H:i:s", time()); - $actList=Db::query('select id from t_activity_manage where act_status=1 and start_time<=? and end_time>=? and act_type=0 limit 1',[$nowTime,$nowTime]); + $actList=Db::query('select id,end_time from t_activity_manage where act_status=1 and start_time<=? and end_time>=? and act_type=0 limit 1',[$nowTime,$nowTime]); if(empty($actList)) {//娌℃湁杩涜涓殑娲诲姩锛屼笉鐢ㄥ鐞� return true; } + //鏌ヨ鏄惁鍙傚姞浜嗘嫑鍕熸椿鍔� $recruitid=$actList[0]['id'].'u'.$userid; - $actReinfo=Db::query('select id,create_time from t_recruit_act where id=? and settlement_status=0',[$recruitid]); + $actReinfo=Db::query('select id,create_time from t_recruit_act where id=? and user_t=0 and settlement_status=0',[$recruitid]); if(empty($actReinfo)) {//娌℃湁鍙傚姞娲诲姩锛屼笉鐢ㄥ鐞� return true; @@ -253,4 +256,22 @@ return $maxReward; } + /** + * 鑷畾涔夊脊绐�-0鍏冭喘 + */ + public function popupcus_freebuy($userInfo) + { + $LogicUserBrowse = new LogicUserBrowse(); + $res = $LogicUserBrowse->checkIsFirstFree($userInfo->id); + if($res === false) + { + return false; + } + if(empty($res)) + { + return true; + } + return false; + } + } \ No newline at end of file -- Gitblit v1.9.3