This commit is contained in:
mzl
2025-09-01 14:00:44 +08:00
parent 8fdfd02c81
commit 29f573a467
3 changed files with 33 additions and 57 deletions
+24 -43
View File
@@ -78,25 +78,25 @@ class IndexController
$options = [
'controller' => [
'module' => 'common',
'name' => 'veh_dict_i18n'
'name' => 'stock_orders'
],
'model' => [
'module' => 'common',
'name' => 'veh_dict_i18n'
'name' => 'stock_orders'
],
'service' => [
'module' => 'common',
'name' => 'veh_dict_i18n'
'name' => 'stock_orders'
],
'logic' => [
'module' => 'common',
'name' => 'veh_dict_i18n'
'name' => 'stock_orders'
],
'validate' => [
'module' => 'common',
'name' => 'veh_dict_i18n'
'name' => 'stock_orders'
],
'table' => 'veh_dict_i18n'
'table' => 'stock_orders'
];
$result = (new Generate($options))->doGenerate();
@@ -106,43 +106,24 @@ class IndexController
public function test()
{
$params = [
'email' => '',
'phone' => '11',
'whatsApp' => ''
];
$corpId = 1;
$customer = \app\crm\model\Customer::where('corp_id', $corpId)
->where((function (\Illuminate\Database\Eloquent\Builder $query) use ($params) {
if(!empty($params['email']))
$query->Orwhere('email', '=', $params['email']);
if(!empty($params['phone']))
$query->Orwhere('phone', '=', $params['phone']);
if(!empty($params['whatsApp']))
$query->Orwhere('whatsApp', '=', $params['whatsApp']);
return $query;
}))
->first();
// $data = [
// 'sender_id' => 0,
// 'sender_type' => 'system',
// 'title' => '测试消息 - 标题',
// 'content' => '测试消息 - 内容',
// 'scene' => 1,
// 'recipient' => [1],
// ];
// $data['recipient'] = [1, 74];
// // // 同步推送
// // (new MessageNotificationsService())->pushNotice($data);
// // 异步推送
// \Webman\RedisQueue\Redis::send('notice', $data);
$info = InquiryLog::with(['channelInfo', 'countryInfo', 'enter'])->where('id', 1)->where('sync_crm', 0)->first();
var_dump(empty($info->recipient));
if ($info) {
var_dump(11);
} else {
var_dump(22);
}
if ($info !== NULL) {
var_dump(33);
} else {
var_dump(44);
}
return json(['code' => 0, 'msg' => 'success']);
return json($customer);
}
}