提交 ecf13703 编写于 作者: G gongfuxiang

细节优化

上级 f50e9e2e
...@@ -33,7 +33,7 @@ class ConstService ...@@ -33,7 +33,7 @@ class ConstService
public static function Run($key = '', $default = null) public static function Run($key = '', $default = null)
{ {
// 数据定义 // 数据定义
$container = self::ConstData(); $container = self::ConstData();
// 匹配数据 // 匹配数据
// 空 key 则返回全部 // 空 key 则返回全部
......
...@@ -972,19 +972,13 @@ class OrderService ...@@ -972,19 +972,13 @@ class OrderService
// 虚拟商品自动触发发货操作 // 虚拟商品自动触发发货操作
if($order['order_model'] == 3) if($order['order_model'] == 3)
{ {
$ret = self::OrderDeliveryHandle([ self::OrderDeliveryHandle([
'id' => $order['id'], 'id' => $order['id'],
'creator' => 0, 'creator' => 0,
'creator_name' => '系统', 'creator_name' => '系统',
'user_id' => $order['user_id'], 'user_id' => $order['user_id'],
'user_type' => 'admin', 'user_type' => 'admin',
]); ]);
if($ret['code'] != 0)
{
// 事务回滚
Db::rollback();
return $ret;
}
} }
} }
......
...@@ -229,21 +229,31 @@ class PaymentService ...@@ -229,21 +229,31 @@ class PaymentService
*/ */
public static function BuyPaymentList($params = []) public static function BuyPaymentList($params = [])
{ {
$data = self::PaymentList($params); $res = self::PaymentList($params);
$result = []; $data = [];
if(!empty($data)) if(!empty($res))
{ {
foreach($data as $v) foreach($res as $v)
{ {
// 根据终端类型筛选 // 根据终端类型筛选
if(in_array(APPLICATION_CLIENT_TYPE, $v['apply_terminal'])) if(in_array(APPLICATION_CLIENT_TYPE, $v['apply_terminal']))
{ {
unset($v['config'], $v['element'], $v['apply_terminal'], $v['author'], $v['author_url'], $v['is_open_user'], $v['is_enable']); unset($v['config'], $v['element'], $v['apply_terminal'], $v['author'], $v['author_url'], $v['is_open_user'], $v['is_enable']);
$result[] = $v; $data[] = $v;
} }
} }
} }
return $result;
// 支付方式下单选择列表钩子
$hook_name = 'plugins_service_payment_buy_list';
MyEventTrigger($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'params' => $params,
'data' => &$data,
]);
return $data;
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册