修正首页认证状态、新增银行卡
This commit is contained in:
parent
57bca15fb5
commit
71ad45422a
@ -72,4 +72,15 @@ class UserDoctorController extends AbstractController
|
||||
$data = $DoctorInquiryService->putInquiryConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生银行卡
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getDoctorBankCard(): ResponseInterface
|
||||
{
|
||||
$UserDoctorService = new UserDoctorService();
|
||||
$data = $UserDoctorService->getDoctorBankCard();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
61
app/Model/BasicBank.php
Normal file
61
app/Model/BasicBank.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $bank_id 主键id
|
||||
* @property string $bank_code 银行编码
|
||||
* @property string $bank_name 银行名称
|
||||
* @property string $bank_img_path 银行图片地址
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class BasicBank extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'basic_bank';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['bank_id', 'bank_code', 'bank_name', 'bank_img_path', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['bank_id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "bank_id";
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-多条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getList(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
}
|
||||
95
app/Model/DoctorBankCard.php
Normal file
95
app/Model/DoctorBankCard.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Database\Model\Relations\HasOne;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $bank_card_id 主键id
|
||||
* @property int $doctor_id 医生id
|
||||
* @property int $bank_id 银行id
|
||||
* @property string $bank_card_code 银行卡号
|
||||
* @property string $bank_card_code_mask 银行卡号(掩码)
|
||||
* @property string $account_name 开户人姓名
|
||||
* @property string $card_id_number 开户人身份证号
|
||||
* @property string $account_phone 开户人手机号
|
||||
* @property int $province_id 省份id
|
||||
* @property string $province 省份
|
||||
* @property int $city_id 城市id
|
||||
* @property string $city 城市
|
||||
* @property int $county_id 区县id
|
||||
* @property string $county 区县
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class DoctorBankCard extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'doctor_bank_card';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['bank_card_id', 'doctor_id', 'bank_id', 'bank_card_code', 'bank_card_code_mask', 'account_name', 'card_id_number', 'account_phone', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['bank_card_id' => 'integer', 'doctor_id' => 'integer', 'bank_id' => 'integer', 'province_id' => 'integer', 'city_id' => 'integer', 'county_id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "bank_card_id";
|
||||
|
||||
/**
|
||||
* 关联银行表
|
||||
*/
|
||||
public function BasicBank(): HasOne
|
||||
{
|
||||
return $this->hasOne(BasicBank::class, 'bank_id','bank_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-多条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getList(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取医生银行卡列表
|
||||
* 关联银行表
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return DoctorBankCard[]|Builder[]|Collection
|
||||
*/
|
||||
public static function getWithBankList(array $params, array $fields = ['*']): Collection|array
|
||||
{
|
||||
return self::with(['BasicBank'])->where($params)->get($fields);
|
||||
}
|
||||
}
|
||||
@ -95,7 +95,7 @@ class IndexService extends BaseService
|
||||
$info['user_name'] = $doctor['user_name'];
|
||||
$info['status'] = $doctor['status'];
|
||||
$info['idcard_status'] = $doctor['idcard_status'];// 实名认证状态(0:未认证 1:认证通过 2:认证失败)
|
||||
$info['iden_auth_status'] = $doctor['idcard_status'];// 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
$info['iden_auth_status'] = $doctor['iden_auth_status'];// 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
$info['multi_point_status'] = $doctor['multi_point_status'];// 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
$info['is_bind_bank'] = $doctor['is_bind_bank'];// 是否已绑定结算银行卡(0:否 1:是)
|
||||
$info['avatar'] = $doctor['avatar'];
|
||||
|
||||
@ -73,4 +73,13 @@ class UserDoctorService extends BaseService
|
||||
|
||||
return $doctor_expertise->toArray();
|
||||
}
|
||||
|
||||
// 获取医生银行卡
|
||||
public function getDoctorBankCard(){
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
// $doctor_bank_card =
|
||||
}
|
||||
}
|
||||
@ -78,11 +78,10 @@ Router::addGroup('/doctor', function () {
|
||||
//银行卡
|
||||
Router::addGroup('/bank', function () {
|
||||
// 获取医生银行卡
|
||||
Router::get('/card', [UserDoctorController::class, 'getInquiryConfig']);
|
||||
Router::get('', [UserDoctorController::class, 'getDoctorBankCard']);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* ------------患者端api---------------------
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user