Commit 6408c4fc by 孙龙

up

parent 04d38872
...@@ -460,8 +460,11 @@ class BomService { ...@@ -460,8 +460,11 @@ class BomService {
//自营 //自营
$ziying[$k]["id"] = $item["match_goods_id"]; $ziying[$k]["id"] = $item["match_goods_id"];
$ziying[$k]["num"] = $item["match_number"]; $ziying[$k]["num"] = $item["match_number"];
$ziying[$k]["delivery_place"] = $delivery_type;
$ziying[$k]["matching_id"] = $item["matching_id"];
}else{ }else{
//联营 //联营
$lianying[$k]["matching_id"] = $item['matching_id'];
$lianying[$k]["goods_name"] = $item['match_goods_name']; $lianying[$k]["goods_name"] = $item['match_goods_name'];
$lianying[$k]["brand_name"] = $item['match_brand_name']; $lianying[$k]["brand_name"] = $item['match_brand_name'];
$lianying[$k]["num"] = $item['match_number']; $lianying[$k]["num"] = $item['match_number'];
...@@ -546,7 +549,6 @@ class BomService { ...@@ -546,7 +549,6 @@ class BomService {
protected function zyOrder($user_id,$ziying,$extend,&$err_msg){ protected function zyOrder($user_id,$ziying,$extend,&$err_msg){
//请求 api接口 加入购物车 //请求 api接口 加入购物车
$addZYShopCart = $this->createZYOrderToShopCart($user_id,$ziying,$extend); $addZYShopCart = $this->createZYOrderToShopCart($user_id,$ziying,$extend);
if(!empty($addZYShopCart) && $addZYShopCart['err_code'] == 0){//加入购物车成功 if(!empty($addZYShopCart) && $addZYShopCart['err_code'] == 0){//加入购物车成功
//获取自营购物车 //获取自营购物车
$car_ids = $this->getShopCart($user_id,3); $car_ids = $this->getShopCart($user_id,3);
...@@ -578,7 +580,6 @@ class BomService { ...@@ -578,7 +580,6 @@ class BomService {
*/ */
protected function createOrder($user_id,$car_ids,$extend,$type=2){ protected function createOrder($user_id,$car_ids,$extend,$type=2){
$url = Config('website.api_create_order'); $url = Config('website.api_create_order');
$data['bom_id'] = $extend["bom_id"];
$data['uid'] = intval($user_id) ? intval($user_id) : 0; $data['uid'] = intval($user_id) ? intval($user_id) : 0;
$data["type"] = $type;//订单类型:1.联营, 2.自营线上, 3.自营线下, 4.自营其他业务订单 $data["type"] = $type;//订单类型:1.联营, 2.自营线上, 3.自营线下, 4.自营其他业务订单
$data["cart_id"] = implode(",",$car_ids); $data["cart_id"] = implode(",",$car_ids);
...@@ -602,8 +603,8 @@ class BomService { ...@@ -602,8 +603,8 @@ class BomService {
//联营 //联营
$goodsType = [1,2]; $goodsType = [1,2];
} }
$query = DB::connection("order")->table("lie_shopping_cart")->where(["user_id"=>$user_id,"status"=>1]) $query = DB::connection("order")->table("lie_shopping_cart")->where(["user_id"=>$user_id,"status"=>1,"extend_type"=>5])
->where("bom_id","!=",0)->whereIn("goods_type",$goodsType)->select("cart_id")->pluck("cart_id"); ->whereIn("goods_type",$goodsType)->select("cart_id")->pluck("cart_id");
return $query; return $query;
} }
...@@ -613,8 +614,7 @@ class BomService { ...@@ -613,8 +614,7 @@ class BomService {
*/ */
protected function createZYOrderToShopCart($user_id,$ziying,$extend){ protected function createZYOrderToShopCart($user_id,$ziying,$extend){
$url = Config('website.addzyorder_url'); $url = Config('website.addzyorder_url');
$data['type'] = 2; $data['type'] = 2;//后台加入购物车
$data['bom_id'] = $extend["bom_id"];
$data['delivery_place'] = $extend['delivery_type']; $data['delivery_place'] = $extend['delivery_type'];
$data["data"] = array_merge($ziying); $data["data"] = array_merge($ziying);
$data['uid'] = intval($user_id) ? intval($user_id) : 0; $data['uid'] = intval($user_id) ? intval($user_id) : 0;
......
...@@ -111,40 +111,40 @@ ...@@ -111,40 +111,40 @@
<div class="layui-card" style=""> {{--<div class="layui-card" style="">--}}
<h3>用户数据</h3> {{--<h3>用户数据</h3>--}}
<hr> {{--<hr>--}}
<form class="layui-form layui-box" id="test5" method="post"> {{--<form class="layui-form layui-box" id="test5" method="post">--}}
<div class="layui-form-item"> {{--<div class="layui-form-item">--}}
<div class="layui-inline"> {{--<div class="layui-inline">--}}
<label class="layui-form-label">创建日期:</label> {{--<label class="layui-form-label">创建日期:</label>--}}
<div class="layui-input-inline"> {{--<div class="layui-input-inline">--}}
<input type="text" name="begin_time" value="" autocomplete="off" placeholder="选择开始时间" class="layui-input" id="begin_time" readonly> {{--<input type="text" name="begin_time" value="" autocomplete="off" placeholder="选择开始时间" class="layui-input" id="begin_time" readonly>--}}
</div> {{--</div>--}}
<div class="layui-form-mid">-</div> {{--<div class="layui-form-mid">-</div>--}}
<div class="layui-input-inline"> {{--<div class="layui-input-inline">--}}
<input type="text" name="end_time" value="" autocomplete="off" placeholder="选择结束时间" class="layui-input" id="end_time" readonly> {{--<input type="text" name="end_time" value="" autocomplete="off" placeholder="选择结束时间" class="layui-input" id="end_time" readonly>--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="layui-inline"> {{--<div class="layui-inline">--}}
<label class="layui-form-label">客服</label> {{--<label class="layui-form-label">客服</label>--}}
<div class="layui-input-inline"> {{--<div class="layui-input-inline">--}}
<select name="is_kefu" lay-verify="" lay-search> {{--<select name="is_kefu" lay-verify="" lay-search>--}}
<option value="all">全部</option> {{--<option value="all">全部</option>--}}
<option value="1"></option> {{--<option value="1"></option>--}}
<option value="0"></option> {{--<option value="0"></option>--}}
</select> {{--</select>--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
<div class="layui-inline" style="text-align: center;"> {{--<div class="layui-inline" style="text-align: center;">--}}
<button class="layui-btn" data-type="search">搜索</button> {{--<button class="layui-btn" data-type="search">搜索</button>--}}
<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> --> {{--<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> -->--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
</form> {{--</form>--}}
</div> {{--</div>--}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment