123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class Dep extends Base
- {
- public function list(){
- $lists = Db::name('dep')
- ->field('id,title')
- ->where('org_id',$this->orgId)
- ->where('enable',1)
- ->where('del',0)
- ->where('is_show',0)
- ->select();
- HelpHander::success($lists);
- }
- public function userByDep(){
- $depId = input('depId/d',0);
- $lists = Db::name('user')
- ->alias('u')
- ->field('u.id,u.account,u.real_name,u.mobile,u.head_image')
- ->join('user_dep ud','ud.user_id=u.id')
- ->where('u.del',0)
- ->where('u.del',0)
- ->where('ud.dep_id',$depId)
- ->select();
- HelpHander::success($lists);
- }
- }
|