fixed bug

This commit is contained in:
LittleBoy 2019-06-25 08:24:48 +08:00
parent 5be3c4ff32
commit f0bba2a4c1
3 changed files with 55 additions and 44 deletions

View File

@ -78,6 +78,7 @@ class EvaluationService
{
$data = EvaluationHistory::where('uid', $uid)
->where(DataStatus::NormalCondition())
->order('id','desc')
->select()->toArray();
foreach ($data as $k => $v) {
//array_merge(['raw' => $v], self::parseEvaluationData($v));

54
app/util/ErrorCode.php Normal file
View File

@ -0,0 +1,54 @@
<?php
/**
* Created by PhpStorm.
* User: yancheng<cheng@love.xiaoyan.me>
* Date: 2019/6/23
* Time: 11:14 PM
*/
namespace app\util;
class ErrorCode
{
/**
* 参数不足
*/
const ERROR_PARAM_REQUIRED = 10001;
/**
* 参数错误
*/
const ERROR_PARAM_ERROR = 10002;
/**
* @var 缺失用户openid
*/
const ERROR_OPENID_REQUIRED = 10003;
//用户
/**
* 用户名或密码错误
*/
const ERROR_ADMIN_LOGIN_PWD = 2101;
/**
* 原始密码不正确
*/
const ERROR_ADMIN_PWD_ERROR = 21010;
/**
* 输入的密码不一致
*/
const ERROR_ADMIN_PWD_UN_EQUAL = 21012;
//用户
/**
* 用户不存在
*/
const ERROR_USER_NOT_EXISTS = 22001;
const User_Login_Fail = 22002;
const USER_SAVE_FAIL = 22003;
const USER_EXISTS = 22004;
/**
* 评估
*/
const EVALUATION_SAVE_FAIL = 23005;
const EVALUATION_NOT_EXISTS = 23006;
}

View File

@ -12,50 +12,6 @@ namespace app\util;
use think\Response;
use think\response\Json;
class ErrorCode
{
/**
* 参数不足
*/
const ERROR_PARAM_REQUIRED = 10001;
/**
* 参数错误
*/
const ERROR_PARAM_ERROR = 10002;
/**
* @var 缺失用户openid
*/
const ERROR_OPENID_REQUIRED = 10003;
//用户
/**
* 用户名或密码错误
*/
const ERROR_ADMIN_LOGIN_PWD = 2101;
/**
* 原始密码不正确
*/
const ERROR_ADMIN_PWD_ERROR = 21010;
/**
* 输入的密码不一致
*/
const ERROR_ADMIN_PWD_UN_EQUAL = 21012;
//用户
/**
* 用户不存在
*/
const ERROR_USER_NOT_EXISTS = 22001;
const User_Login_Fail = 22002;
const USER_SAVE_FAIL = 22003;
const USER_EXISTS = 22004;
/**
* 评估
*/
const EVALUATION_SAVE_FAIL = 23005;
const EVALUATION_NOT_EXISTS = 23006;
}
class ErrorResponse extends Json
{