| xqd
@@ -2715,23 +2715,7 @@ class AlbumController extends Controller
|
|
|
$user_agent = AlbumAgentModel::where('user_id',$userAuth->id)->first();
|
|
|
$user_agent->is_show_ma_price = $data['is_show_ma_price'];
|
|
|
$user_agent->save();
|
|
|
-<<<<<<< HEAD
|
|
|
- if ($data['point'] != 0) {
|
|
|
- $product = AlbumProductModel::where('store_id',$data['store_id'])->all('id','price_default');
|
|
|
- foreach ($product as $key=>$val) {
|
|
|
- $save['price'] = $val['price_default'] * $data['point']/100;
|
|
|
- $check = AlbumProductPriceModel::where([['agent_id',$user_agent->id],['store_id',$data['store_id']],['product_id',$val['id']]])->first();
|
|
|
- if(empty($check)){
|
|
|
- $save['agent_id'] = $user_agent->id;
|
|
|
- $save['store_id'] = $data['store_id'];
|
|
|
- $save['product_id'] = $val['id'];
|
|
|
- AlbumProductPriceModel::create($save);
|
|
|
- }else{
|
|
|
- AlbumProductPriceModel::where([['agent_id',$user_agent->id],['store_id',$data['store_id']],['product_id',$val['id']]])->update($save);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-=======
|
|
|
+
|
|
|
|
|
|
$product = AlbumProductModel::where('store_id',$data['store_id'])->get(['id','ma_price']);
|
|
|
foreach ($product as $key=>$val) {
|
| xqd
@@ -2748,7 +2732,7 @@ class AlbumController extends Controller
|
|
|
}
|
|
|
$user_agent->set_price_point = $data['point'];
|
|
|
$user_agent->save();
|
|
|
->>>>>>> master
|
|
|
+
|
|
|
return $this->api([],0,'success');
|
|
|
}
|
|
|
}
|