|
|
@@ -38,7 +38,7 @@ class WelfareLoginc
|
|
|
$tim = time();
|
|
|
$result = ProductPopular::alias('a')->where('a.start_time', '<=', $tim)->where('a.end_time', '>=', $tim)
|
|
|
->join('product_list b', "a.product_id = b.id", "left")
|
|
|
- ->field('a.*,b.is_area,'.$lan.'_name')
|
|
|
+ ->field('a.*,b.is_area,'.$lan.'_name as name')
|
|
|
->where('a.product_id', $productId)->find();
|
|
|
if($num > $result->stock) throw new Exception(__('库存不足'));
|
|
|
if(empty($result->is_area)){
|
|
|
@@ -47,7 +47,7 @@ class WelfareLoginc
|
|
|
$areaArr = ProductArea::where('product_id', $productId)->where('status', ProductArea::NORMAL)->orderRaw('RAND()')->limit($num)->column('id');
|
|
|
ProductOrder::setPopularAreaOrder($areaArr, $result->id, $result->price, $result->product_id, $uid);
|
|
|
}
|
|
|
- return ['start_time'=>$tim, 'name'=>$result->$lan.'_name'];
|
|
|
+ return ['start_time'=>$tim, 'name'=>$result->name];
|
|
|
}
|
|
|
|
|
|
|