修改物流
This commit is contained in:
@@ -6,6 +6,7 @@ namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
@@ -15,10 +16,12 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property int $order_prescription_id 订单-处方表id(无需上报处方时为null)
|
||||
* @property int $order_product_id 订单-商品表id(无需上报处方时为null)
|
||||
* @property int $report_inquiry_status 问诊上报状态(0:未上报 1:已上报 2:上报失败)
|
||||
* @property int $report_inquiry_int 问诊上报次数
|
||||
* @property int $report_inquiry_type 问诊上报类型(1:网络初诊 2:网络复诊)
|
||||
* @property string $report_inquiry_time 问诊上报时间
|
||||
* @property string $report_inquiry_fail_reason 问诊上报失败原因
|
||||
* @property int $report_prescription_status 处方上报状态(0:未上报 1:已上报 2:上报失败)
|
||||
* @property int $report_prescription_int 处方上报次数
|
||||
* @property string $report_prescription_time 处方上报时间
|
||||
* @property string $report_prescription_fail_reason 处方上报失败原因
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
@@ -36,7 +39,7 @@ class ReportRegulatory extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['report_regulatory_id', 'order_inquiry_id', 'order_prescription_id', 'order_product_id', 'report_inquiry_status', 'report_inquiry_type', 'report_inquiry_time', 'report_inquiry_fail_reason', 'report_prescription_status', 'report_prescription_time', 'report_prescription_fail_reason', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['report_regulatory_id', 'order_inquiry_id', 'order_prescription_id', 'order_product_id', 'report_inquiry_status', 'report_inquiry_int', 'report_inquiry_type', 'report_inquiry_time', 'report_inquiry_fail_reason', 'report_prescription_status', 'report_prescription_int', 'report_prescription_time', 'report_prescription_fail_reason', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "report_regulatory_id";
|
||||
|
||||
@@ -83,4 +86,33 @@ class ReportRegulatory extends Model
|
||||
{
|
||||
return self::where($params)->update($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数量
|
||||
* @param array $params
|
||||
* @param array $or_params
|
||||
* @return int
|
||||
*/
|
||||
public static function getOrStatusCount(array $params = [],array $or_params = []): int
|
||||
{
|
||||
return self::where($params)->orWhere($or_params)->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param array $params
|
||||
* @param array $or_params
|
||||
* @param array $fields
|
||||
* @param int $offset
|
||||
* @param int $limit
|
||||
* @return Collection|array
|
||||
*/
|
||||
public static function getOrStatusLimit(array $params = [],array $or_params = [], array $fields = ["*"],int $offset = 0,int $limit = 10): Collection|array
|
||||
{
|
||||
return self::where($params)
|
||||
->orWhere($or_params)
|
||||
->offset($offset)
|
||||
->limit($limit)
|
||||
->get($fields);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user