订单优化

This commit is contained in:
devil 2020-09-23 18:26:16 +08:00
parent 5252d73141
commit 96f600402a
2 changed files with 5 additions and 19 deletions

View File

@ -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)
{

View File

@ -604,7 +604,7 @@ class OrderService
}
if($pay_log_data['status'] == 1)
{
return DataReturn('日志订单已支付、无需再次处理', 0);
return DataReturn('日志订单已支付、无需重复处理', 0);
}
// 获取关联信息