1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\inter\controller;
- use think\Controller;
- use think\Db;
- use app\common\library\UUIDs;
- use think\Session;
- use app\common\library\ResultTools;
- use think\Log;
- use think\Cache;
- class Operating extends Base
- {
- public function index(){
- }
- public function doctor(){
- try{
- $sessionid = $_REQUEST['sessionid'];
- log::record('-------运营------------');
- log::record($sessionid);
- $doctor = Cache::get($sessionid);
- log::record($doctor);
- log::record('-------------------');
- $operate = DB::table('operating')->where('type',1)->where('role_id',$doctor['id'])->field('nums,month,exam_num,remote_num,danger_num')->order('month asc')->limit(6)->select();
- if($operate){
- return json_encode(['code'=>'0000','status'=>'ok','msg'=>'请求成功','info'=>$operate,'sessionid'=>$sessionid]);
- }else{
- return json_encode(['code'=>'0000','status'=>'ok','msg'=>'请求成功','info'=>$operate,'sessionid'=>$sessionid]);
- }
- }catch(\Exception $e){
- return json_encode(['status'=>'fail','code'=>'2000','msg'=>$e->getMessage()]);
- }
- }
- public function getOperating(){
- $sessionid = $_REQUEST['sessionid'];
- $doctor = Cache::get($sessionid);
- $time = $_REQUEST['searchtime'];
- if($time){
- // where('id','between',[1,8]);
- }
- }
- }
|