From 75230dd3b866b89312a0a4b1c0b2e5cf33e06525 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Fri, 19 Sep 2025 17:00:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cunkebao/.env.local | 1 + 1 file changed, 1 insertion(+) create mode 100644 Cunkebao/.env.local diff --git a/Cunkebao/.env.local b/Cunkebao/.env.local new file mode 100644 index 00000000..19e89e7e --- /dev/null +++ b/Cunkebao/.env.local @@ -0,0 +1 @@ +NEXT_PUBLIC_API_BASE_URL= http://yishi.com \ No newline at end of file From 2bd82fc6ef12daea0af5cd144a4a0c84fe89599c Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Fri, 19 Sep 2025 17:50:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/GetAddFriendPlanDetailV1Controller.php | 14 +++++++------- Server/application/cunkebao/validate/Workbench.php | 12 +++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Server/application/cunkebao/controller/plan/GetAddFriendPlanDetailV1Controller.php b/Server/application/cunkebao/controller/plan/GetAddFriendPlanDetailV1Controller.php index 7ec88c07..55dfaae4 100644 --- a/Server/application/cunkebao/controller/plan/GetAddFriendPlanDetailV1Controller.php +++ b/Server/application/cunkebao/controller/plan/GetAddFriendPlanDetailV1Controller.php @@ -120,7 +120,7 @@ class GetAddFriendPlanDetailV1Controller extends Controller // 解析JSON字段 $sceneConf = json_decode($plan['sceneConf'], true) ?: []; $reqConf = json_decode($plan['reqConf'], true) ?: []; - $reqConf['deveiceGroups'] = $reqConf['device']; + $reqConf['deviceGroups'] = $reqConf['device']; $msgConf = json_decode($plan['msgConf'], true) ?: []; $tagConf = json_decode($plan['tagConf'], true) ?: []; @@ -139,8 +139,8 @@ class GetAddFriendPlanDetailV1Controller extends Controller } - if (!empty($reqConf['deveiceGroups'])){ - $deveiceGroupsOptions = DeviceModel::alias('d') + if (!empty($reqConf['deviceGroups'])){ + $deviceGroupsOptions = DeviceModel::alias('d') ->field([ 'd.id', 'd.imei', 'd.memo', 'd.alive', 'l.wechatId', @@ -149,16 +149,16 @@ class GetAddFriendPlanDetailV1Controller extends Controller ->leftJoin('device_wechat_login l', 'd.id = l.deviceId and l.alive =' . DeviceWechatLoginModel::ALIVE_WECHAT_ACTIVE . ' and l.companyId = d.companyId') ->leftJoin('wechat_account a', 'l.wechatId = a.wechatId') ->order('d.id desc') - ->whereIn('d.id',$reqConf['deveiceGroups']) + ->whereIn('d.id',$reqConf['deviceGroups']) ->select(); - foreach ($deveiceGroupsOptions as &$device) { + foreach ($deviceGroupsOptions as &$device) { $curstomer = WechatCustomerModel::field('friendShip')->where(['wechatId' => $device['wechatId']])->find(); $device['totalFriend'] = $curstomer->friendShip->totalFriend ?? 0; } unset($device); - $reqConf['deveiceGroupsOptions'] = $deveiceGroupsOptions; + $reqConf['deviceGroupsOptions'] = $deviceGroupsOptions; }else{ - $reqConf['deveiceGroupsOptions'] = []; + $reqConf['deviceGroupsOptions'] = []; } diff --git a/Server/application/cunkebao/validate/Workbench.php b/Server/application/cunkebao/validate/Workbench.php index c382cfe8..ba9cb462 100644 --- a/Server/application/cunkebao/validate/Workbench.php +++ b/Server/application/cunkebao/validate/Workbench.php @@ -55,11 +55,9 @@ class Workbench extends Validate 'distributeType' => 'requireIf:type,5|in:1,2', 'maxPerDay' => 'requireIf:type,5|number|min:1', 'timeType' => 'requireIf:type,5|in:1,2', - 'startTime' => 'requireIf:type,5|dateFormat:H:i', - 'endTime' => 'requireIf:type,5|dateFormat:H:i', 'accountGroups' => 'requireIf:type,5|array|min:1', // 通用参数 - 'deveiceGroups' => 'requireIf:type,1,2,5|array', + 'deviceGroups' => 'requireIf:type,1,2,5|array', ]; /** @@ -142,8 +140,8 @@ class Workbench extends Validate 'timeType.requireIf' => '请选择时间类型', // 通用提示 - 'deveiceGroups.require' => '请选择设备', - 'deveiceGroups.array' => '设备格式错误', + 'deviceGroups.require' => '请选择设备', + 'deviceGroups.array' => '设备格式错误', 'targetGroups.require' => '请选择目标用户组', 'targetGroups.array' => '目标用户组格式错误', 'accountGroups.requireIf' => '流量分发时必须选择分发账号', @@ -155,7 +153,7 @@ class Workbench extends Validate * 验证场景 */ protected $scene = [ - 'create' => ['name', 'type', 'autoStart', 'deveiceGroups', 'targetGroups', + 'create' => ['name', 'type', 'autoStart', 'deviceGroups', 'targetGroups', 'interval', 'maxLikes', 'startTime', 'endTime', 'contentTypes', 'syncInterval', 'syncCount', 'syncType', 'pushType', 'startTime', 'endTime', 'maxPerDay', 'pushOrder', 'isLoop', 'status', 'wechatGroups', 'contentGroups', @@ -163,7 +161,7 @@ class Workbench extends Validate 'groupNameTemplate', 'maxGroupsPerDay', 'groupSizeMin', 'groupSizeMax', ], 'update_status' => ['id', 'status'], - 'edit' => ['name', 'type', 'autoStart', 'deveiceGroups', 'targetGroups', + 'edit' => ['name', 'type', 'autoStart', 'deviceGroups', 'targetGroups', 'interval', 'maxLikes', 'startTime', 'endTime', 'contentTypes', 'syncInterval', 'syncCount', 'syncType', 'pushType', 'startTime', 'endTime', 'maxPerDay', 'pushOrder', 'isLoop', 'status', 'wechatGroups', 'contentGroups',