111222
This commit is contained in:
@@ -38,7 +38,11 @@ class DoctorAccountService extends BaseService
|
||||
// 获取医生月度已提现金额-审核通过时间为准
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
$doctor_withdrawal = DoctorWithdrawal::getOne($params);
|
||||
|
||||
$start_time = date('Y-m-01',strtotime($date));
|
||||
$end_time = date('Y-m-t 24:00:00',strtotime($date));
|
||||
$created_at = [$start_time,$end_time];
|
||||
$doctor_withdrawal = DoctorWithdrawal::getOneLatestTime($params,$created_at,['*']);
|
||||
if (empty($doctor_withdrawal)) {
|
||||
$withdrawal_amount_month = 0;
|
||||
} else {
|
||||
@@ -331,13 +335,26 @@ class DoctorAccountService extends BaseService
|
||||
}
|
||||
|
||||
$app_env = config('app_env');
|
||||
if ($app_env == "prod"){
|
||||
if ($app_env != "dev"){
|
||||
// 正式环境高于300元才可以提现
|
||||
if ($withdrawal_amount_total < 300){
|
||||
return fail("提现金额小于300元");
|
||||
}
|
||||
}
|
||||
|
||||
// 每月只能提现一次
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
|
||||
$start_time = date('Y-m-01',time());
|
||||
$end_time = date('Y-m-t 24:00:00',time());
|
||||
$created_at = [$start_time,$end_time];
|
||||
|
||||
$doctor_withdrawal = DoctorWithdrawal::getOneLatestTime($params,['*'],$created_at);
|
||||
if (!empty($doctor_withdrawal)){
|
||||
return fail("每月只允许提现一次");
|
||||
}
|
||||
|
||||
$amount_total = 0;
|
||||
foreach ($order_inquiry_id as $value){
|
||||
$params = array();
|
||||
|
||||
Reference in New Issue
Block a user