This commit is contained in:
2026-06-11 14:26:41 +08:00
parent 08249451a7
commit e5959fd89a
7 changed files with 121 additions and 46 deletions
@@ -207,11 +207,17 @@ class OrderController extends BaseAdminController
$params['creator_id'] = $this->adminId;
$params['payment_channel'] = (string)$this->request->post('payment_channel', 'normal');
$params['require_payment_slip_audit'] = (int)$this->request->post('require_payment_slip_audit', 0);
// 创建方式:优先取前端透传的 create_type,否则按 payment_channel 派生(fubei→fubei,其余 normal
// 创建方式:优先取前端透传的 create_type,否则按 payment_channel 派生(fubei→fubeiexpress_cod→express_cod其余 normal
$createTypeReq = (string)$this->request->post('create_type', '');
$params['create_type'] = in_array($createTypeReq, ['normal', 'wechat_work', 'fubei'], true)
? $createTypeReq
: ($params['payment_channel'] === 'fubei' ? 'fubei' : 'normal');
if (in_array($createTypeReq, ['normal', 'wechat_work', 'fubei', 'express_cod'], true)) {
$params['create_type'] = $createTypeReq;
} elseif ($params['payment_channel'] === 'fubei') {
$params['create_type'] = 'fubei';
} elseif ($params['payment_channel'] === 'express_cod') {
$params['create_type'] = 'express_cod';
} else {
$params['create_type'] = 'normal';
}
$result = OrderLogic::create($params);
if (!$result) {