<?php
namespace app\admin\controller\rose;
use app\admin\controller\AuthController;
use app\models\user\UserCode;
use app\models\user\UserCodeInfo;
use crmeb\services\{
    UtilService as Util,
    JsonService as Json
};

class  Stock extends AuthController
{
    public function  index()
    {
        $this->assign([
            'code_list' => UserCode::alias('c')->join("user u",'c.uid=u.uid',"left")->field('c.code,u.uid,u.real_name,u.nickname')->select(),
        ]);
        return $this->fetch();
    }
    public function lst()
    {
        $where = Util::getMore([
            ['page', 1],
            ['limit', 20],
            ['excel', 0],
            ['code',''],
        ]);
        return Json::successlayui(UserCodeInfo::lst($where));
    }
}