修改优惠券详情获取品牌和车系
This commit is contained in:
@@ -201,17 +201,18 @@ class Ucenter extends BaseController
|
||||
{
|
||||
$id = $this->get('id');
|
||||
$userCoupon = $this->auto_user_coupon_model->get(['id' => $id, 'userId' => $this->userId]);
|
||||
$product = $this->auto_product_model->get(['id'=>$userCoupon['productId']]);
|
||||
$where = ['cf_uid' => $this->userId, 'app_id' => Receiver_clues_model::APP_ID_ACTIVITY, 'out_id' => $userCoupon['productId']];
|
||||
$cluesRow = $this->clues_model->get($where);
|
||||
$cityRow = $this->area_model->get(['city_id' => $cluesRow['city_id']]);
|
||||
$brand = $this->auto_brand_model->get(['id' => $cluesRow['brand_id']], 'name');
|
||||
$series = $this->auto_series_model->get(['id' => $cluesRow['series_id']], 'name');
|
||||
$brand = $this->auto_brand_model->get(['id' => $product['brand_id']], 'name');
|
||||
$series = $this->auto_series_model->get(['id' => $product['series_id']], 'name');
|
||||
$data = [
|
||||
'mobile' => mobile_asterisk($userCoupon['mobile']),
|
||||
'city' => $cityRow['province_name'] . '/' . $cityRow['city_name'],
|
||||
'cityId' => $cluesRow['city_id'] ?: '',
|
||||
'brandId' => $cluesRow['brand_id'] ?: '',
|
||||
'seriesId' => $cluesRow['series_id'] ?: '',
|
||||
'brandId' => $product['brandId'] ?: '',
|
||||
'seriesId' => $product['seriesId'] ?: '',
|
||||
'model' => "{$brand['name']} {$series['name']}"
|
||||
];
|
||||
$this->return_response($data);
|
||||
|
||||
Reference in New Issue
Block a user