This commit is contained in:
wucongxing 2023-03-23 15:32:40 +08:00
parent 01e2152ec2
commit 59f9860eb0
7 changed files with 30 additions and 24 deletions

View File

@ -1,5 +1,6 @@
<?php <?php
use App\Constants\DoctorTitleCode;
use App\Constants\HttpEnumCode; use App\Constants\HttpEnumCode;

View File

@ -14,22 +14,22 @@ use Hyperf\Constants\Annotation\Constants;
class DoctorTitleCode extends AbstractConstants class DoctorTitleCode extends AbstractConstants
{ {
/** /**
* @MessageIm("执业医师") * @Message("执业医师")
*/ */
const LICENSED_PHYSICIAN = 1; const LICENSED_PHYSICIAN = 1;
/** /**
* @MessageIm("主治医师") * @Message("主治医师")
*/ */
const ATTENDING_DOCTOR = 2; const ATTENDING_DOCTOR = 2;
/** /**
* @MessageIm("副主任医师") * @Message("副主任医师")
*/ */
const DEPUTY_CHIEF_PHYSICIAN = 3; const DEPUTY_CHIEF_PHYSICIAN = 3;
/** /**
* @MessageIm("主任医师") * @Message("主任医师")
*/ */
const CHIEF_PHYSICIAN = 4; const CHIEF_PHYSICIAN = 4;
} }

View File

@ -12,94 +12,94 @@ class HttpEnumCode extends AbstractConstants
{ {
/* -------------------------------200成功请求---------------------------------- */ /* -------------------------------200成功请求---------------------------------- */
/** /**
* @MessageIm("成功") * @Message("成功")
*/ */
const HTTP_SUCCESS = 200; const HTTP_SUCCESS = 200;
/** /**
* @MessageIm("失败") * @Message("失败")
*/ */
const HTTP_ERROR = -1; const HTTP_ERROR = -1;
/** /**
* @MessageIm("用户状态异常") * @Message("用户状态异常")
*/ */
const USER_STATUS_ERROR = 201; const USER_STATUS_ERROR = 201;
/** /**
* @MessageIm("用户已被禁用") * @Message("用户已被禁用")
*/ */
const USER_STATUS_DISABLE = 202; const USER_STATUS_DISABLE = 202;
/** /**
* @MessageIm("手机号超出规定时间内最大获取次数,请您稍后再试") * @Message("手机号超出规定时间内最大获取次数,请您稍后再试")
*/ */
const PHONE_MAXIMUM = 203; const PHONE_MAXIMUM = 203;
/** /**
* @MessageIm("验证码错误") * @Message("验证码错误")
*/ */
const CODE_ERROR = 204; const CODE_ERROR = 204;
/** /**
* @MessageIm("验证码已过期") * @Message("验证码已过期")
*/ */
const CODE_EXPIRED = 205; const CODE_EXPIRED = 205;
/* -------------------------------400客户端错误---------------------------------- */ /* -------------------------------400客户端错误---------------------------------- */
/** /**
* @MessageIm("错误请求") * @Message("错误请求")
*/ */
const CLIENT_HTTP_ERROR = 400; const CLIENT_HTTP_ERROR = 400;
/** /**
* @MessageIm("未授权") * @Message("未授权")
*/ */
const CLIENT_HTTP_UNAUTHORIZED = 401; const CLIENT_HTTP_UNAUTHORIZED = 401;
/** /**
* @MessageIm("禁止请求") * @Message("禁止请求")
*/ */
const HTTP_PROHIBIT = 403; const HTTP_PROHIBIT = 403;
/** /**
* @MessageIm("token错误/无效") * @Message("token错误/无效")
*/ */
const TOKEN_ERROR = 405; const TOKEN_ERROR = 405;
/** /**
* @MessageIm("token过期") * @Message("token过期")
*/ */
const TOKEN_EXPTIRED = 406; const TOKEN_EXPTIRED = 406;
/** /**
* @MessageIm("手机号格式错误") * @Message("手机号格式错误")
*/ */
const MOBILE_FORMAT_ERROR = 407; const MOBILE_FORMAT_ERROR = 407;
/** /**
* @MessageIm("日期格式错误") * @Message("日期格式错误")
*/ */
const DATE_FORMAT_ERROR = 408; const DATE_FORMAT_ERROR = 408;
/* -------------------------------500服务端错误---------------------------------- */ /* -------------------------------500服务端错误---------------------------------- */
/** /**
* @MessageIm("服务器异常") * @Message("服务器异常")
*/ */
const SERVER_ERROR = 500; const SERVER_ERROR = 500;
/** /**
* @MessageIm("微信授权失败") * @Message("微信授权失败")
*/ */
const GET_WX_ERROR = 501; const GET_WX_ERROR = 501;
/** /**
* @MessageIm("微信授权过期") * @Message("微信授权过期")
*/ */
const WX_CODE_ERROR = 502; const WX_CODE_ERROR = 502;
/** /**
* @MessageIm("短信发送失败") * @Message("短信发送失败")
*/ */
const CODE_FAIL = 503; const CODE_FAIL = 503;
} }

View File

@ -11,7 +11,7 @@ use Hyperf\Constants\Annotation\Constants;
class SubTemplateCode extends AbstractConstants class SubTemplateCode extends AbstractConstants
{ {
/** /**
* @MessageIm("患者回复通知") * @Message("患者回复通知")
*/ */
const PATIENT_RESPONSE = "patientResponse"; const PATIENT_RESPONSE = "patientResponse";
} }

View File

@ -2,6 +2,7 @@
namespace App\Services; namespace App\Services;
use App\Constants\DoctorTitleCode;
use App\Constants\HttpEnumCode; use App\Constants\HttpEnumCode;
use App\Model\User as UserModel; use App\Model\User as UserModel;
use App\Model\UserDoctor as UserDoctorModel; use App\Model\UserDoctor as UserDoctorModel;
@ -235,6 +236,9 @@ class LoginService extends BaseService
*/ */
public function mobileLogin(): array public function mobileLogin(): array
{ {
$data = DoctorTitleCode::getMessage(1);
dump($data);
die;
$code = $this->request->input('code'); $code = $this->request->input('code');
$phone = $this->request->input('phone'); $phone = $this->request->input('phone');
$user_type = $this->request->input('user_type'); $user_type = $this->request->input('user_type');

View File

@ -863,6 +863,7 @@ class PatientFamilyService extends BaseService
$page = $this->request->input('page', 1); $page = $this->request->input('page', 1);
$per_page = $this->request->input('per_page', 10); $per_page = $this->request->input('per_page', 10);
$params = array();

View File

@ -296,7 +296,7 @@ Router::addGroup('/patient', function () {
// 药品 // 药品
Router::addGroup('/product', function () { Router::addGroup('/product', function () {
// 获取家庭成员用药记录列表 // 获取家庭成员用药记录列表
Router::get('/record', [PatientFamilyController::class, 'getFamilyProductRecordList']); Router::get('/record', [PatientFamilyController::class, 'getFamilyProductRecord']);
}); });
}); });