From 958c268e51b796ce981a2308b7d09092bbdea892 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Wed, 31 Jan 2024 17:28:40 +0800 Subject: [PATCH] 1 --- app/api/service/Identity.php | 1 + app/common/model/user/Identity.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/service/Identity.php b/app/api/service/Identity.php index 1b51b9ee..01398ec4 100644 --- a/app/api/service/Identity.php +++ b/app/api/service/Identity.php @@ -86,6 +86,7 @@ class Identity extends BaseService foreach ($data as $value) { if ($value['month'] == 1) { $one_data = $value; + break; } } foreach ($data as $key => $value) { diff --git a/app/common/model/user/Identity.php b/app/common/model/user/Identity.php index e41af07c..101deb0f 100644 --- a/app/common/model/user/Identity.php +++ b/app/common/model/user/Identity.php @@ -16,7 +16,7 @@ class Identity extends BaseModel // 定义主键 protected $pk = 'identity_id'; - + /** * 追加字段 @@ -53,7 +53,7 @@ class Identity extends BaseModel */ public function getList(array $where) { - return $this->where($where)->select(); + return $this->where($where)->order('month', 'asc')->select(); } /**