修改创建药品订单
This commit is contained in:
parent
d9a4be6932
commit
b19c5d47ab
@ -54,11 +54,6 @@ class Coupon extends Model
|
||||
*/
|
||||
protected array $fillable = ['coupon_id', 'coupon_name', 'coupon_icon', 'coupon_client', 'coupon_type', 'coupon_status', 'distribution_object', 'application_scope', 'inquiry_type', 'brand_id', 'is_mutex', 'is_display', 'distribution_with_day', 'min_usable_number', 'coupon_count', 'coupon_take_count', 'coupon_used_count', 'coupon_price', 'with_amount', 'valid_type', 'valid_days', 'valid_start_time', 'valid_end_time', 'product_id', 'reissue_interval_days', 'is_reissuable_after_expire', 'is_popup', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['coupon_id' => 'string', 'coupon_client' => 'integer', 'coupon_type' => 'integer', 'coupon_status' => 'integer', 'distribution_object' => 'integer', 'application_scope' => 'integer', 'is_display' => 'integer', 'distribution_with_day' => 'integer', 'coupon_count' => 'integer', 'coupon_take_count' => 'integer', 'coupon_used_count' => 'integer', 'valid_type' => 'integer', 'valid_days' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'is_mutex' => 'integer', 'brand_id' => 'integer', 'min_usable_number' => 'integer', 'reissue_interval_days' => 'integer', 'is_reissuable_after_expire' => 'integer', 'is_popup' => 'integer', 'inquiry_type' => 'integer'];
|
||||
|
||||
protected string $primaryKey = "coupon_id";
|
||||
|
||||
/**
|
||||
|
||||
@ -1170,7 +1170,7 @@ class PatientOrderService extends BaseService
|
||||
// 优惠卷商品数据
|
||||
$coupon_product_data = array();
|
||||
$product['product_num'] = $order_prescription_product['prescription_product_num'];
|
||||
$coupon_product_data[] = $product;
|
||||
$coupon_product_data = $product->toArray();
|
||||
$coupon_product_datas[] = $coupon_product_data;
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ class UserCouponService extends BaseService
|
||||
$coupons[$key]['cannot_use_coupon_reason'] = ""; // 不可使用原因
|
||||
}
|
||||
|
||||
dump($user_coupons);
|
||||
foreach ($coupons as $key => $coupon) {
|
||||
// 处理优惠卷数量限制问题
|
||||
if ($coupon['coupon_type'] == 3 && !empty($coupon['product_id'])){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user