修改用户订单列表查询,添加订单资金流水
This commit is contained in:
parent
40cc91a7ac
commit
3356f40744
app
common
dao
repositories/system/merchant
controller/admin/order
@ -76,7 +76,7 @@ class StoreOrderDao extends BaseDao
|
|||||||
});
|
});
|
||||||
if (isset($where['source']) && ($where['source'] == 103||$where['source'] == 105)) {
|
if (isset($where['source']) && ($where['source'] == 103||$where['source'] == 105)) {
|
||||||
$wheres['activity_type'] = [0, 2, 98];
|
$wheres['activity_type'] = [0, 2, 98];
|
||||||
$wheres['source'] = [0,2,103,105];
|
$wheres['source'] = [0,2,103,105,999];
|
||||||
$query->where($wheres);
|
$query->where($wheres);
|
||||||
unset($where['source']);
|
unset($where['source']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -82,6 +82,9 @@ class FinancialRecordDao extends BaseDao
|
|||||||
->when(isset($where['date']) && $where['date'] !== '', function ($query) use ($where) {
|
->when(isset($where['date']) && $where['date'] !== '', function ($query) use ($where) {
|
||||||
getModelTime($query, $where['date'], 'create_time');
|
getModelTime($query, $where['date'], 'create_time');
|
||||||
})
|
})
|
||||||
|
->when(isset($where['order_id']) && $where['order_id'] !== '', function ($query) use ($where) {
|
||||||
|
$query->where('order_id', $where['order_id']);
|
||||||
|
})
|
||||||
->when(isset($where['is_mer']) && $where['is_mer'] !== '', function ($query) use ($where) {
|
->when(isset($where['is_mer']) && $where['is_mer'] !== '', function ($query) use ($where) {
|
||||||
if($where['is_mer']){
|
if($where['is_mer']){
|
||||||
$query->where('mer_id',$where['is_mer'])->where('type','in',[0,1, 2]);
|
$query->where('mer_id',$where['is_mer'])->where('type','in',[0,1, 2]);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
namespace app\common\repositories\system\merchant;
|
namespace app\common\repositories\system\merchant;
|
||||||
|
|
||||||
use app\common\model\system\merchant\Merchant;
|
use app\common\model\system\merchant\Merchant;
|
||||||
|
use app\common\model\system\merchant\MerchantCategory;
|
||||||
use app\common\model\system\merchant\MerchantIntention;
|
use app\common\model\system\merchant\MerchantIntention;
|
||||||
use app\common\repositories\BaseRepository;
|
use app\common\repositories\BaseRepository;
|
||||||
use crmeb\jobs\SendSmsJob;
|
use crmeb\jobs\SendSmsJob;
|
||||||
@ -117,6 +118,7 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
$config = systemConfig(['broadcast_room_type', 'broadcast_goods_type']);
|
$config = systemConfig(['broadcast_room_type', 'broadcast_goods_type']);
|
||||||
|
|
||||||
$margin = app()->make(MerchantTypeRepository::class)->get($intention['mer_type_id']);
|
$margin = app()->make(MerchantTypeRepository::class)->get($intention['mer_type_id']);
|
||||||
|
$commissionRate = MerchantCategory::where('merchant_category_id', $intention['merchant_category_id'])->value('commission_rate');
|
||||||
$data['is_margin'] = $margin['is_margin'] ?? -1;
|
$data['is_margin'] = $margin['is_margin'] ?? -1;
|
||||||
$data['margin'] = $margin['margin'] ?? 0;
|
$data['margin'] = $margin['margin'] ?? 0;
|
||||||
$merData = [];
|
$merData = [];
|
||||||
@ -148,6 +150,7 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
'is_company'=>$intention['is_company'],
|
'is_company'=>$intention['is_company'],
|
||||||
'business_status'=>2,
|
'business_status'=>2,
|
||||||
'mer_settlement_agree_status'=>1,
|
'mer_settlement_agree_status'=>1,
|
||||||
|
'commission_rate'=>$commissionRate,
|
||||||
];
|
];
|
||||||
if($margin['type_code']=='PersonalStore'){
|
if($margin['type_code']=='PersonalStore'){
|
||||||
$merData['mer_address']='集体地址';
|
$merData['mer_address']='集体地址';
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
namespace app\controller\admin\order;
|
namespace app\controller\admin\order;
|
||||||
|
|
||||||
|
use app\common\repositories\system\merchant\FinancialRecordRepository;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use app\common\repositories\store\ExcelRepository;
|
use app\common\repositories\store\ExcelRepository;
|
||||||
use app\common\repositories\system\merchant\MerchantRepository;
|
use app\common\repositories\system\merchant\MerchantRepository;
|
||||||
@ -201,4 +202,18 @@ class Order extends BaseController
|
|||||||
$data = $this->repository->childrenList($id, 0);
|
$data = $this->repository->childrenList($id, 0);
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单资金流水
|
||||||
|
* @param $id
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function financeRecord($id)
|
||||||
|
{
|
||||||
|
/** @var FinancialRecordRepository $repo */
|
||||||
|
$repo = app()->make(FinancialRecordRepository::class);
|
||||||
|
$data = $repo->getList(['order_id' => $id], 1, 9999);
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user