quanwei
2 days ago 04102f7237efefa744090ed7c25f7b5d0807b679
admin/app/shop/controller/branch/Branch.php
@@ -12,7 +12,6 @@
use app\shop\model\settings\Setting as SettingModel;
use app\common\service\qrcode\BranchService;
use app\common\model\settings\Region as RegionModel;
use app\common\library\fbpay\FbPay as FbPayModel;
/**
 * 分会控制器
@@ -25,10 +24,13 @@
     */
    public function index()
    {
        (new FbPayModel(false))->notify();
        $model = new BranchModel;
        $postData = $this->postData();
        $list = $model->getList($postData);
        foreach ($list as $key => $value) {
            $list[$key]['member_num'] = $list[$key]['member_num']+(new \app\shop\model\branch\ActivityUser())
                    ->group('user_id')->where(['branch_id'=>$value['branch_id']])->count();
        }
        return $this->renderSuccess('', compact('list'));
    }