获取未读数量的已完成返补订单
This commit is contained in:
parent
7ff1cc41f1
commit
e7a5a92346
@ -8,18 +8,18 @@ use app\api\logic\BillionsLogic;
|
||||
use app\common\server\JsonServer;
|
||||
use app\common\server\WeChatServer;
|
||||
use EasyWeChat\Factory;
|
||||
use app\common\enum\WithdrawEnum;
|
||||
use app\common\model\WithdrawApply;
|
||||
use think\facade\Db;
|
||||
|
||||
class Billions extends Api
|
||||
{
|
||||
|
||||
public static function getApp($client)
|
||||
{
|
||||
$config = WeChatServer::getPayConfigBySource($client)['config'];
|
||||
$app = Factory::payment($config);
|
||||
return $app;
|
||||
}
|
||||
|
||||
public function lists()
|
||||
{
|
||||
$page = $this->request->get('page_no', $this->page_no);
|
||||
|
||||
@ -51,7 +51,9 @@ class BillionsLogic extends Logic
|
||||
->page($page,$size)->select();
|
||||
}
|
||||
|
||||
$ids = [];
|
||||
foreach ($list as &$v) {
|
||||
$ids[] = $v['billions_id'];
|
||||
if ($v['type'] == 1) {
|
||||
$v->order_sn = Order::where('id', $v->order_id)->value('order_sn');
|
||||
$v->name = Shop::where('id',$v->shop_id)->value('name');
|
||||
@ -62,6 +64,9 @@ class BillionsLogic extends Logic
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Billions::whereIn('billions_id', $ids)->where(['user_id' => $user_id])->update(['is_read' => 1]);
|
||||
|
||||
$count = Billions::alias('b')->where($where)->count();
|
||||
|
||||
// 商家最高补贴
|
||||
@ -97,7 +102,8 @@ class BillionsLogic extends Logic
|
||||
'highSubsidy' => $highSubsidy,
|
||||
'getSubsidy' => $getSubsidy,
|
||||
'queuesNumber' => $queuesNumber,
|
||||
'queuesMoney' => $queuesMoney
|
||||
'queuesMoney' => $queuesMoney,
|
||||
'unread_billions' => $state == 1 ? self::getUnreadCount($user_id) : 0
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user