移除私域操盘手模块定义的历史模型
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
namespace app\cunkebao\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
/**
|
||||
* 流量池控制器
|
||||
*/
|
||||
class TrafficPool extends Controller
|
||||
{
|
||||
/**
|
||||
* 导入订单标签
|
||||
*
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function importOrders()
|
||||
{
|
||||
try {
|
||||
// 获取请求数据
|
||||
$data = Request::post();
|
||||
|
||||
// 验证必要字段
|
||||
if (empty($data['mobile']) || empty($data['from']) || empty($data['sceneId'])) {
|
||||
return json([
|
||||
'code' => 400,
|
||||
'msg' => '缺少必要参数'
|
||||
]);
|
||||
}
|
||||
|
||||
// 批量处理数据
|
||||
$successCount = 0;
|
||||
$failCount = 0;
|
||||
|
||||
foreach ($data['mobile'] as $index => $mobile) {
|
||||
// 导入到流量池
|
||||
$poolData[] = [
|
||||
'mobile' => $mobile,
|
||||
'from' => $data['from'][$index] ?? '',
|
||||
'createTime' => time()
|
||||
];
|
||||
|
||||
// 导入到流量来源
|
||||
$sourceData[] = [
|
||||
'mobile' => $mobile,
|
||||
'sceneId' => $data['sceneId'],
|
||||
'createTime' => time()
|
||||
];
|
||||
}
|
||||
|
||||
return json([
|
||||
'code' => 200,
|
||||
'msg' => '导入完成',
|
||||
'data' => [
|
||||
'success' => $successCount,
|
||||
'fail' => $failCount
|
||||
]
|
||||
]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return json([
|
||||
'code' => 500,
|
||||
'msg' => '导入失败:' . $e->getMessage()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace app\cunkebao\controller\traffic;
|
||||
|
||||
use think\Controller;
|
||||
use think\facade\Request;
|
||||
|
||||
/**
|
||||
* 流量池控制器
|
||||
*/
|
||||
class TrafficPool extends Controller
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace app\cunkebao\controller\wechat;
|
||||
|
||||
use app\common\model\TrafficPool as TrafficPoolModel;
|
||||
use app\common\model\WechatAccount as WechatAccountModel;
|
||||
use app\cunkebao\controller\BaseController;
|
||||
use app\cunkebao\model\WechatAccount as WechatAccountModel;
|
||||
use library\ResponseHelper;
|
||||
|
||||
/**
|
||||
@@ -37,12 +37,12 @@ class GetWechatOnDeviceFriendProfileV1Controller extends BaseController
|
||||
/**
|
||||
* 获取添加时间
|
||||
*
|
||||
* @param int $timestamp
|
||||
* @param int|string $timestamp
|
||||
* @return string
|
||||
*/
|
||||
protected function getAddShipDate(int $timestamp): string
|
||||
protected function getAddShipDate($timestamp): string
|
||||
{
|
||||
return date('Y-m-d', $timestamp);
|
||||
return is_numeric($timestamp) ? date('Y-m-d', $timestamp) : date('Y-m-d', strtotime($timestamp));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user