|
|
@@ -60,7 +60,7 @@ class GoodsLogic extends BaseLogic
|
|
|
}
|
|
|
|
|
|
if(!empty($goods)){
|
|
|
- !empty(env('APP_DEBUG', false)) && Log::info($userId.'--商品详情:'.json_encode($goods));
|
|
|
+ !empty(env('DEBUG_LOG', false)) && Log::info($userId.'--detail-商品详情:'.json_encode($goods));
|
|
|
$data = [];
|
|
|
foreach ($goods as $key => $value) {
|
|
|
if($service_work_id > 0 || $platform_appid > 0 || $platform_value > 0){
|
|
|
@@ -100,21 +100,21 @@ class GoodsLogic extends BaseLogic
|
|
|
public static function eventDetail($id,$userId){
|
|
|
$goods = Goods::where(['id'=>$id])->where(['platform_value'=>0])->visible([
|
|
|
'id','goods_image','goods_name','goods_banners','good_unit','sell_num','base_service_fee',
|
|
|
- 'service_total','service_fee','service_image','fee_schedule','warranty_period','goods_payment_type','goods_category_id'
|
|
|
+ 'service_total','service_fee','service_image','fee_schedule','warranty_period','goods_payment_type','goods_category_id','is_activity','activity_service_fee'
|
|
|
])->select()
|
|
|
->each(function (&$item, $key) use ($userId){
|
|
|
//判定是否存在可使用的用户优惠券,存在的话直接更新展示价格
|
|
|
if($userId!=0){
|
|
|
$result = UserCouponLogic::categoryWithAmountLists(['user_id'=>$userId,'amount'=>$item['service_fee'],'goods_category_id'=>$item['goods_category_id'],'goods_id'=>$item['id']]);
|
|
|
if(!empty($result[0]['amount'])){
|
|
|
- !empty(env('APP_DEBUG', false)) && Log::info($userId.'--用户优惠券:'.json_encode($result));
|
|
|
+ !empty(env('DEBUG_LOG', false)) && Log::info($userId.'--eventDetail-用户优惠券:'.json_encode($result));
|
|
|
$item['base_service_fee'] = '券后'.($item['base_service_fee'] - $result[0]['amount']);
|
|
|
}
|
|
|
}
|
|
|
})->toArray();
|
|
|
|
|
|
if(!empty($goods)){
|
|
|
- !empty(env('APP_DEBUG', false)) && Log::info($userId.'--商品详情:'.json_encode($goods));
|
|
|
+ !empty(env('DEBUG_LOG', false)) && Log::info($userId.'--eventDetail-商品详情:'.json_encode($goods));
|
|
|
$data = [];
|
|
|
foreach ($goods as $key => $value) {
|
|
|
if($value['goods_payment_type'] == '2'){
|