mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 11:59:16 +08:00
订单优化
This commit is contained in:
parent
5252d73141
commit
96f600402a
@ -59,28 +59,14 @@ class OrderCurrencyService
|
||||
* @version 1.0.0
|
||||
* @date 2020-09-17
|
||||
* @desc description
|
||||
* @param [array|int] $order_value [订单id或者编号]
|
||||
* @param [string] $order_key [订单主键字段名称(order_id|order_no)(默认order_id)]
|
||||
* @param [array|int] $order_ids [订单id]
|
||||
* @return [array] [货币数据、参数是多个id则返回二维数组,一个id则返回一维数组]
|
||||
*/
|
||||
public static function OrderCurrencyGroupList($order_value, $order_key = 'order_id')
|
||||
public static function OrderCurrencyGroupList($order_ids)
|
||||
{
|
||||
// 是否订单编号
|
||||
if($order_key == 'order_no')
|
||||
{
|
||||
// 数组读取多个id,则读取单个订单id
|
||||
if(is_array($order_value))
|
||||
{
|
||||
$order_value = Db::name('OrderCurrency')->where(['order_no'=>$order_value])->column('id');
|
||||
} else {
|
||||
$order_value = Db::name('OrderCurrency')->where(['order_no'=>$order_value])->value('id');
|
||||
}
|
||||
}
|
||||
|
||||
// 数据处理
|
||||
$data = Db::name('OrderCurrency')->where(['order_id'=>$order_value])->select();
|
||||
$data = Db::name('OrderCurrency')->where(['order_id'=>$order_ids])->select();
|
||||
$result = [];
|
||||
if(!empty($data) && is_array($order_value) && count($order_value) > 1)
|
||||
if(!empty($data) && is_array($order_ids))
|
||||
{
|
||||
foreach($data as $v)
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ class OrderService
|
||||
}
|
||||
if($pay_log_data['status'] == 1)
|
||||
{
|
||||
return DataReturn('日志订单已支付、无需再次处理', 0);
|
||||
return DataReturn('日志订单已支付、无需重复处理', 0);
|
||||
}
|
||||
|
||||
// 获取关联信息
|
||||
|
Loading…
Reference in New Issue
Block a user