diff --git a/app/service/EvaluationService.php b/app/service/EvaluationService.php index 0b99b99..c79953d 100644 --- a/app/service/EvaluationService.php +++ b/app/service/EvaluationService.php @@ -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)); diff --git a/app/util/ErrorCode.php b/app/util/ErrorCode.php new file mode 100644 index 0000000..e330487 --- /dev/null +++ b/app/util/ErrorCode.php @@ -0,0 +1,54 @@ + + * 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; + +} diff --git a/app/util/ErrorResponse.php b/app/util/ErrorResponse.php index da63d81..2607f8f 100644 --- a/app/util/ErrorResponse.php +++ b/app/util/ErrorResponse.php @@ -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 {