新增了 修改医生问诊配置 接口,新增了公益问诊的配置
This commit is contained in:
parent
0adceb672f
commit
ce8896c140
@ -4,7 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Model\DoctorInquiryConfig;
|
||||
use App\Model\DoctorInquiryPriceRecord;
|
||||
use App\Model\UserDoctor;
|
||||
use Hyperf\Command\Command as HyperfCommand;
|
||||
use Hyperf\Command\Annotation\Command;
|
||||
@ -91,6 +93,18 @@ class AdjustDoctorInquiryPriceCommand extends HyperfCommand
|
||||
$data['work_num_day'] = 3;
|
||||
DoctorInquiryConfig::editInquiryConfig($params,$data);
|
||||
|
||||
// 记录修改记录
|
||||
$data = array();
|
||||
$data['doctor_id'] = $doctor_inquiry_config['doctor_id'];
|
||||
$data['inquiry_config_id'] = $doctor_inquiry_config['inquiry_config_id'];
|
||||
$data['old_price'] = $doctor_inquiry_config['inquiry_price'];
|
||||
$data['new_price'] = $doctor_inquiry_config['inquiry_price'] + 5;
|
||||
$doctor_inquiry_price_record = DoctorInquiryPriceRecord::addRecord($data);
|
||||
if (empty($doctor_inquiry_price_record)) {
|
||||
Db::rollBack();
|
||||
$this->line("添加记录失败");
|
||||
}
|
||||
|
||||
// 添加缓存记录该医生已处理
|
||||
$redis->set($redis_key, 1, 60 * 60 * 24 * 1);
|
||||
|
||||
|
||||
@ -520,6 +520,12 @@ class DoctorInquiryService extends BaseService
|
||||
|
||||
// 验证-问诊价格
|
||||
// 义诊时不判断,义诊为选择价格,价格后台可调节
|
||||
if ($inquiry_type == 3 && $inquiry_price == 0) {
|
||||
if ($doctor['is_welfare_cooperation'] != 1){
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "请联系客服开通权限~");
|
||||
}
|
||||
}
|
||||
|
||||
if ($inquiry_type != 3) {
|
||||
if (!empty($system_inquiry_config['min_inquiry_price']) && !empty($system_inquiry_config['max_inquiry_price'])) {
|
||||
if ($inquiry_price > $system_inquiry_config['max_inquiry_price'] || $inquiry_price < $system_inquiry_config['min_inquiry_price']) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user