私域操盘手 - 修改模块控制器全部继承基类以实现更加统一的操作规则

This commit is contained in:
柳清爽
2025-05-06 17:47:30 +08:00
parent e770d668d7
commit 8c4a899b43
6 changed files with 35 additions and 11 deletions

View File

@@ -35,6 +35,7 @@ Route::group('v1/', function () {
// 获客场景相关
Route::group('plan/scenes', function () {
Route::get('', 'app\cunkebao\controller\Scene@index'); // 获取场景列表
Route::post('create', 'app\cunkebao\controller\Plan@index'); // 获取场景列表
});
// 流量标签相关

View File

@@ -0,0 +1,21 @@
<?php
namespace app\cunkebao\controller;
use think\Controller;
/**
* 获客场景控制器
*/
class Plan extends Controller
{
/**
* 计划任务
*
* @return \think\response\Json
*/
public function index()
{
}
}

View File

@@ -5,14 +5,14 @@ namespace app\cunkebao\controller\device;
use app\api\controller\DeviceController as ApiDeviceController;
use app\common\model\Device as DeviceModel;
use app\common\model\User as UserModel;
use app\cunkebao\controller\BaseController;
use library\ResponseHelper;
use think\Controller;
use think\Db;
/**
* 设备控制器
*/
class GetAddResultedDevicesController extends Controller
class GetAddResultedDevicesController extends BaseController
{
/**
* 通过账号id 获取项目id。

View File

@@ -1,4 +1,5 @@
<?php
namespace app\cunkebao\controller\device;
use app\common\model\Device as DeviceModel;
@@ -70,7 +71,7 @@ class GetDeviceListV1Controller extends BaseController
protected function getDeviceList(array $where, int $page = 1, int $limit = 10): \think\Paginator
{
$query = DeviceModel::alias('d')
->field(['d.id', 'd.imei', 'd.memo', 'l.wechatId', 'd.alive','wa.nickname','wa.alias', '0 totalFriend'])
->field(['d.id', 'd.imei', 'd.memo', 'l.wechatId', 'd.alive', 'wa.nickname', 'wa.alias', '0 totalFriend'])
->leftJoin('device_wechat_login l', 'd.id = l.deviceId')
->leftJoin('wechat_account wa', 'l.wechatId = wa.wechatId')
->order('d.id desc');

View File

@@ -1,4 +1,5 @@
<?php
namespace app\cunkebao\controller\device;
use app\common\model\Device as DeviceModel;
@@ -43,7 +44,7 @@ class PostAddDeviceV1Controller extends BaseController
{
$curl = CurlHandle::getInstant();
// $curl->setMethod()
// $curl->setMethod()
}
/**

View File

@@ -1,13 +1,13 @@
<?php
namespace app\cunkebao\controller\device;
use app\common\model\Device as DeviceModel;
use app\common\model\DeviceHandleLog as DeviceHandleLogModel;
use app\common\model\DeviceTaskconf;
use app\common\model\DeviceUser as DeviceUserModel;
use app\cunkebao\controller\BaseController;
use app\common\model\Device as DeviceModel;
use app\common\model\DeviceHandleLog as DeviceHandleLogModel;
use think\Db;
use think\facade\Request;
/**
* 设备管理控制器
@@ -69,10 +69,10 @@ class UpdateDeviceTaskConfigV1Controller extends BaseController
$data = $this->request->post();
$content = null;
if (isset($data['autoAddFriend']))/**/$content = $data['autoAddFriend'] ? '开启自动添加好友' : '关闭自动添加好友';
if (isset($data['autoReply']))/* */$content = $data['autoReply'] ? '开启自动回复' : '关闭自动回复';
if (isset($data['momentsSync']))/* */$content = $data['momentsSync'] ? '开启朋友圈同步' : '关闭朋友圈同步';
if (isset($data['aiChat']))/* */$content = $data['aiChat'] ? '开启AI会话' : '关闭AI会话';
if (isset($data['autoAddFriend']))/**/ $content = $data['autoAddFriend'] ? '开启自动添加好友' : '关闭自动添加好友';
if (isset($data['autoReply']))/* */ $content = $data['autoReply'] ? '开启自动回复' : '关闭自动回复';
if (isset($data['momentsSync']))/* */ $content = $data['momentsSync'] ? '开启朋友圈同步' : '关闭朋友圈同步';
if (isset($data['aiChat']))/* */ $content = $data['aiChat'] ? '开启AI会话' : '关闭AI会话';
if (empty($content)) {
throw new \Exception('参数错误', '400');