feat : catering
This commit is contained in:
@@ -16,7 +16,7 @@ use Hyperf\Validation\Annotation\Scene;
|
||||
#[Middlewares([
|
||||
JwtAuthMiddleware::class,
|
||||
])]
|
||||
class MealCateringController
|
||||
class CateringController
|
||||
{
|
||||
#[RequestMapping(path: "meal/cycle_list", methods: "GET")]
|
||||
#[Scene(scene: "meal_cycle_list")]
|
||||
@@ -32,5 +32,17 @@ class MealCateringController
|
||||
return(new OptionCycleListService)->handle();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "meal/remain_count", methods: "GET")]
|
||||
#[Scene(scene: "meal_remain_count")]
|
||||
public function remainMealCateringCount()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "option/remain_count", methods: "GET")]
|
||||
#[Scene(scene: "option_remain_count")]
|
||||
public function remainOptionCateringCount()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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