master #2
@ -25,7 +25,7 @@ class AdditionAndSubtractionRecords extends Api
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在');
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
        $this->user_id = $user['id'];
 | 
			
		||||
        $this->auth_group = $user['auth_group_id'];
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class AuthGroup extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,19 @@ class AuthRule extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
     *
 | 
			
		||||
 | 
			
		||||
@ -7,6 +7,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
 | 
			
		||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; 
 | 
			
		||||
use think\Db;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 评价
 | 
			
		||||
 */
 | 
			
		||||
@ -14,6 +15,19 @@ class AutomaticPublicity extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function index (){
 | 
			
		||||
        $lr_evaluation_schedule = Db::name('evaluation_schedule')
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class BasicRating extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -12,6 +12,18 @@ class Evaluate extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function index (){
 | 
			
		||||
        $token = $this->request->header('Token');
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,18 @@ class EvaluationSchedule extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
     *
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,18 @@ class Evaluationlevel extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = '*';
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 列表
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,18 @@ use think\Db;
 | 
			
		||||
class ExcelController extends Api  
 | 
			
		||||
{  
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    public function dailyexport()  
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,18 @@ class Logrecording extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = '*';
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static function addLogrecordingData($user_id = 0, $content = null)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,18 @@ class Mail extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
     *
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,18 @@ class Monthly extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getEvaluation()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class PartyGroup extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class PartyStyle extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -15,6 +15,18 @@ class Pdf extends Api
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function exportPdf()  
 | 
			
		||||
    {  
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class PlusMinusScoring extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class Politics extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,18 @@ class PublicAnnouncement extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = '*';
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户列表
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,18 @@ class Quarter extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public function getEvaluation()
 | 
			
		||||
    {
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
 | 
			
		||||
@ -26,6 +26,18 @@ class Questionnaire extends Api
 | 
			
		||||
    protected $noNeedRight = ['test2'];
 | 
			
		||||
 | 
			
		||||
    protected $dataLimit = 'personal';
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
      /**
 | 
			
		||||
     * 
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,18 @@ class ScoringrecordDate extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Undocumented function
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,18 @@ class Solicitopinions extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
     *
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,19 @@ class User extends Api
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = '*';
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function getEvaluation()
 | 
			
		||||
    {
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,19 @@ class UserGroup extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 首页
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,19 @@ class Year extends Api
 | 
			
		||||
{
 | 
			
		||||
    protected $noNeedLogin = ['*'];
 | 
			
		||||
    protected $noNeedRight = ['*'];
 | 
			
		||||
    
 | 
			
		||||
    public function _initialize()
 | 
			
		||||
    {
 | 
			
		||||
        parent::_initialize();
 | 
			
		||||
        $id = $this->request->header('Token');
 | 
			
		||||
        if(!$id){
 | 
			
		||||
            return $this->error('缺少参数');
 | 
			
		||||
        }
 | 
			
		||||
        $user = Db::name('user')->where('token', $id)->find();
 | 
			
		||||
        if(!$user){
 | 
			
		||||
            return $this->error('用户不存在','',99998);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getEvaluation()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user