Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
286acfaede
@ -11,6 +11,7 @@ use app\common\lists\ListsSearchInterface;
|
|||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
use app\common\model\system_store\SystemStoreStaff;
|
use app\common\model\system_store\SystemStoreStaff;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
|
use app\common\model\user_sign\UserSign;
|
||||||
use think\db\Query;
|
use think\db\Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +82,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
})->toArray();
|
})->toArray();
|
||||||
|
|
||||||
foreach ($data as $key => $item) {
|
foreach ($data as $key => $item) {
|
||||||
$data[$key]['list'] = StoreFinanceFlow::where('order_id' ,$item['order_id'])->where('financial_type','>', 1)->field($field)->order('financial_pm','desc')->select()->each(function ($item) {
|
$list1= StoreFinanceFlow::where('order_id' ,$item['order_id'])->where('financial_type','>', 1)->field($field)->order('financial_pm','desc')->select()->each(function ($item) {
|
||||||
if ($item['user_id'] <= 0) {
|
if ($item['user_id'] <= 0) {
|
||||||
$item['nickname'] = '游客';
|
$item['nickname'] = '游客';
|
||||||
} else {
|
} else {
|
||||||
@ -102,6 +103,19 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item['store_name'] = $item['store_id'] > 0 ? SystemStore::where('id', $item['store_id'])->value('name') : '';
|
$item['store_name'] = $item['store_id'] > 0 ? SystemStore::where('id', $item['store_id'])->value('name') : '';
|
||||||
$item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
|
$item['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
|
||||||
});
|
});
|
||||||
|
$list2=UserSign::where('order_id',$item['order_sn'])->whereIn('user_ship',[2,3])->select();
|
||||||
|
foreach($list2 as $k=>$v){
|
||||||
|
$list2[$k]['id']='jf'.$v['id'];
|
||||||
|
$list2[$k]['order_sn']=$item['order_sn'];
|
||||||
|
$list2[$k]['store_name']=$item['store_name'];
|
||||||
|
$list2[$k]['financial_pm']=0;
|
||||||
|
$list2[$k]['nickname']=$v['uid']>0?User::where('id', $v['uid'])->value('nickname') . '|'.$v['uid']:'游客';
|
||||||
|
$list2[$k]['number']='+'.$v['number'];
|
||||||
|
$list2[$k]['financial_type_name']=$v['title'];
|
||||||
|
$list2[$k]['pay_type_name'] = PayEnum::getPaySceneDesc($item['pay_type']);
|
||||||
|
|
||||||
|
}
|
||||||
|
$data[$key]['list']=array_merge($list1->toArray(),$list2->toArray());
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@ -453,6 +453,8 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'title' => '村长订单获得兑换券',
|
'title' => '村长订单获得兑换券',
|
||||||
'store_id' => $order['store_id'],
|
'store_id' => $order['store_id'],
|
||||||
'number' => $fees,
|
'number' => $fees,
|
||||||
|
'financial_pm' => 1,
|
||||||
|
'user_ship' => 2,
|
||||||
];
|
];
|
||||||
$sing[] = [
|
$sing[] = [
|
||||||
'uid' => $brigade_uid,
|
'uid' => $brigade_uid,
|
||||||
@ -460,6 +462,26 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'title' => '队长订单获得兑换券',
|
'title' => '队长订单获得兑换券',
|
||||||
'store_id' => $order['store_id'],
|
'store_id' => $order['store_id'],
|
||||||
'number' => $fees,
|
'number' => $fees,
|
||||||
|
'financial_pm' => 1,
|
||||||
|
'user_ship' => 3,
|
||||||
|
];
|
||||||
|
$sing[] = [
|
||||||
|
'uid' => $village_uid,
|
||||||
|
'order_id' => $order['order_id'],
|
||||||
|
'title' => '订单扣除兑换券',
|
||||||
|
'store_id' => $order['store_id'],
|
||||||
|
'number' => $fees,
|
||||||
|
'financial_pm' => 0,
|
||||||
|
'user_ship' => 2,
|
||||||
|
];
|
||||||
|
$sing[] = [
|
||||||
|
'uid' => $brigade_uid,
|
||||||
|
'order_id' => $order['order_id'],
|
||||||
|
'title' => '订单扣除兑换券',
|
||||||
|
'store_id' => $order['store_id'],
|
||||||
|
'number' => $fees,
|
||||||
|
'financial_pm' => 0,
|
||||||
|
'user_ship' => 3,
|
||||||
];
|
];
|
||||||
// if ($village_uid > 0) {
|
// if ($village_uid > 0) {
|
||||||
// $financeLogic->other_arr['vip_uid'] = $village_uid;
|
// $financeLogic->other_arr['vip_uid'] = $village_uid;
|
||||||
|
@ -8,7 +8,7 @@ use think\model\concern\SoftDelete;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计量单位
|
* 积分记录
|
||||||
* Class UserSign
|
* Class UserSign
|
||||||
* @package app\common\model\user_sign
|
* @package app\common\model\user_sign
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user