|
|
@@ -343,12 +343,13 @@ class AccountService extends BaseService
|
|
|
|
|
|
RedisService::set($cacheKey, ['date' => date('Y-m-d H:i:s')], rand(2, 3));
|
|
|
$mealInfo = PayMealsModel::where(['id' => $mealId, 'status' => 1, 'mark' => 1])
|
|
|
- ->select(['id','product_id', 'money', 'type', 'discount', 'remark', 'status'])
|
|
|
+ ->select(['id','product_id','gift', 'money', 'type', 'discount', 'remark', 'status'])
|
|
|
->first();
|
|
|
$money = isset($mealInfo['money']) ? floatval($mealInfo['money']) : 0;
|
|
|
$discount = isset($mealInfo['discount']) ? intval($mealInfo['discount']) : 0;
|
|
|
$mealType = isset($mealInfo['type']) && $mealInfo['type'] ? intval($mealInfo['type']) : 1;
|
|
|
- $productId= isset($mealInfo['product_id']) ? $mealInfo['product_id'] : 0;
|
|
|
+ $productId = isset($mealInfo['product_id']) ? $mealInfo['product_id'] : 0;
|
|
|
+ $gift = isset($mealInfo['gift']) ? $mealInfo['gift'] : '';
|
|
|
$price = $discount?moneyFormat($money*$discount/100,2): $money;
|
|
|
if (empty($mealInfo)) {
|
|
|
$this->error = '该套餐不存在';
|
|
|
@@ -439,6 +440,7 @@ class AccountService extends BaseService
|
|
|
'bonus_settle' => 2,
|
|
|
'id_card_no' => $idCardNo,
|
|
|
'create_time' => time(),
|
|
|
+ 'gift' => $gift,
|
|
|
'remark' => $remark,
|
|
|
'status' => 1,
|
|
|
'mark' => 1
|