修正验证码不能以0开头的问题
This commit is contained in:
@@ -6,12 +6,13 @@ namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $withdrawal_id 主键id
|
||||
* @property int $doctor_id 医生id
|
||||
* @property int $bank_card_id 医生银行卡id
|
||||
* @property int $bank_id 银行id
|
||||
* @property string $account_name 银行卡姓名
|
||||
* @property string $bank_card_code 银行卡号
|
||||
* @property string $bank_card_code_four 银行卡号(后四位)
|
||||
@@ -36,12 +37,12 @@ class DoctorWithdrawal extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['withdrawal_id', 'doctor_id', 'bank_card_id', 'account_name', 'bank_card_code', 'bank_card_code_four', 'applied_withdrawal_amount', 'actual_withdrawal_amount', 'income_tax', 'examine_status', 'examine_fail_reason', 'examine_time', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['withdrawal_id', 'doctor_id', 'bank_id', 'account_name', 'bank_card_code', 'bank_card_code_four', 'applied_withdrawal_amount', 'actual_withdrawal_amount', 'income_tax', 'examine_status', 'examine_fail_reason', 'examine_time', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['withdrawal_id' => 'integer', 'doctor_id' => 'integer', 'bank_card_id' => 'integer', 'examine_status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
protected array $casts = ['withdrawal_id' => 'integer', 'doctor_id' => 'integer', 'bank_id' => 'integer', 'examine_status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "withdrawal_id";
|
||||
|
||||
@@ -66,4 +67,16 @@ class DoctorWithdrawal extends Model
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某一时间区间数据
|
||||
* @param array $params
|
||||
* @param array $created_at_params
|
||||
* @param array $fields
|
||||
* @return Collection|array
|
||||
*/
|
||||
public static function getDateList(array $params,array $created_at_params, array $fields = ['*']): Collection|array
|
||||
{
|
||||
return self::where($params)->whereBetween('created_at',$created_at_params)->get($fields);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user