From 342b239d76e871c56a5913bf6bdf3d74f3e071b2 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 16 Jul 2025 11:25:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/AutomaticAssign.php | 102 ++++++++++++++---- .../application/job/WorkbenchMomentsJob.php | 39 +++++-- 2 files changed, 111 insertions(+), 30 deletions(-) diff --git a/Server/application/api/controller/AutomaticAssign.php b/Server/application/api/controller/AutomaticAssign.php index 3fad358f..eedc84f4 100644 --- a/Server/application/api/controller/AutomaticAssign.php +++ b/Server/application/api/controller/AutomaticAssign.php @@ -47,28 +47,28 @@ class AutomaticAssign extends BaseController } $params = [ - 'accountKeyword' => '', - 'addFrom' => [], - 'allotAccountId' => '', - 'containAllLabel' => false, - 'containSubDepartment' => false, - 'departmentId' => '', - 'extendFields' => [], - 'friendKeyword' => '', - 'friendPhoneKeyword' => '', - 'friendPinYinKeyword' => '', - 'friendRegionKeyword' => '', - 'friendRemarkKeyword' => '', - 'gender' => '', - 'groupId' => null, - 'isByRule' => false, + 'accountKeyword' => !empty($data['accountKeyword']) ? $data['accountKeyword'] : '', + 'addFrom' => !empty($data['addFrom']) ? $data['addFrom'] : [], + 'allotAccountId' => !empty($data['allotAccountId']) ? $data['allotAccountId'] : '', + 'containAllLabel' => !empty($data['containAllLabel']) ? $data['containAllLabel'] : false, + 'containSubDepartment' => !empty($data['containSubDepartment']) ? $data['containSubDepartment'] : false, + 'departmentId' => !empty($data['departmentId']) ? $data['departmentId'] : '', + 'extendFields' => !empty($data['extendFields']) ? $data['extendFields'] : [], + 'friendKeyword' => !empty($data['friendKeyword']) ? $data['friendKeyword'] : '', + 'friendPhoneKeyword' => !empty($data['friendPhoneKeyword']) ? $data['friendPhoneKeyword'] : '', + 'friendPinYinKeyword' => !empty($data['friendPinYinKeyword']) ? $data['friendPinYinKeyword'] : '', + 'friendRegionKeyword' => !empty($data['friendRegionKeyword']) ? $data['friendRegionKeyword'] : '', + 'friendRemarkKeyword' => !empty($data['friendRemarkKeyword']) ? $data['friendRemarkKeyword'] : '', + 'gender' => !empty($data['gender']) ? $data['gender'] : '', + 'groupId' => !empty($data['groupId']) ? $data['groupId'] : null, + 'isByRule' => !empty($data['isByRule']) ? $data['isByRule'] : false, 'isDeleted' => $isDeleted, - 'isPass' => true, - 'keyword' => '', - 'labels' => [], - 'pageIndex' => 0, - 'pageSize' => 100, - 'preFriendId' => '', + 'isPass' => !empty($data['isPass']) ? $data['isPass'] : true, + 'keyword' => !empty($data['keyword']) ? $data['keyword'] : '', + 'labels' => !empty($data['labels']) ? $data['labels'] : [], + 'pageIndex' => !empty($data['pageIndex']) ? $data['pageIndex'] : 0, + 'pageSize' => !empty($data['pageSize']) ? $data['pageSize'] : 100, + 'preFriendId' => !empty($data['preFriendId']) ? $data['preFriendId'] : '', 'toAccountId' => $toAccountId, 'wechatAccountKeyword' => $wechatAccountKeyword ]; @@ -283,4 +283,64 @@ class AutomaticAssign extends BaseController } + /** + * 分配搜索结果 + * @param array $data 请求参数 + * @return \think\response\Json + */ + public function allotSearchResult($data = []) + { + // 获取授权token + $authorization = trim($this->request->header('authorization', $this->authorization)); + if (empty($authorization)) { + return json_encode(['code'=>500,'msg'=>'缺少授权信息']); + } + + try { + + $params = [ + 'accountKeyword' => !empty($data['accountKeyword']) ? $data['accountKeyword'] : '', + 'addFrom' => !empty($data['addFrom']) ? $data['addFrom'] : [], + 'allotAccountId' => !empty($data['allotAccountId']) ? $data['allotAccountId'] : '', + 'containAllLabel' => !empty($data['containAllLabel']) ? $data['containAllLabel'] : false, + 'containSubDepartment' => !empty($data['containSubDepartment']) ? $data['containSubDepartment'] : false, + 'departmentId' => !empty($data['departmentId']) ? $data['departmentId'] : '', + 'extendFields' => !empty($data['extendFields']) ? json_encode($data['extendFields']) : json_encode([]), + 'friendKeyword' => !empty($data['friendKeyword']) ? $data['friendKeyword'] : '', + 'friendPhoneKeyword' => !empty($data['friendPhoneKeyword']) ? $data['friendPhoneKeyword'] : '', + 'friendPinYinKeyword' => !empty($data['friendPinYinKeyword']) ? $data['friendPinYinKeyword'] : '', + 'friendRegionKeyword' => !empty($data['friendRegionKeyword']) ? $data['friendRegionKeyword'] : '', + 'friendRemarkKeyword' => !empty($data['friendRemarkKeyword']) ? $data['friendRemarkKeyword'] : '', + 'gender' => !empty($data['gender']) ? $data['gender'] : '', + 'groupId' => !empty($data['groupId']) ? $data['groupId'] : null, + 'isByRule' => !empty($data['isByRule']) ? $data['isByRule'] : false, + 'isDeleted' => !empty($data['isDeleted']) ? $data['isDeleted'] : false, + 'isPass' => !empty($data['isPass']) ? $data['isPass'] : true, + 'keyword' => !empty($data['keyword']) ? $data['keyword'] : '', + 'labels' => !empty($data['labels']) ? $data['labels'] : [], + 'pageIndex' => !empty($data['pageIndex']) ? $data['pageIndex'] : 0, + 'pageSize' => !empty($data['pageSize']) ? $data['pageSize'] : 20, + 'preFriendId' => !empty($data['preFriendId']) ? $data['preFriendId'] : '', + 'toAccountId' => !empty($data['toAccountId']) ? $data['toAccountId'] : '', + 'wechatAccountKeyword' => !empty($data['wechatAccountKeyword']) ? $data['wechatAccountKeyword'] : '' + ]; + + // 设置请求头 + $headerData = ['client:system']; + $header = setHeader($headerData, $authorization, 'json'); + + // 发送请求 + $result = requestCurl($this->baseUrl . 'api/WechatFriend/allotSearchResult', $params, 'POST', $header, 'json'); + $response = handleApiResponse($result); + if($response){ + return json_encode(['code'=>200,'msg'=>'分配成功']); + }else{ + return json_encode(['code'=>500,'msg'=>$response]); + } + } catch (\Exception $e) { + return json_encode(['code'=>500,'msg'=>'微信好友分配失败:' . $e->getMessage()]); + } + } + + } \ No newline at end of file diff --git a/Server/application/job/WorkbenchMomentsJob.php b/Server/application/job/WorkbenchMomentsJob.php index a62ca783..54c19c01 100644 --- a/Server/application/job/WorkbenchMomentsJob.php +++ b/Server/application/job/WorkbenchMomentsJob.php @@ -69,7 +69,6 @@ class WorkbenchMomentsJob try { // 获取所有工作台 $workbenches = Workbench::where(['status' => 1, 'type' => 2, 'isDel' => 0])->order('id desc')->select(); - foreach ($workbenches as $workbench) { // 获取工作台配置 $config = WorkbenchMoments::where('workbenchId', $workbench->id)->find(); @@ -85,7 +84,6 @@ class WorkbenchMomentsJob // 获取设备 $devices = $this->getDevice($workbench, $config); - if (empty($devices)) { continue; } @@ -95,6 +93,7 @@ class WorkbenchMomentsJob if (empty($contentLibrary)) { continue; } + // 处理内容发送 $this->handleContentSend($workbench, $config, $devices, $contentLibrary); } @@ -279,11 +278,9 @@ class WorkbenchMomentsJob if (empty($contentids)) { return false; } - // 基础查询 $query = Db::name('content_library')->alias('cl') ->join('content_item ci', 'ci.libraryId = cl.id') - ->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') ->where(['cl.isDel' => 0, 'ci.isDel' => 0]) ->where('ci.sendTime <= ' . (time() + 60)) ->whereIn('cl.id', $contentids) @@ -303,23 +300,47 @@ class WorkbenchMomentsJob if ($config['accountType'] == 1) { // 可以循环发送 // 1. 优先获取未发送的内容 - $unsentContent = $query->where('wmsi.id', 'null') + $unsentContent = $query->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') + ->where('wmsi.id', 'null') ->order('ci.sendTime desc, ci.id desc') ->find(); if (!empty($unsentContent)) { return $unsentContent; } + $lastSendData = Db::name('workbench_moments_sync_item')->order('id desc')->find(); + $fastSendData = Db::name('workbench_moments_sync_item')->order('id asc')->find(); + // 2. 如果没有未发送的内容,则获取已发送的内容中最早发送的 - $sentContent = $query->where('wmsi.id', 'not null') - ->order('wmsi.createTime asc, ci.sendTime desc, ci.id desc') - ->find(); + $sentContent = Db::name('content_library')->alias('cl') + ->join('content_item ci', 'ci.libraryId = cl.id') + ->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') + ->where(['cl.isDel' => 0, 'ci.isDel' => 0]) + ->where('ci.sendTime <= ' . (time() + 60)) + ->whereIn('cl.id', $contentids) + ->field([ + 'ci.id', + 'ci.libraryId', + 'ci.contentType', + 'ci.title', + 'ci.content', + 'ci.resUrls', + 'ci.urls', + 'ci.comment', + 'ci.sendTime' + ]); + if ($lastSendData['contentId'] >= $fastSendData['contentId']){ + $sentContent = $sentContent->where('wmsi.contentId','<' ,$lastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); + }else{ + $sentContent = $sentContent->where('wmsi.contentId','>' ,$lastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); + } return $sentContent; } else { // 不能循环发送,只获取未发送的内容 - $list = $query->where('wmsi.id', 'null') + $list = $query->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') + ->where('wmsi.id', 'null') ->order('ci.sendTime desc, ci.id desc') ->find(); return $list; From 400c2a5d8eb7cc36c2beaef680fd5bd34f489db7 Mon Sep 17 00:00:00 2001 From: wanghao <455703030@qq.com> Date: Wed, 16 Jul 2025 15:27:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E6=95=88?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/config/database.php | 66 -------------------------------------- 1 file changed, 66 deletions(-) diff --git a/Server/config/database.php b/Server/config/database.php index 37c407b0..36667610 100644 --- a/Server/config/database.php +++ b/Server/config/database.php @@ -61,70 +61,4 @@ return [ 'break_reconnect' => true, // 断线标识字符串 'break_match_str' => [], - 'clone' => [ - // 数据库类型 - 'type' => 'mysql', - // 服务器地址 - 'hostname' => 'gz-cynosdbmysql-grp-2k3icgxh.sql.tencentcdb.com', - // 数据库名 - 'database' => 'clone', - // 数据库用户名 - 'username' => 'root', - // 数据库密码 - 'password' => 'Lo.EQ{%t9G#v-1qv*Y', - // 端口 - 'hostport' => '20626', - // 数据库编码默认采用utf8 - 'charset' => 'utf8mb4', - // 数据库表前缀 - 'prefix' => '', - ], - 'pgsql' => [ - // 数据库类型 - 'type' => 'pgsql', - // 服务器地址 - 'hostname' => 'pgm-7xv383pbm1orihnpfo.pg.rds.aliyuncs.com', - // 数据库名 - 'database' => 'aggregate_chat_system', - // 数据库用户名 - 'username' => 'postgres', - // 数据库密码 - 'password' => 'JYJ4Bz0dbWdPRVgq', - // 数据库编码默认采用utf8 - 'charset' => 'utf8', - // 数据库表前缀 - 'prefix' => '', - ], - 'xm_pgsql' => [ - // 数据库类型 - 'type' => 'pgsql', - // 服务器地址 - 'hostname' => 'pgm-7xv383pbm1orihnpfo.pg.rds.aliyuncs.com', - // 数据库名 - 'database' => 'xm_aggregate_chat_system', - // 数据库用户名 - 'username' => 'postgres', - // 数据库密码 - 'password' => 'JYJ4Bz0dbWdPRVgq', - // 数据库编码默认采用utf8 - 'charset' => 'utf8', - // 数据库表前缀 - 'prefix' => '', - ], - 'shouyou' => [ - // 数据库类型 - 'type' => 'mysql', - // 服务器地址 - 'hostname' => 'rm-7xv05155q5pa291l3vo.mysql.rds.aliyuncs.com', - // 数据库名 - 'database' => 'shouyou', - // 数据库用户名 - 'username' => 'root', - // 数据库密码 - 'password' => '320Azai609', - // 数据库编码默认采用utf8 - 'charset' => 'utf8', - // 数据库表前缀 - 'prefix' => '', - ], ]; From c6aab288ea9f38dd0cf6a70247b4355893c5a342 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 16 Jul 2025 17:08:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E5=8F=B7=E5=8F=91=E5=B8=83=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/job/WorkbenchMomentsJob.php | 43 +++++-------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/Server/application/job/WorkbenchMomentsJob.php b/Server/application/job/WorkbenchMomentsJob.php index 54c19c01..41ed4701 100644 --- a/Server/application/job/WorkbenchMomentsJob.php +++ b/Server/application/job/WorkbenchMomentsJob.php @@ -93,7 +93,6 @@ class WorkbenchMomentsJob if (empty($contentLibrary)) { continue; } - // 处理内容发送 $this->handleContentSend($workbench, $config, $devices, $contentLibrary); } @@ -281,6 +280,7 @@ class WorkbenchMomentsJob // 基础查询 $query = Db::name('content_library')->alias('cl') ->join('content_item ci', 'ci.libraryId = cl.id') + ->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') ->where(['cl.isDel' => 0, 'ci.isDel' => 0]) ->where('ci.sendTime <= ' . (time() + 60)) ->whereIn('cl.id', $contentids) @@ -295,52 +295,31 @@ class WorkbenchMomentsJob 'ci.comment', 'ci.sendTime' ]); - + // 复制 query + $query2 = clone $query; + $query3 = clone $query; // 根据accountType处理不同的发送逻辑 if ($config['accountType'] == 1) { // 可以循环发送 // 1. 优先获取未发送的内容 - $unsentContent = $query->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') - ->where('wmsi.id', 'null') + $unsentContent = $query->where('wmsi.id', 'null') ->order('ci.sendTime desc, ci.id desc') ->find(); - if (!empty($unsentContent)) { return $unsentContent; } - $lastSendData = Db::name('workbench_moments_sync_item')->order('id desc')->find(); - $fastSendData = Db::name('workbench_moments_sync_item')->order('id asc')->find(); + $lastSendData = Db::name('workbench_moments_sync_item')->where('workbenchId' ,$workbench->id)->order('id desc')->find(); + $fastSendData = Db::name('workbench_moments_sync_item')->where('workbenchId' ,$workbench->id)->order('id asc')->find(); + $sentContent = $query2->where('wmsi.contentId','<' ,$lastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); - // 2. 如果没有未发送的内容,则获取已发送的内容中最早发送的 - $sentContent = Db::name('content_library')->alias('cl') - ->join('content_item ci', 'ci.libraryId = cl.id') - ->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') - ->where(['cl.isDel' => 0, 'ci.isDel' => 0]) - ->where('ci.sendTime <= ' . (time() + 60)) - ->whereIn('cl.id', $contentids) - ->field([ - 'ci.id', - 'ci.libraryId', - 'ci.contentType', - 'ci.title', - 'ci.content', - 'ci.resUrls', - 'ci.urls', - 'ci.comment', - 'ci.sendTime' - ]); - - if ($lastSendData['contentId'] >= $fastSendData['contentId']){ - $sentContent = $sentContent->where('wmsi.contentId','<' ,$lastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); - }else{ - $sentContent = $sentContent->where('wmsi.contentId','>' ,$lastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); + if (empty($sentContent)) { + $sentContent = $query3->where('wmsi.contentId','=' ,$fastSendData['contentId'])->order('wmsi.id ASC')->group('wmsi.contentId')->find(); } return $sentContent; } else { // 不能循环发送,只获取未发送的内容 - $list = $query->join('workbench_moments_sync_item wmsi', 'wmsi.contentId = ci.id and wmsi.workbenchId = ' . $workbench->id, 'left') - ->where('wmsi.id', 'null') + $list = $query->where('wmsi.id', 'null') ->order('ci.sendTime desc, ci.id desc') ->find(); return $list; From 4b3268c6b14318c2faa5e1153816c7c9aa7f274a Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Thu, 17 Jul 2025 10:15:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=8E=B7=E5=AE=A2?= =?UTF-8?q?=E5=B7=B2=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E5=8F=8A=E8=8E=B7?= =?UTF-8?q?=E5=AE=A2=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/plan/PlanSceneV1Controller.php | 73 ++++++++++++++++++- .../PostCreateAddFriendPlanV1Controller.php | 2 +- .../plan/PostExternalApiV1Controller.php | 2 +- .../PostUpdateAddFriendPlanV1Controller.php | 2 +- .../plan/PosterWeChatMiniProgram.php | 2 +- 5 files changed, 75 insertions(+), 6 deletions(-) diff --git a/Server/application/cunkebao/controller/plan/PlanSceneV1Controller.php b/Server/application/cunkebao/controller/plan/PlanSceneV1Controller.php index d9bc41c3..dca65350 100644 --- a/Server/application/cunkebao/controller/plan/PlanSceneV1Controller.php +++ b/Server/application/cunkebao/controller/plan/PlanSceneV1Controller.php @@ -23,6 +23,7 @@ class PlanSceneV1Controller extends BaseController $params = $this->request->param(); $page = isset($params['page']) ? intval($params['page']) : 1; $limit = isset($params['limit']) ? intval($params['limit']) : 10; + $keyword = isset($params['keyword']) ? trim($params['keyword']) : ''; $sceneId = $this->request->param('sceneId',''); $where = [ 'deleteTime' => 0, @@ -37,6 +38,10 @@ class PlanSceneV1Controller extends BaseController $where['sceneId'] = $sceneId; } + if(!empty($keyword)){ + $where[] = ['name', 'like', '%' . $keyword . '%']; + } + $total = Db::name('customer_acquisition_task')->where($where)->count(); $list = Db::name('customer_acquisition_task') @@ -62,7 +67,7 @@ class PlanSceneV1Controller extends BaseController $val['passRate'] = number_format($passRate,2); } - $lastTime = Db::name('task_customer')->where(['task_id'=>$val['id']])->max('updated_at'); + $lastTime = Db::name('task_customer')->where(['task_id'=>$val['id']])->max('updateTime'); $val['lastUpdated'] = !empty($lastTime) ? date('Y-m-d H:i', $lastTime) : '--'; @@ -379,7 +384,13 @@ class PlanSceneV1Controller extends BaseController } - + /** + * 获取微信小程序码 + * @return \think\response\Json + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + */ public function getWxMinAppCode() { $params = $this->request->param(); @@ -399,4 +410,62 @@ class PlanSceneV1Controller extends BaseController return ResponseHelper::success($result, '获取小程序码成功'); } + + /** + * 获取已获客/已添加用户 + * @return \think\response\Json + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + */ + public function getUserList(){ + $type = $this->request->param('type',1); + $planId = $this->request->param('planId',''); + $page = $this->request->param('page',1); + $pageSize = $this->request->param('pageSize',10); + $keyword = $this->request->param('keyword',''); + + if (!in_array($type, [1, 2])) { + return ResponseHelper::error('类型错误'); + } + + if (empty($planId)){ + return ResponseHelper::error('获客场景id不能为空'); + } + + $task = Db::name('customer_acquisition_task')->where(['id' => $planId, 'deleteTime' => 0])->find(); + if(empty($task)) { + return ResponseHelper::error('活动不存在'); + } + $query = Db::name('task_customer')->where(['task_id' => $task['id']]); + + if ($type == 2){ + $query = $query->where('status',4); + } + + if (!empty($keyword)) { + $query = $query->where('name|phone|tags|siteTags', 'like', '%' . $keyword . '%'); + } + + $total = $query->count(); + $list = $query->page($page, $pageSize)->order('id', 'desc')->select(); + + foreach ($list as &$item) { + $item['tags'] = json_decode($item['tags'], true); + $item['siteTags'] = json_decode($item['siteTags'], true); + $item['createTime'] = date('Y-m-d H:i:s', $item['createTime']); + $item['updateTime'] = date('Y-m-d H:i:s', $item['updateTime']); + } + + + + $data = [ + 'total' => $total, + 'list' => $list, + ]; + return ResponseHelper::success($data,'获取成功'); + } + + + } \ No newline at end of file diff --git a/Server/application/cunkebao/controller/plan/PostCreateAddFriendPlanV1Controller.php b/Server/application/cunkebao/controller/plan/PostCreateAddFriendPlanV1Controller.php index 011d3fae..a2f9d3db 100644 --- a/Server/application/cunkebao/controller/plan/PostCreateAddFriendPlanV1Controller.php +++ b/Server/application/cunkebao/controller/plan/PostCreateAddFriendPlanV1Controller.php @@ -249,7 +249,7 @@ class PostCreateAddFriendPlanV1Controller extends Controller 'phone' => $phone, 'tags' => json_encode([], JSON_UNESCAPED_UNICODE), 'siteTags' => json_encode([], JSON_UNESCAPED_UNICODE), - 'created_at' => time(), + 'createTime' => time(), ]; } } diff --git a/Server/application/cunkebao/controller/plan/PostExternalApiV1Controller.php b/Server/application/cunkebao/controller/plan/PostExternalApiV1Controller.php index 44e7a337..1d4c6a5a 100644 --- a/Server/application/cunkebao/controller/plan/PostExternalApiV1Controller.php +++ b/Server/application/cunkebao/controller/plan/PostExternalApiV1Controller.php @@ -231,7 +231,7 @@ class PostExternalApiV1Controller extends Controller // 更新数据库中的站点标签 Db::name('task_customer')->where('id', $taskCustomerId)->update([ 'siteTags' => json_encode($uniqueSiteTags, JSON_UNESCAPED_UNICODE), - 'updated_at' => time() + 'updateTime' => time() ]); } catch (\Exception $e) { diff --git a/Server/application/cunkebao/controller/plan/PostUpdateAddFriendPlanV1Controller.php b/Server/application/cunkebao/controller/plan/PostUpdateAddFriendPlanV1Controller.php index b47c4faa..9d5e3b62 100644 --- a/Server/application/cunkebao/controller/plan/PostUpdateAddFriendPlanV1Controller.php +++ b/Server/application/cunkebao/controller/plan/PostUpdateAddFriendPlanV1Controller.php @@ -220,7 +220,7 @@ class PostUpdateAddFriendPlanV1Controller extends Controller 'phone' => $phone, 'tags' => json_encode([], JSON_UNESCAPED_UNICODE), 'siteTags' => json_encode([], JSON_UNESCAPED_UNICODE), - 'created_at' => time(), + 'createTime' => time(), ]; } } diff --git a/Server/application/cunkebao/controller/plan/PosterWeChatMiniProgram.php b/Server/application/cunkebao/controller/plan/PosterWeChatMiniProgram.php index 075a5217..4ce512f7 100644 --- a/Server/application/cunkebao/controller/plan/PosterWeChatMiniProgram.php +++ b/Server/application/cunkebao/controller/plan/PosterWeChatMiniProgram.php @@ -35,7 +35,7 @@ class PosterWeChatMiniProgram extends Controller // 调用接口生成小程序码 $response = $app->app_code->getUnlimit($scene, [ - 'page' => 'pages/poster/index', // 必须是已经发布的小程序页面 + 'page' => 'pages/poster/index2', // 必须是已经发布的小程序页面 'width' => 430, // 二维码的宽度,默认430 // 'auto_color' => false, // 自动配置线条颜色 // 'line_color' => ['r' => 0, 'g' => 0, 'b' => 0], // 颜色设置