feat(user): 添加用户申请联系功能并优化俱乐部相关操作

- 新增用户申请联系信息功能,包括申请、审核和处理流程
- 优化俱乐部申请、邀请和处理申请的逻辑
- 修复活动不存在时的错误提示
- 优化活动查询条件,支持一次性活动的特殊处理
This commit is contained in:
2025-05-04 17:23:11 +08:00
parent 98eda4e5ff
commit c76019416a
4 changed files with 272 additions and 116 deletions

View File

@@ -64,7 +64,7 @@ class Test extends BaseJob
$_gameModel = new \app\admin\model\zy\game\Game();
$week = date('w'); //当前星期
$current = time(); //当前时间
$activity = (clone $_actModel)::where('type', 1)->where('pid', 0)->select(); //周期性主活动
$activity = (clone $_actModel)::where('pid', 0)->select(); //周期性主活动
foreach ($activity as $act) {
$act = $act->toArray();
$publicTime = json_decode($act['public_time'] ?? '[]', true);
@@ -81,9 +81,11 @@ class Test extends BaseJob
}
$act['public_time'] = date('Y-m-d H:i:s', $public_time - $publicBefore * 86400); //设定的时间
$act['date'] = date('Y-m-d', $public_time - $publicBefore * 86400); //设定的日期
$games = (clone $_gameModel)::where('act_id', $act['id'])
->where('public_time', $act['public_time'])
->where('date', $act['date'])->select();
$query = (clone $_gameModel)::where('act_id', $act['id']);
if ($act['type'] == 0) { //一次性活动
$query->where('public_time', $act['public_time'])->where('date', $act['date']);
}
$games = $query->select();
if (!empty($games)) {
print_r('已存在');
continue; // 已存在