Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
From-wh 2023-05-11 14:43:46 +08:00
commit befd3bccd8
9 changed files with 21 additions and 20 deletions

View File

@ -254,8 +254,7 @@ class StoreOrder extends AuthController
['fictitious_content', '']//虚拟发货内容
]);
$services->delivery((int)$id, $data);
return app('json')->success(100010);
return app('json')->success(100010, $services->delivery((int)$id, $data));
}
/**

View File

@ -88,9 +88,7 @@ class StoreOrder extends AuthController
]);
$data['express_record_type'] = 1;
$data['type'] = 1;
$this->services->delivery($order_id, $data);
return app('json')->success(100010);
return app('json')->success(100010, $this->services->delivery($order_id, $data));
}
/**

View File

@ -303,12 +303,12 @@ class OutStoreOrderServices extends BaseServices
* 发货
* @param string $orderId 订单号
* @param array $data
* @return bool
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function delivery(string $orderId, array $data): bool
public function delivery(string $orderId, array $data)
{
$orderInfo = $this->dao->get(['order_id' => $orderId]);
if (!$orderInfo) {

View File

@ -45,7 +45,7 @@ class StoreOrderDeliveryServices extends BaseServices
* 订单发货
* @param int $id
* @param array $data
* @return bool
* @return array
*/
public function delivery(int $id, array $data)
{
@ -80,8 +80,7 @@ class StoreOrderDeliveryServices extends BaseServices
if ($storeOrderRefundServices->count(['store_order_id' => $id, 'refund_type' => [1, 2, 4, 5], 'is_cancel' => 0, 'is_del' => 0])) {
throw new AdminException(400475);
}
$this->doDelivery($id, $orderInfo, $data);
return true;
return $this->doDelivery($id, $orderInfo, $data);
}
/**
@ -431,7 +430,7 @@ class StoreOrderDeliveryServices extends BaseServices
* @param int $id
* @param $orderInfo
* @param array $data
* @return bool
* @return array
*/
public function doDelivery(int $id, $orderInfo, array $data)
{
@ -441,9 +440,10 @@ class StoreOrderDeliveryServices extends BaseServices
/** @var StoreOrderCartInfoServices $orderInfoServices */
$orderInfoServices = app()->make(StoreOrderCartInfoServices::class);
$storeName = $orderInfoServices->getCarIdByProductTitle((int)$orderInfo->id);
$res = [];
switch ($type) {
case 1://快递发货
$this->orderDeliverGoods($id, $data, $orderInfo, $storeName);
$res = $this->orderDeliverGoods($id, $data, $orderInfo, $storeName);
event('NoticeListener', [['orderInfo' => $orderInfo, 'storeName' => $storeName, 'data' => $data], 'order_postage_success']);
break;
case 2://配送
@ -458,7 +458,7 @@ class StoreOrderDeliveryServices extends BaseServices
}
//到期自动收货
event('OrderDeliveryListener', [$orderInfo, $storeName, $data, $type]);
return true;
return $res;
}
/**
@ -519,6 +519,9 @@ class StoreOrderDeliveryServices extends BaseServices
'cargo' => $expData['cargo'],
]);
$data['delivery_id'] = $dump['kuaidinum'];
if (!empty($dump['label'])) {
$data['kuaidi_label'] = $dump['label'];
}
} else {
if (!$data['delivery_id']) {
throw new AdminException(400531);
@ -543,7 +546,7 @@ class StoreOrderDeliveryServices extends BaseServices
throw new AdminException(400529);
}
});
return true;
return $dump;
}
/**

View File

@ -560,6 +560,7 @@ class SystemCrudServices extends BaseServices
'menu_path' => '/' . $routeName,
'auth_type' => 1,
'is_show' => 1,
'is_show_path' => 1,
'is_del' => 0,
'unique_auth' => $uniqueAuth,
'is_header' => $data['pid'] ? 0 : 1,

View File

@ -145,7 +145,8 @@ class SystemAdminServices extends BaseServices
'version' => get_crmeb_version(),
'newOrderAudioLink' => get_file_link(sys_config('new_order_audio_link', '')),
'queue' => $queue ?? true,
'timer' => $timer ?? true
'timer' => $timer ?? true,
'site_name' => sys_config('site_name'),
];
}

View File

@ -54,7 +54,7 @@ class AccessTokenServeService extends HttpService
/**
* @var string
*/
protected $sandBoxApi = 'https://api_v2.crmeb.net/';
protected $sandBoxApi = 'https://api_v2.crmeb.net/api/';
/**
* @var bool

View File

@ -147,9 +147,9 @@ class Express extends BaseExpress
throw new AdminException(400712);
}
$param['siid'] = sys_config('config_export_siid');
if (!$param['siid']) {
throw new AdminException(400716);
}
// if (!$param['siid']) {
// throw new AdminException(400716);
// }
$param['count'] = $data['count'] ?? '';
$param['cargo'] = $data['cargo'] ?? '';
if (!$param['count']) {

View File

@ -47271,7 +47271,6 @@ INSERT INTO `eb_system_menus` (`id`, `pid`, `icon`, `menu_name`, `module`, `cont
(1069, 1067, '', '语言详情', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/setting/lang/info', '12/1067', 1, '', 0, 'admin-lang-info', 0),
(1070, 1067, '', '地区列表', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/setting/lang/country', '25/1067', 1, '', 0, 'admin-lang-country', 0),
(1071, 1695, '', '文件管理', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/system/maintain/system_file/opendir', '25/1695', 1, '', 0, 'system-maintain-system-file', 0),
(1072, 1064, '', '接口文档', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/setting/system_out_interface/index', '56/1064', 1, '', 0, 'setting-system-out-interface-index', 0),
(1073, 25, '', '数据维护', 'admin', '', '', '', '', '[]', 7, 1, 1, 1, 'system/database/index', '25', 1, '', 0, 'system-database-index', 0),
(1075, 731, '', '会员配置', 'admin', '', '', '', '', '[]', 6, 1, 1, 1, '/marketing/member/system_config/3/67', '27/731', 1, '', 0, 'marketing-member-system_config', 0),
(1076, 56, '', '定时任务', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/system/crontab', '25/56', 1, '', 0, 'system-crontab-index', 0),