master #2

Merged
15515342911 merged 2 commits from master into main 2025-04-03 15:55:09 +08:00
25 changed files with 295 additions and 6 deletions
Showing only changes of commit 854e86b445 - Show all commits

View File

@ -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'];

View File

@ -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);
}
}
/**
* 首页

View File

@ -14,6 +14,18 @@ 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);
}
}
/**
* 首页
*

View File

@ -7,6 +7,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use think\Db;
/**
* 评价
*/
@ -15,6 +16,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')
->field('id,title,start_time')

View File

@ -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);
}
}
/**
* 首页

View File

@ -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');

View File

@ -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);
}
}
/**
* 首页
*

View File

@ -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);
}
}
/**
* 列表

View File

@ -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()

View File

@ -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)
{

View File

@ -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);
}
}
/**
* 首页
*

View File

@ -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()
{

View File

@ -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);
}
}
/**
* 首页

View File

@ -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);
}
}
/**
* 首页

View File

@ -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()
{

View File

@ -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);
}
}
/**
* 首页

View File

@ -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);
}
}
/**
* 首页

View File

@ -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);
}
}
/**
* 用户列表

View File

@ -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');

View File

@ -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);
}
}
/**
*

View File

@ -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

View File

@ -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);
}
}
/**
* 首页
*

View File

@ -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');

View File

@ -14,6 +14,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);
}
}
/**
* 首页
*

View File

@ -14,6 +14,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()
{
$id = $this->request->header('Token');