feat : catering
This commit is contained in:
@@ -25,15 +25,25 @@ trait CouponDispenseTrait
|
||||
|
||||
$this->cycleId = $cycleInfo->id;
|
||||
|
||||
if ($this->groupType == CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES_AND_GOODS) {
|
||||
$appointValue = json_encode($this->request->input('appoint_value'));
|
||||
$this->appointValue = [
|
||||
$appointValue = json_encode($this->request->input('appoint_value'));
|
||||
// if ($this->groupType == CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES_AND_GOODS) {
|
||||
// $this->appointValue = [
|
||||
// 'site' => explode(',', $appointValue['site']),
|
||||
// 'sku' => explode(',', $appointValue['goods'])
|
||||
// ];
|
||||
// } else {
|
||||
// $this->appointValue = explode(',', $this->request->input('appoint_value'));
|
||||
// }
|
||||
//
|
||||
match ($this->groupType){
|
||||
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_USERS => $this->appointValue = explode(',', $appointValue['user_ids']),
|
||||
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES => $this->appointValue = explode(',', $appointValue['site']),
|
||||
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_GOODS => $this->appointValue = explode(',', $appointValue['goods']),
|
||||
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES_AND_GOODS => $this->appointValue = [
|
||||
'site' => explode(',', $appointValue['site']),
|
||||
'sku' => explode(',', $appointValue['goods'])
|
||||
];
|
||||
} else {
|
||||
$this->appointValue = explode(',', $this->request->input('appoint_value'));
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
unset($cycleInfo);
|
||||
}
|
||||
@@ -142,7 +152,9 @@ trait CouponDispenseTrait
|
||||
{
|
||||
$this->checkAppointValue();
|
||||
|
||||
return explode(',',$this->request->input('appoint_value'));
|
||||
$appointValue = json_encode($this->request->input('appoint_value'));
|
||||
|
||||
return explode(',', $appointValue['user_ids']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user