From 0a247681fb0c332e0a192ebff42493aab9c1bffb Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 20 Oct 2023 18:57:29 +0800 Subject: [PATCH 01/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Statistics.php | 24 ++++++++++-------------- route/api.php | 1 + 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/controller/api/Statistics.php b/app/controller/api/Statistics.php index f3eeb410..b31e4cf2 100644 --- a/app/controller/api/Statistics.php +++ b/app/controller/api/Statistics.php @@ -186,28 +186,24 @@ class Statistics extends BaseController if (!isset($parmas['end_time']) || $parmas['end_time'] == '') { return app('json')->fail('end_time:格式错误'); } - if (!isset($parmas['mer_intention_id']) || $parmas['mer_intention_id'] == '') { - return app('json')->fail('mer_intention_id:格式错误'); - } if (!isset($parmas['goods_id']) || $parmas['goods_id'] == '') { return app('json')->fail('goods_id:格式错误'); } - if (isset($parmas['responsible_area']) && $parmas['responsible_area'] != '') { - $area[] = ['street_id','in',explode(',', $parmas['responsible_area'])]; - }else{ - return app('json')->fail('responsible_area:格式错误'); - } - $merchant=Db::name('merchant')->where('street_id','in',$area)->select(); - if(!$merchant){ - return app('json')->fail('responsible_area:格式错误'); - - } + // if (isset($parmas['responsible_area']) && $parmas['responsible_area'] != '') { + // $area[] = ['street_id','in',explode(',', $parmas['responsible_area'])]; + // }else{ + // return app('json')->fail('responsible_area:格式错误'); + // } + // $merchant=Db::name('merchant')->where('street_id','in',$area)->select(); + // if(!$merchant){ + // return app('json')->fail('查询商户为空'); + // } $where[]=['p.create_time','between time',[date("Y-m-d H:i:s",$parmas['start_time']),date("Y-m-d H:i:s",$parmas['end_time'])]]; $where[] = ['p.product_id','in',explode(',', $parmas['goods_id'])]; $where[] = ['p.is_refund','=',0]; $count=Db::name('store_order_product')->alias('p') ->where($where) - ->join('store_order o','o.mer_id in '.$parmas['mer_intention_id'].' and o.paid=1 and o.is_del=0') + // ->join('store_order o','o.mer_id in '.$parmas['mer_intention_id'].' and o.paid=1 and o.is_del=0') ->sum('p.total_price'); return app('json')->success(['procure_amount'=>$count]); } diff --git a/route/api.php b/route/api.php index 8bbf95b7..ff9c030b 100644 --- a/route/api.php +++ b/route/api.php @@ -687,6 +687,7 @@ Route::group('api/', function () { Route::get('supply_chain_product_stock_count', '/SupplyChainProductStockCount'); Route::get('product_list', '/ProductList'); Route::get('supply_chain_product_price_count', '/SupplyChainProductPriceCount'); + Route::get('supply_chain_street_product_price_count', '/SupplyChainStreetProductPriceCount'); })->prefix('api.Statistics'); //滑块验证码 From b11b8fa38711c3ed329634bb66858815483142a6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 23 Oct 2023 14:03:49 +0800 Subject: [PATCH 02/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Statistics.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controller/api/Statistics.php b/app/controller/api/Statistics.php index b31e4cf2..f1ae9f44 100644 --- a/app/controller/api/Statistics.php +++ b/app/controller/api/Statistics.php @@ -189,21 +189,21 @@ class Statistics extends BaseController if (!isset($parmas['goods_id']) || $parmas['goods_id'] == '') { return app('json')->fail('goods_id:格式错误'); } - // if (isset($parmas['responsible_area']) && $parmas['responsible_area'] != '') { - // $area[] = ['street_id','in',explode(',', $parmas['responsible_area'])]; - // }else{ - // return app('json')->fail('responsible_area:格式错误'); - // } - // $merchant=Db::name('merchant')->where('street_id','in',$area)->select(); - // if(!$merchant){ - // return app('json')->fail('查询商户为空'); - // } + if (isset($parmas['responsible_area']) && $parmas['responsible_area'] != '') { + $area[] = ['street_id','in',explode(',', $parmas['responsible_area'])]; + }else{ + return app('json')->fail('responsible_area:格式错误'); + } + $merchant=Db::name('merchant')->where($area)->column('mer_id'); + if(!$merchant){ + return app('json')->fail('查询商户为空'); + } $where[]=['p.create_time','between time',[date("Y-m-d H:i:s",$parmas['start_time']),date("Y-m-d H:i:s",$parmas['end_time'])]]; $where[] = ['p.product_id','in',explode(',', $parmas['goods_id'])]; $where[] = ['p.is_refund','=',0]; $count=Db::name('store_order_product')->alias('p') ->where($where) - // ->join('store_order o','o.mer_id in '.$parmas['mer_intention_id'].' and o.paid=1 and o.is_del=0') + ->join('store_order o','o.mer_id in ('.implode(',',$merchant).') and o.paid=1 and o.is_del=0') ->sum('p.total_price'); return app('json')->success(['procure_amount'=>$count]); } From caddda1c41d241f4e5621674eac79d6fbd2694a2 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 10 Oct 2023 14:54:50 +0800 Subject: [PATCH 03/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 89 +++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 1f576a3a..f5f23caf 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -57,7 +57,7 @@ use app\common\service\TopClient; use app\controller\api\Ceshi; use taobao\request\TbkItemInfoGetRequest; use app\common\repositories\store\product\ProductRepository; -use crmeb\services\UploadService; +use think\facade\App; /** * Class Auth @@ -69,33 +69,36 @@ class Auth extends BaseController { public function caiji() { + $url=$this->request->host(); $parmas = $this->request->param(); - $query = parse_url($parmas['url']); - $itemId = $this->convertUrlQuery($query['query']); + $query=parse_url($parmas['url']); + $itemId=$this->convertUrlQuery($query['query']); $c = new TopClient; $c->appkey = '34537213'; $c->secretKey = '4a35f3657156580c1f533750295c54c4'; $req = new TbkItemInfoGetRequest; $req->setNumIids($itemId['itemId']); $resp = $c->execute($req); - $res = $resp->results->n_tbk_item; - $arr = json_decode(json_encode($res), true); - $images = []; - $upload = UploadService::create(); - $dir = 'def/' . date('Y-m-d'); - - $oss = $upload->to($dir)->stream(file_get_contents($arr['pict_url'])); - - $pict_url = $oss->filePath; - foreach ($arr['small_images']['string'] as $k => $v) { - $oss = $upload->to($dir)->stream(file_get_contents($v)); - $images[] = $oss->filePath; + $res=$resp->results->n_tbk_item; + $images=[]; + $filename = basename($res->pict_url); // 获取文件名 + $destination = public_path('uploads').'img/' . $filename; // 目标路径 + $pict_url= $url.'/uploads/img/'.$filename; + file_put_contents($destination, file_get_contents($res->pict_url)); + + if($resp && isset($resp->small_images) && isset($resp->small_images->string)){ + foreach($resp->small_images->string as $k=>$v){ + $filename = basename($v); // 获取文件名 + $destination = public_path('uploads').'img/' . $filename; // 目标路径 + file_put_contents($destination, file_get_contents($v)); + $images[]=$url.'/uploads/img/'.$filename; + } } - $data = [ + $data=[ "image" => $pict_url, - "slider_image" => $images, - "store_name" => $arr['title'], - "store_info" => $arr['cat_leaf_name'], + "slider_image" =>$images, + "store_name" => json_decode(json_encode($res->title),true)[0], + "store_info" => json_decode(json_encode($res->cat_leaf_name),true)[0], "keyword" => "", "bar_code" => "", "guarantee_template_id" => "", @@ -115,8 +118,8 @@ class Auth extends BaseController "attr" => [], "mer_labels" => [], "delivery_way" => [ - 0 => "1", - 1 => "2" + 0 => "1", + 1 => "2" ], "delivery_free" => 0, "param_temp_id" => [], @@ -128,17 +131,17 @@ class Auth extends BaseController "once_min_count" => 0, "pay_limit" => 0, "attrValue" => [ - 0 => [ - "image" => $pict_url, - "price" => bcsub($arr['reserve_price'], ($arr['reserve_price'] * 0.05), 2), - "cost" => 0, - "ot_price" => 0, - "svip_price" => null, - "stock" => 100, - "bar_code" => "", - "weight" => 0, - "volume" => 0, - ], + 0 => [ + "image" => $pict_url, + "price" => bcsub($res->reserve_price,($res->reserve_price*0.05),2), + "cost" => 0, + "ot_price" => 0, + "svip_price" => null, + "stock" => 100, + "bar_code" => "", + "weight" => 0, + "volume" => 0, + ], ], "give_coupon_ids" => [], "type" => 0, @@ -149,22 +152,22 @@ class Auth extends BaseController "status" => 0, "mer_status" => 1, "rate" => 3, - ]; - $a = app()->make(ProductRepository::class)->create($data, 0, 1); + ]; + $a= app()->make( ProductRepository::class)->create($data,0,1); // 下载图片并保存到目标路径 return app('json')->success($a); } function convertUrlQuery($query) { - $queryParts = explode('&', $query); - - $params = array(); - foreach ($queryParts as $param) { - $item = explode('=', $param); - $params[$item[0]] = $item[1]; - } - - return $params; + $queryParts = explode('&', $query); + + $params = array(); + foreach ($queryParts as $param) { + $item = explode('=', $param); + $params[$item[0]] = $item[1]; + } + + return $params; } public function dotest() { From ba38d4a1c58caf7c3c4bf460adf553ff2ac61873 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 25 Oct 2023 09:46:47 +0800 Subject: [PATCH 04/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=88=E8=B4=A7?= =?UTF-8?q?=E5=90=8E=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../community/CommunityRepository.php | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/app/common/repositories/community/CommunityRepository.php b/app/common/repositories/community/CommunityRepository.php index 13a1f64d..29e139e5 100644 --- a/app/common/repositories/community/CommunityRepository.php +++ b/app/common/repositories/community/CommunityRepository.php @@ -623,39 +623,40 @@ class CommunityRepository extends BaseRepository $resale->update($value); continue; } - $purchaseRecord = PurchaseRecord::where('unique', $value['product_attr_unique'])->find(); + // $purchaseRecord = PurchaseRecord::where('unique', $value['product_attr_unique'])->find(); // $exist = Resale::where('purchase_record_id', $purchaseRecord['id'])->find(); // if ($exist) { // throw new ValidateException('已发起转售'); // } - $totalNumber = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('number'); - $totalSalesVolume = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('sales_volume'); - if (empty($purchaseRecord) || ($totalNumber - $totalSalesVolume) <= 0) { - throw new ValidateException('进货记录不存在或已售罄'); - } - if (($totalNumber - $totalSalesVolume) < $value['number']) { - throw new ValidateException('库存不足'); - } - + // $totalNumber = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('number'); + // $totalSalesVolume = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('sales_volume'); + // if (empty($purchaseRecord) || ($totalNumber - $totalSalesVolume) <= 0) { + // throw new ValidateException('进货记录不存在或已售罄'); + // } + // if (($totalNumber - $totalSalesVolume) < $value['number']) { + // throw new ValidateException('库存不足'); + // } if ($value) { - $insert[] = [ - 'community_id' => $id, - 'purchase_record_id' => $purchaseRecord['id'], - 'product_id' => $purchaseRecord['product_id'], - 'product_attr_unique' => $purchaseRecord['unique'], - 'mer_id' => $purchaseRecord['mer_id'], - 'number' => $value['number'], - 'price' => $value['price'], - 'resale_type' => $resaleType, - 'deliver_method' => $value['deliver_method'] ?? '', - 'update_time' => date('Y-m-d H:i:s'), - ]; + $attrValue = ProductAttrValue::where('unique', $value['product_attr_unique'])->find(); + if($attrValue){ + $insert[] = [ + 'community_id' => $id, + 'purchase_record_id' => 0, + 'product_id' => $attrValue['product_id'], + 'product_attr_unique' => $attrValue['unique'], + 'mer_id' => $attrValue['mer_id'], + 'number' => $value['number'], + 'price' => $value['price'], + 'resale_type' => $resaleType, + 'deliver_method' => $value['deliver_method'] ?? '', + 'update_time' => date('Y-m-d H:i:s'), + ]; + $attrValue->stock -= $value['number']; + $attrValue->save(); + } + } - $purchaseRecord->product->stock -= $value['number']; - $purchaseRecord->product->save(); - $attrValue = ProductAttrValue::where('product_id', $purchaseRecord['product_id'])->where('unique', $purchaseRecord['unique'])->find(); - $attrValue->stock -= $value['number']; - $attrValue->save(); + } if ($insert) { Resale::getInstance()->insertAll($insert); From e12c0aa06649a7d7dd1141571ca23b1d9ab7f0ff Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 25 Oct 2023 13:43:24 +0800 Subject: [PATCH 05/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/order/StoreCartDao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/dao/store/order/StoreCartDao.php b/app/common/dao/store/order/StoreCartDao.php index d4a1dc5c..a87da48f 100644 --- a/app/common/dao/store/order/StoreCartDao.php +++ b/app/common/dao/store/order/StoreCartDao.php @@ -78,7 +78,7 @@ class StoreCartDao extends BaseDao $query->field('product_id,stock,price,unique,sku,image,svip_price'); }, 'merchant' => function ($query) { - $query->field('mer_id,mer_name,mer_state,mer_avatar,is_trader,type_id')->with(['type_name']); + $query->field('mer_id,mer_name,mer_state,mer_avatar,is_trader,type_id,credit_buy')->with(['type_name']); } ])->select(); From 9c0e7645f8d383eaa0dfccb49392a9ac2bda0cf1 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 12:01:13 +0800 Subject: [PATCH 06/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E6=89=93=E8=B5=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 92 +++++++++++++++++++++++++++++++ route/api.php | 3 + 2 files changed, 95 insertions(+) create mode 100644 app/controller/api/user/Zhibo.php diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php new file mode 100644 index 00000000..2d7a3299 --- /dev/null +++ b/app/controller/api/user/Zhibo.php @@ -0,0 +1,92 @@ + +// +---------------------------------------------------------------------- + +namespace app\controller\api\user; + +use crmeb\basic\BaseController; +use app\common\repositories\user\UserBillRepository; +use think\App; +use think\exception\HttpResponseException; +use think\exception\ValidateException; +use think\facade\Db; +use think\response\Json; + +/** + * Class Auth + * @package app\controller\api + * @author xaboy + * @day 2020-05-06 + */ +class Zhibo extends BaseController +{ + public function reward() + { + $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id']); + $user = $this->request->userInfo(); + $params['live_name'] = '直播间名称'; + $params['gift_name'] = '礼物名称'; + $params['amount'] = 10; + if ($params['amount'] > $user['now_money']) { + return app('json')->fail('用户余额不足'); + } + //查询直播间及礼物接口,验证直播间信息及礼物信息 + + try { + Db::transaction(function () use ($user, $params) { + //打赏订单 + $orderId = Db::name('user_zhibo_order')->insertGetId([ + 'live_stream_id' => $params['live_stream_id'], + 'live_name' => $params['live_name'], + 'gift_id' => $params['gift_id'], + 'gift_name' => $params['gift_name'], + 'uid' => $user['uid'], + 'master_id' => $params['master_id'], + 'order_sn' => 'zb' . date('YmdHis') . mt_rand(1000, 9999), + 'amount' => $params['amount'], + 'pay_status' => 1, + 'pay_time' => date('Y-m-d H:i:s'), + 'create_time' => date('Y-m-d H:i:s'), + 'update_time' => date('Y-m-d H:i:s'), + ]); + //打赏人扣钱 + $user->now_money = bcsub($user['now_money'], $params['amount']); + $user->save(); + $userBillRepository = app()->make(UserBillRepository::class); + //打赏人账单 + $userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward', [ + 'link_id' => $orderId, + 'status' => 1, + 'title' => '直播打赏支出', + 'number' => $params['amount'], + 'mark' => '余额打赏', + 'balance' => $user->now_money + ]); + //主播加钱 + Db::name('user')->where('uid', $params['master_id'])->inc('now_money', $params['amount'])->update(); + $master = Db::name('user')->where('uid', $params['master_id'])->find(); + //主播账单 + $userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward', [ + 'link_id' => $orderId, + 'status' => 1, + 'title' => '直播打赏收入', + 'number' => $params['amount'], + 'mark' => '直播打赏收入', + 'balance' => $master['now_money'] + ]); + }); + } catch (Exception $e) { + return app('json')->fail($e->getMessage()); + } + + return app('json')->success($params); + } +} diff --git a/route/api.php b/route/api.php index ff9c030b..6cd8411a 100644 --- a/route/api.php +++ b/route/api.php @@ -77,6 +77,9 @@ Route::group('api/', function () { Route::post('user/margin', 'api.Auth/doMargin'); Route::get('user/margin/list', 'api.Auth/marginList'); + //绑定推荐人 + Route::post('zhibo/reward', 'api.user.Zhibo/reward'); + //优惠券 Route::group('coupon', function () { Route::post('receive/:id', 'api.store.product.StoreCoupon/receiveCoupon'); From f537c3b18c247f9b7d99217379d4f390c1650891 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 12:56:33 +0800 Subject: [PATCH 07/38] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E6=89=93=E8=B5=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 48 +++++++++++++++++++++++++++---- route/api.php | 3 +- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 2d7a3299..f835311b 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -65,9 +65,9 @@ class Zhibo extends BaseController $userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward', [ 'link_id' => $orderId, 'status' => 1, - 'title' => '直播打赏支出', + 'title' => '直播送礼支出', 'number' => $params['amount'], - 'mark' => '余额打赏', + 'mark' => '余额送礼', 'balance' => $user->now_money ]); //主播加钱 @@ -77,16 +77,52 @@ class Zhibo extends BaseController $userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward', [ 'link_id' => $orderId, 'status' => 1, - 'title' => '直播打赏收入', + 'title' => '直播送礼收入', 'number' => $params['amount'], - 'mark' => '直播打赏收入', + 'mark' => '直播送礼收入', 'balance' => $master['now_money'] ]); }); } catch (Exception $e) { return app('json')->fail($e->getMessage()); } - - return app('json')->success($params); + return app('json')->success('送礼成功'); + } + + public function rewardList() + { + [$page, $limit] = $this->getPage(); + $params = $this->request->params(['type']); + if (empty($params['type'])) { + return app('json')->fail('类型不能为空'); + } + $user = $this->request->userInfo(); + $where = []; + if ($params['type'] == 1) { + // 送出的礼物 + $where['ub.pm'] = 0; + $where['ub.type'] = 'zhibo_reward'; + $where['uzo.uid'] = $user['uid']; + } elseif ($params['type'] == 2){ + // 收到的礼物 + $where['ub.pm'] = 1; + $where['ub.type'] = 'zhibo_reward'; + $where['uzo.master_id'] = $user['uid']; + } else { + return app('json')->fail('类型错误'); + } + $count = Db::name('user_bill')->alias('ub')->leftJoin('user_zhibo_order uzo','uzo.order_id = ub.link_id')->where($where)->count(); + $list = Db::name('user_bill')->alias('ub')->leftJoin('user_zhibo_order uzo','uzo.order_id = ub.link_id')->where($where)->limit(($page-1) * $limit, $limit)->field([ + 'uzo.order_id', + 'uzo.live_stream_id', + 'uzo.live_name', + 'uzo.gift_id', + 'uzo.gift_name', + 'uzo.order_sn', + 'uzo.amount', + 'ub.title', + 'uzo.create_time' + ])->fetchSql(false)->select(); + return app('json')->success(compact('count', 'list')); } } diff --git a/route/api.php b/route/api.php index 6cd8411a..731c9bf1 100644 --- a/route/api.php +++ b/route/api.php @@ -77,8 +77,9 @@ Route::group('api/', function () { Route::post('user/margin', 'api.Auth/doMargin'); Route::get('user/margin/list', 'api.Auth/marginList'); - //绑定推荐人 + Route::post('zhibo/reward', 'api.user.Zhibo/reward'); + Route::get('zhibo/rewardList', 'api.user.Zhibo/rewardList'); //优惠券 Route::group('coupon', function () { From 1bb20f2a9d73bf837e918eb119ba3493213642ff Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 14:17:47 +0800 Subject: [PATCH 08/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 51 ++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index f835311b..99b70d6c 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -19,6 +19,8 @@ use think\exception\HttpResponseException; use think\exception\ValidateException; use think\facade\Db; use think\response\Json; +use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Client; /** * Class Auth @@ -28,18 +30,36 @@ use think\response\Json; */ class Zhibo extends BaseController { + //用户直播送礼 public function reward() { $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id']); - $user = $this->request->userInfo(); - $params['live_name'] = '直播间名称'; - $params['gift_name'] = '礼物名称'; - $params['amount'] = 10; - if ($params['amount'] > $user['now_money']) { - return app('json')->fail('用户余额不足'); + $user = $this->request->userInfo(); + if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id'])) { + return app('json')->fail('live_stream_id, master_id, gift_id 参数不能为空'); } + $token = request()->header('x-token'); //查询直播间及礼物接口,验证直播间信息及礼物信息 - + $checkUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; + $client = new Client(); + $response = $client->request('POST', $checkUrl, [ + 'verify' => false, + 'headers' => ['X-Token' => $token], + 'json' => [ + "live_stream_id" => $params['live_stream_id'], + "master_id" => $params['master_id'], + "gift_id" => $params['gift_id'] + ] + ]); + $responseData = json_decode($response->getBody()->getContents(), true); + if (empty($responseData['code'])) { + $failMsg = $responseData['msg']; + return app('json')->fail($failMsg); + } + $giftData = $responseData['data']; + $params['live_name'] = $giftData['live_name']; + $params['gift_name'] = $giftData['gift_name']; + $params['amount'] = $giftData['gift_price']; try { Db::transaction(function () use ($user, $params) { //打赏订单 @@ -86,12 +106,27 @@ class Zhibo extends BaseController } catch (Exception $e) { return app('json')->fail($e->getMessage()); } + $message = "{$user['nickname']}送出了{$params['gift_name']}"; + //发送礼物消息 + $giftUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; + $client = new Client(); + $client->request('POST', $giftUrl, [ + 'verify' => false, + 'headers' => ['X-Token' => $token], + 'json' => [ + "live_stream_id" => $params['live_stream_id'], + "app_name" => 'shop', + "message" => $message + ] + ]); return app('json')->success('送礼成功'); } + //用户送礼收礼记录 public function rewardList() { [$page, $limit] = $this->getPage(); + $token = request()->header('x-token'); $params = $this->request->params(['type']); if (empty($params['type'])) { return app('json')->fail('类型不能为空'); @@ -112,7 +147,7 @@ class Zhibo extends BaseController return app('json')->fail('类型错误'); } $count = Db::name('user_bill')->alias('ub')->leftJoin('user_zhibo_order uzo','uzo.order_id = ub.link_id')->where($where)->count(); - $list = Db::name('user_bill')->alias('ub')->leftJoin('user_zhibo_order uzo','uzo.order_id = ub.link_id')->where($where)->limit(($page-1) * $limit, $limit)->field([ + $list = Db::name('user_bill')->alias('ub')->leftJoin('user_zhibo_order uzo','uzo.order_id = ub.link_id')->where($where)->limit(($page-1) * $limit, $limit)->field([ 'uzo.order_id', 'uzo.live_stream_id', 'uzo.live_name', From 4585d22a500e96730b201b2989bbd30015b58be1 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 26 Oct 2023 15:08:25 +0800 Subject: [PATCH 09/38] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E9=87=91=E6=94=B9?= =?UTF-8?q?=E6=8A=BC=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/system/merchant/MerchantTypeDao.php | 2 +- .../store/order/StoreOrderRepository.php | 2 +- .../system/financial/FinancialRepository.php | 14 ++++---- .../merchant/FinancialRecordRepository.php | 10 +++--- .../merchant/MerchantIntentionRepository.php | 2 +- .../system/merchant/MerchantRepository.php | 34 +++++++++---------- .../merchant/MerchantTypeRepository.php | 2 +- .../system/serve/ServeOrderRepository.php | 6 ++-- .../admin/system/merchant/MerchantMargin.php | 4 +-- .../admin/system/merchant/MerchantType.php | 2 +- app/controller/api/Auth.php | 2 +- .../api/store/merchant/Merchant.php | 2 +- app/controller/merchant/system/Merchant.php | 2 +- app/listener/AfterRefund.php | 6 ++-- app/listener/paySuccessMargin.php | 6 ++-- app/validate/admin/MerchantTypeValidate.php | 4 +-- app/validate/admin/MerchantValidate.php | 4 +-- config/notice.php | 4 +-- config/sms.php | 8 ++--- crmeb/services/ExcelService.php | 4 +-- crmeb/services/SmsService.php | 4 +-- route/admin/merchant.php | 8 ++--- route/api.php | 2 +- route/merchant/accounts.php | 2 +- 24 files changed, 68 insertions(+), 68 deletions(-) diff --git a/app/common/dao/system/merchant/MerchantTypeDao.php b/app/common/dao/system/merchant/MerchantTypeDao.php index 8d69652c..bf5d2149 100644 --- a/app/common/dao/system/merchant/MerchantTypeDao.php +++ b/app/common/dao/system/merchant/MerchantTypeDao.php @@ -55,7 +55,7 @@ class MerchantTypeDao extends BaseDao [ 'type' => 'div', 'children' => [ - '保证金:' . $item['margin']. ' 元' + '押金:' . $item['margin']. ' 元' ], 'style' => [ 'paddingTop' => '100px', diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index e822e3a3..c1af5c51 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -375,7 +375,7 @@ class StoreOrderRepository extends BaseRepository 'financial_record_sn' => $financeSn . ($i++) ]; } - //保证金计算 + //押金计算 if ($_payPrice > 0) { /** @var MerchantRepository $merchantRepo */ $merchantRepo = app()->make(MerchantRepository::class); diff --git a/app/common/repositories/system/financial/FinancialRepository.php b/app/common/repositories/system/financial/FinancialRepository.php index ae192965..db7f41d3 100644 --- a/app/common/repositories/system/financial/FinancialRepository.php +++ b/app/common/repositories/system/financial/FinancialRepository.php @@ -318,7 +318,7 @@ class FinancialRepository extends BaseRepository if ($res['is_margin'] == -1) throw new ValidateException('请勿重复申请'); if (!in_array($res['is_margin'],[10,-10]) || $res['paid_margin'] <= 0) - throw new ValidateException('无可退保证金'); + throw new ValidateException('无可退押金'); $order = app()->make(ServeOrderRepository::class)->getWhere([ 'mer_id' => $res['mer_id'], @@ -327,7 +327,7 @@ class FinancialRepository extends BaseRepository ]); if (!$order) throw new ValidateException('未查询到支付订单'); $financial_account = [ - 'name' => '保证金退款', + 'name' => '押金退款', 'order_id' => $order['order_id'], 'order_sn' => $order['order_sn'], 'pay_price'=> $order['pay_price'], @@ -471,7 +471,7 @@ class FinancialRepository extends BaseRepository Elm::input('mer_name','商户名称', $data['merchant']->mer_name)->disabled(true), Elm::input('mer_id','商户ID', $data['mer_id'])->disabled(true), Elm::input('type_name','店铺类型', $data['merchant']->merchantType->type_name)->disabled(true), - Elm::input('pay_price','保证金额度', $data['merchant']->marginOrder->pay_price)->disabled(true), + Elm::input('pay_price','押金额度', $data['merchant']->marginOrder->pay_price)->disabled(true), Elm::input('sub','扣费金额', bcsub($data['merchant']->marginOrder->pay_price, $data['extract_money'], 2))->disabled(true), Elm::input('refund','退回金额', $data['extract_money'])->disabled(true), Elm::radio('status', '审核', -1)->setOptions([ @@ -485,7 +485,7 @@ class FinancialRepository extends BaseRepository ] ],]) ]); - return $form->setTitle('退保证金审核'); + return $form->setTitle('退押金审核'); } /** @@ -647,7 +647,7 @@ class FinancialRepository extends BaseRepository } /** - * TODO 同意退保证金 + * TODO 同意退押金 * @param $res * @author Qinii * @day 1/27/22 @@ -657,10 +657,10 @@ class FinancialRepository extends BaseRepository //验证 $comp = bccomp($res['financial_account']->pay_price, $res['extract_money'], 2); if ($comp == -1) - throw new ValidateException('申请退款金额:'.$res['extract_money'].',大于支付保证金:'.$res['financial_account']->pay_price); + throw new ValidateException('申请退款金额:'.$res['extract_money'].',大于支付押金:'.$res['financial_account']->pay_price); // if (bccomp($res['merchant']['margin'], $res['extract_money'],2) == -1) -// throw new ValidateException('申请退款金额:'.$res['extract_money'].',大于剩余保证金:'.$res['merchant']['margin']); +// throw new ValidateException('申请退款金额:'.$res['extract_money'].',大于剩余押金:'.$res['merchant']['margin']); Db::transaction(function () use ($res){ //退款 diff --git a/app/common/repositories/system/merchant/FinancialRecordRepository.php b/app/common/repositories/system/merchant/FinancialRecordRepository.php index e5fc2bc4..d8e9c534 100644 --- a/app/common/repositories/system/merchant/FinancialRecordRepository.php +++ b/app/common/repositories/system/merchant/FinancialRecordRepository.php @@ -254,7 +254,7 @@ class FinancialRecordRepository extends BaseRepository { //商户收入 $count = $this->dao->search($where)->where('financial_type', 'in', ['order', 'mer_presell'])->sum('number'); - //保证金 + //押金 $auto_margin = $this->dao->search($where)->where('financial_type', 'auto_margin')->sum('number'); $auto_margin_refund = $this->dao->search($where)->where('financial_type', 'auto_margin_refund')->sum('number'); //平台优惠券 @@ -330,7 +330,7 @@ class FinancialRecordRepository extends BaseRepository 'className' => 'el-icon-s-cooperation', 'count' => bcsub($auto_margin,$auto_margin_refund,2), 'field' => '元', - 'name' => '商户保证金金额' + 'name' => '商户押金金额' ], ]; return compact('stat'); @@ -490,7 +490,7 @@ class FinancialRecordRepository extends BaseRepository bcsub($expend['count_order_charge'], $expend['count_charge']). '笔', ], [ - '店铺保证金', + '店铺押金', $expend['number_auto_margin'] . '元', $expend['count_auto_margin'] . '笔' @@ -674,10 +674,10 @@ class FinancialRecordRepository extends BaseRepository $financialType = ['order_charge', 'presell_charge']; [$data['count_order_charge'], $data['number_order_charge']] = $this->dao->getDataByType($type, $where, $date, $financialType); - //商户保证金 + //商户押金 $financialType = ['auto_margin']; [$data['count_auto_margin'], $data['number_auto_margin']] = $this->dao->getDataByType($type, $where, $date, $financialType); - //商户保证金退回 + //商户押金退回 $financialType = ['auto_margin_refund']; [$data['count_auto_margin_refund'], $data['number_auto_margin_refund']] = $this->dao->getDataByType($type, $where, $date, $financialType); $number3 = bcsub($data['number_auto_margin'], $data['number_auto_margin_refund'], 2); diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index c4f5c0a6..56b33a80 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -137,7 +137,7 @@ class MerchantIntentionRepository extends BaseRepository 'is_bro_goods' => $config['broadcast_goods_type'] == 1 ? 0 : 1, 'mer_password' => $password, 'is_margin' => $margin['is_margin'] ?? -1, - // 用户需缴纳保证金 + // 用户需缴纳押金 'margin' => $margin['margin'] ?? 0, 'uid' => $intention['uid'], 'reg_admin_id' => $autoCreate ? 0: request()->adminId(), diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index fe25a159..4060b1ca 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -66,14 +66,14 @@ use think\Model; class MerchantRepository extends BaseRepository { - const WithoutMargin = 0; //不需要保证金 - const NeedMargin = 1; //需要保证金 - const PaidMargin = 10; //已支付保证金 - const RefundMargin = -1; //申请退还保证金 - const RefuseMargin = -10; //拒绝退还保证金 + const WithoutMargin = 0; //不需要押金 + const NeedMargin = 1; //需要押金 + const PaidMargin = 10; //已支付押金 + const RefundMargin = -1; //申请退还押金 + const RefuseMargin = -10; //拒绝退还押金 public $merId; - public $forceMargin = false; //强制扣除保证金 + public $forceMargin = false; //强制扣除押金 /** * MerchantRepository constructor. @@ -622,17 +622,17 @@ class MerchantRepository extends BaseRepository { $merchant = $this->dao->get($id); if ($merchant->is_margin !== 10) { - throw new ValidateException('商户无保证金可扣'); + throw new ValidateException('商户无押金可扣'); } $form = Elm::createForm(Route::buildUrl('systemMarginSet')->build()); $form->setRule([ Elm::input('mer_name', '商户名称', $merchant->mer_name)->disabled(true), Elm::input('mer_id', '商户ID', $merchant->mer_id)->disabled(true), - Elm::input('margin', '商户剩余保证金', $merchant->paid_margin)->disabled(true), - Elm::number('number', '保证金扣除金额', 0)->max($merchant->paid_margin)->precision(2)->required(), - Elm::text('mark', '保证金扣除原因')->required(), + Elm::input('margin', '商户剩余押金', $merchant->paid_margin)->disabled(true), + Elm::number('number', '押金扣除金额', 0)->max($merchant->paid_margin)->precision(2)->required(), + Elm::text('mark', '押金扣除原因')->required(), ]); - return $form->setTitle('扣除保证金'); + return $form->setTitle('扣除押金'); } /** @@ -646,14 +646,14 @@ class MerchantRepository extends BaseRepository { $merechant = $this->dao->get($data['mer_id']); if ($merechant->is_margin !== 10) { - throw new ValidateException('商户未支付保证金或已申请退款'); + throw new ValidateException('商户未支付押金或已申请退款'); } if ($data['number'] < 0) { - throw new ValidateException('扣除保证金额不能小于0'); + throw new ValidateException('扣除押金额不能小于0'); } if (bccomp($merechant->paid_margin, $data['number'], 2) == -1) { - throw new ValidateException('扣除保证金额不足'); + throw new ValidateException('扣除押金额不足'); } $data['balance'] = bcsub($merechant->paid_margin, $data['number'], 2); @@ -679,7 +679,7 @@ class MerchantRepository extends BaseRepository } /** - * 自动扣除保证金 + * 自动扣除押金 * @param $income * @param $order * @param $finance @@ -691,12 +691,12 @@ class MerchantRepository extends BaseRepository { $merchant = Merchant::find($this->merId); $margin_type = Db::name('MerchantType')->where('mer_type_id', $merchant['type_id'])->value('margin'); - //商户保证金大于支付保证金 或者forceMargin==false 直接返回 不计算保证金 + //商户押金大于支付押金 或者forceMargin==false 直接返回 不计算押金 if ($merchant['paid_margin']>= $margin_type|| ($this->forceMargin === false && $merchant['auto_margin_rate'] == 0)) { return [$income, $finance, false]; } $rate = $this->forceMargin ? 100 : $merchant['auto_margin_rate']; - // //商户保证金未完全缴纳且设置了自动扣除比例 + // //商户押金未完全缴纳且设置了自动扣除比例 $margin= bcmul($income, bcdiv($rate, 100,2), 2); // $margin = min(bcsub($margin, $merchant['paid_margin'], 2), $margin); // $income = max(bcsub($income, $margin, 2), 0); diff --git a/app/common/repositories/system/merchant/MerchantTypeRepository.php b/app/common/repositories/system/merchant/MerchantTypeRepository.php index 3f8cd45c..bbf1c2a5 100644 --- a/app/common/repositories/system/merchant/MerchantTypeRepository.php +++ b/app/common/repositories/system/merchant/MerchantTypeRepository.php @@ -124,7 +124,7 @@ class MerchantTypeRepository extends BaseRepository $make = app()->make(RelevanceRepository::class); $make->batchDelete($id, RelevanceRepository::TYPE_MERCHANT_AUTH); $make->insertAll($inserts); - //更新未交保证金的商户 + //更新未交押金的商户 app()->make(MerchantRepository::class)->updateMargin($id, $data['margin'], $data['is_margin']); }); } diff --git a/app/common/repositories/system/serve/ServeOrderRepository.php b/app/common/repositories/system/serve/ServeOrderRepository.php index be43a534..93d3d497 100644 --- a/app/common/repositories/system/serve/ServeOrderRepository.php +++ b/app/common/repositories/system/serve/ServeOrderRepository.php @@ -38,7 +38,7 @@ class ServeOrderRepository extends BaseRepository const TYPE_COPY_PRODUCT = 1; //电子面单 const TYPE_DUMP = 2; - //保证金 margin + //押金 margin const TYPE_MARGIN = 10; //同城配送delivery const TYPE_DELIVERY = 20; @@ -83,7 +83,7 @@ class ServeOrderRepository extends BaseRepository } /** - * TODO 商户保证金 支付 + * TODO 商户押金 支付 * @param $merId * @param $data * @return array @@ -93,7 +93,7 @@ class ServeOrderRepository extends BaseRepository public function margin($merId, $data) { $ret = app()->make(MerchantRepository::class)->get($merId); - if ($ret['is_margin'] !== 1) throw new ValidateException('此商户无需支付保证金'); + if ($ret['is_margin'] !== 1) throw new ValidateException('此商户无需支付押金'); $key = 'Margin_'.$merId.'_'.date('YmdH',time()); $arr = [ 'type_id' => $ret['type_id'], diff --git a/app/controller/admin/system/merchant/MerchantMargin.php b/app/controller/admin/system/merchant/MerchantMargin.php index f10a0fb6..f3db825b 100644 --- a/app/controller/admin/system/merchant/MerchantMargin.php +++ b/app/controller/admin/system/merchant/MerchantMargin.php @@ -67,11 +67,11 @@ class MerchantMargin extends BaseController public function setMargin() { $data = $this->request->params(['mer_id','number',['type','mer_margin'],'mark']); - $data['title'] = '保证金扣除'; + $data['title'] = '押金扣除'; if ($data['number'] < 0) return app('json')->fail('扣除金额不能小于0'); app()->make(MerchantRepository::class)->setMargin($data); - return app('json')->success('扣除保证金成功'); + return app('json')->success('扣除押金成功'); } } diff --git a/app/controller/admin/system/merchant/MerchantType.php b/app/controller/admin/system/merchant/MerchantType.php index a1a63080..4ac19bf9 100644 --- a/app/controller/admin/system/merchant/MerchantType.php +++ b/app/controller/admin/system/merchant/MerchantType.php @@ -95,7 +95,7 @@ class MerchantType extends BaseController $validate = app()->make(MerchantTypeValidate::class); $validate->check($data); if ($data['is_margin'] == 1) { - if ($data['margin'] <= 0) throw new ValidateException('保证金必须大于0'); + if ($data['margin'] <= 0) throw new ValidateException('押金必须大于0'); } else { $data['margin'] = 0; } diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index f5f23caf..118bb9e5 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -391,7 +391,7 @@ class Auth extends BaseController return app('json')->fail('没有店铺'); } if ($merchant['is_margin'] == 10) { - return app('json')->fail('保证金已缴纳'); + return app('json')->fail('押金已缴纳'); } if ($merchant['margin'] == 0) { $margin = Db::name('MerchantType')->where('mer_type_id', $merchant['type_id'])->value('margin'); diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 4acf62db..8bfa340e 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -215,7 +215,7 @@ class Merchant extends BaseController $data = $this->request->params(['mer_state']); if ($merchant['is_margin'] == 1 && $data['mer_state'] == 1) - return app('json')->fail('开启店铺前请先支付保证金'); + return app('json')->fail('开启店铺前请先支付押金'); if ($data['mer_state'] && !$merchant['sub_mchid'] && systemConfig('open_wx_combine')) return app('json')->fail('开启店铺前请先完成微信子商户入驻'); diff --git a/app/controller/merchant/system/Merchant.php b/app/controller/merchant/system/Merchant.php index 9d4608ce..f1d02b1e 100644 --- a/app/controller/merchant/system/Merchant.php +++ b/app/controller/merchant/system/Merchant.php @@ -122,7 +122,7 @@ class Merchant extends BaseController $data = $this->request->params(['mer_state']); if ($merchant->is_margin == 1 && $data['mer_state'] == 1) - return app('json')->fail('开启店铺前请先支付保证金'); + return app('json')->fail('开启店铺前请先支付押金'); if ($data['mer_state'] && !$merchant->sub_mchid && systemConfig('open_wx_combine')) return app('json')->fail('开启店铺前请先完成微信子商户入驻'); diff --git a/app/listener/AfterRefund.php b/app/listener/AfterRefund.php index 7dabc617..5c55cc7a 100644 --- a/app/listener/AfterRefund.php +++ b/app/listener/AfterRefund.php @@ -34,7 +34,7 @@ class AfterRefund if (in_array($financialRecord['financial_type'], ['commission_to_cloud_warehouse', 'commission_to_entry_merchant', 'commission_to_service_team', 'commission_to_village', 'commission_to_town', ])) { //佣金类型的退还佣金 if ($financialRecord['financial_type'] == 'commission_to_entry_merchant') { - //入口店铺的佣金,如果有保证金,不退佣金 + //入口店铺的佣金,如果有押金,不退佣金 $isMargin = $this->isMargin($financialRecords, $financialRecord['mer_id']); if (!$isMargin) { $this->subMoney($financialRecord); @@ -49,7 +49,7 @@ class AfterRefund } if ($financialRecord['financial_type'] == 'auto_margin') { Log::info("refundMargin, mer_id: {$financialRecord['mer_id']}, money: {$financialRecord['number']}"); - //保证金类型的扣除保证金 + //押金类型的扣除押金 ServeOrder::getInstance()->where('store_order_id', $financialRecord['order_id'])->update(['is_del' => 1]); $merchant = app()->make(MerchantDao::class)->get($financialRecord['mer_id']); $merchant->paid_margin = max(bcsub($merchant['paid_margin'], $financialRecord['number'], 2), 0); @@ -65,7 +65,7 @@ class AfterRefund } /** - * 是否有保证金 + * 是否有押金 * @param $financialRecords * @param $merId * @return bool diff --git a/app/listener/paySuccessMargin.php b/app/listener/paySuccessMargin.php index cb4bb2a4..79f068e1 100644 --- a/app/listener/paySuccessMargin.php +++ b/app/listener/paySuccessMargin.php @@ -14,7 +14,7 @@ class paySuccessMargin public $event; public function handle($event) { - Log::info('微信支付保证金成功回调' . json_encode($event)); + Log::info('微信支付押金成功回调' . json_encode($event)); Db::startTrans(); try { $order_sn = $event['order_sn']; @@ -27,7 +27,7 @@ class paySuccessMargin $merchantInfo = Db::name('merchant')->where('mer_id', $marginInfo['mer_id'])->where('uid', $marginInfo['uid'])->find(); $merchant_type = Db::name('merchant_type')->where('mer_type_id', $merchantInfo['type_id'])->find(); - //已支付的保证金 + //已支付的押金 $paidMarginAmount = bcadd($merchantInfo['paid_margin'], $marginInfo['total_price'], 2); Db::name('merchant')->where('mer_id', $marginInfo['mer_id'])->where('uid', $marginInfo['uid'])->update([ 'paid_margin' => $paidMarginAmount,'ot_margin'=>$paidMarginAmount @@ -45,7 +45,7 @@ class paySuccessMargin // 提交事务 Db::commit(); } catch (\Exception $e) { - Log::error('微信支付保证金失败' . $e->getMessage()); + Log::error('微信支付押金失败' . $e->getMessage()); // 回滚事务 Db::rollback(); } diff --git a/app/validate/admin/MerchantTypeValidate.php b/app/validate/admin/MerchantTypeValidate.php index e02bd476..dd78b6d9 100644 --- a/app/validate/admin/MerchantTypeValidate.php +++ b/app/validate/admin/MerchantTypeValidate.php @@ -22,9 +22,9 @@ class MerchantTypeValidate extends Validate protected $rule = [ 'type_name|店铺类型名称' => 'require|max:5', 'type_info|店铺类型要求' => 'max:256', - 'is_margin|是否有保证金' => 'require|in:0,1', + 'is_margin|是否有押金' => 'require|in:0,1', 'auth|权限' => 'require|array|min:1', - 'margin|保证金(¥)' => 'requireIf:is_margin,1', + 'margin|押金(¥)' => 'requireIf:is_margin,1', 'description|其他说明' => 'max:256', ]; } diff --git a/app/validate/admin/MerchantValidate.php b/app/validate/admin/MerchantValidate.php index 3bc6da5c..82260cc7 100644 --- a/app/validate/admin/MerchantValidate.php +++ b/app/validate/admin/MerchantValidate.php @@ -51,8 +51,8 @@ class MerchantValidate extends Validate 'is_bro_room|直播间状态' => 'require|in:0,1', 'is_trader|自营状态' => 'require|in:0,1', 'commission_rate|提成比例' => '>=:0', - 'auto_margin_rate|自动扣除保证金比例' => '>=:0', - 'paid_margin|已支付的保证金' => '>=:0', + 'auto_margin_rate|自动扣除押金比例' => '>=:0', + 'paid_margin|已支付的押金' => '>=:0', ]; /** diff --git a/config/notice.php b/config/notice.php index 12032058..fef55578 100644 --- a/config/notice.php +++ b/config/notice.php @@ -62,9 +62,9 @@ return [ 'APPLYMENTS_FAIL' => 550523, //商户申请分账待验证 'APPLYMENTS_SIGN' => 550525, - //商户申请退回保证金通过 + //商户申请退回押金通过 'REFUND_MARGIN_SUCCESS' => 710327, - //商户申请退回保证金未通过 + //商户申请退回押金未通过 'REFUND_MARGIN_FAIL' => 710328, ], //微信 diff --git a/config/sms.php b/config/sms.php index c263063e..bbd24134 100644 --- a/config/sms.php +++ b/config/sms.php @@ -72,9 +72,9 @@ return [ 'APPLYMENTS_SIGN' => 550525, //商户申请分账未通过 2.1 'APPLYMENTS_FAIL' => 550523, - //商户申请退回保证金通过 2.1 + //商户申请退回押金通过 2.1 'REFUND_MARGIN_SUCCESS' => 710327, - //商户申请退回保证金未通过 2.1 + //商户申请退回押金未通过 2.1 'REFUND_MARGIN_FAIL' => 710328, //付费会员充值成功提醒 2.1 'SVIP_PAY_SUCCESS' => 856046 @@ -130,9 +130,9 @@ return [ 'APPLYMENTS_FAIL' => '', //商户申请分账待验证 'APPLYMENTS_SIGN' => '', - //商户申请退回保证金通过 + //商户申请退回押金通过 'REFUND_MARGIN_SUCCESS' => '', - //商户申请退回保证金未通过 + //商户申请退回押金未通过 'REFUND_MARGIN_FAIL' => '', ], ] diff --git a/crmeb/services/ExcelService.php b/crmeb/services/ExcelService.php index af286481..49863f0f 100644 --- a/crmeb/services/ExcelService.php +++ b/crmeb/services/ExcelService.php @@ -354,7 +354,7 @@ class ExcelService 'order_presell' => '预售订单(定金)', 'refund_platform_coupon' => '退回优惠券补贴', 'order_platform_coupon' => '优惠券补贴', - 'auto_margin' => '保证金', + 'auto_margin' => '押金', 'commission_to_service_team' => '订单平台佣金', 'commission_to_platform' => '订单剩余平台手续费', 'commission_to_village' => '订单平台佣金', @@ -363,7 +363,7 @@ class ExcelService 'commission_to_platform_refund' => '退回剩余平台手续费', 'commission_to_village_refund' => '退回平台佣金', 'commission_to_town_refund' => '退回平台佣金', - 'auto_margin_refund' => '退回保证金', + 'auto_margin_refund' => '退回押金', 'commission_to_entry_merchant' => '订单平台佣金', 'commission_to_cloud_warehouse' => '订单平台佣金', 'commission_to_entry_merchant_refund' => '退回平台佣金', diff --git a/crmeb/services/SmsService.php b/crmeb/services/SmsService.php index b40079b2..b2c421ff 100644 --- a/crmeb/services/SmsService.php +++ b/crmeb/services/SmsService.php @@ -261,10 +261,10 @@ class SmsService 'site' => systemConfig('site_name'), ]); break; - //保证金退回申请通过通知 2.1 + //押金退回申请通过通知 2.1 case 'REFUND_MARGIN_SUCCESS': //nobreak; - //保证金退回申请未通过通知 2.1 + //押金退回申请未通过通知 2.1 case 'REFUND_MARGIN_FAIL': self::create()->send($id['phone'], $tempId, ['name' => $id['name'], 'time' => $id['time'],]); break; diff --git a/route/admin/merchant.php b/route/admin/merchant.php index aca5917c..931e4a7b 100644 --- a/route/admin/merchant.php +++ b/route/admin/merchant.php @@ -193,7 +193,7 @@ Route::group(function () { '_auth' => true, ]); - //保证金 + //押金 Route::group('margin', function () { //缴纳记录 Route::get('lst', 'merchant.MerchantMargin/lst')->name('systemMerchantMarginLst')->option([ @@ -204,14 +204,14 @@ Route::group(function () { '_alias' => '扣费记录', ]); - //扣除保证金 + //扣除押金 Route::get('set/:id/form', 'merchant.MerchantMargin/setMarginForm')->name('systemMarginSetForm')->option([ - '_alias' => '扣除保证金表单', + '_alias' => '扣除押金表单', '_auth' => false, '_form' => 'systemMarginSet', ]); Route::post('set', 'merchant.MerchantMargin/setMargin')->name('systemMarginSet')->option([ - '_alias' => '扣除保证金', + '_alias' => '扣除押金', ]); //退款申请 diff --git a/route/api.php b/route/api.php index ff9c030b..55b0a923 100644 --- a/route/api.php +++ b/route/api.php @@ -73,7 +73,7 @@ Route::group('api/', function () { //绑定推荐人 Route::post('user/spread', 'api.Auth/spread'); - //用户缴纳保证金 + //用户缴纳押金 Route::post('user/margin', 'api.Auth/doMargin'); Route::get('user/margin/list', 'api.Auth/marginList'); diff --git a/route/merchant/accounts.php b/route/merchant/accounts.php index 6614aa6e..56e1083b 100644 --- a/route/merchant/accounts.php +++ b/route/merchant/accounts.php @@ -19,7 +19,7 @@ Route::group(function () { Route::group('financial', function () { Route::post('refund/margin', 'Financial/refundMargin')->name('merchantFinancialRefundMargin')->option([ - '_alias' => '退保证金申请', + '_alias' => '退押金申请', ]); })->prefix('merchant.system.financial.')->option([ '_path' => 'merchant/margin', From 4e636821d43a342394fdff4026bd23b5c7051005 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 26 Oct 2023 15:10:47 +0800 Subject: [PATCH 10/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 118bb9e5..cf1b61bb 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -385,6 +385,7 @@ class Auth extends BaseController public function doMargin() { + return app('json')->fail('线上缴纳调整中,请在线下缴纳'); $user = $this->request->userInfo(); $merchant = Db::name('merchant')->where('uid', $user['uid'])->where('status', 1)->find(); if (!$merchant) { From bd8f3a5725450f20d2d5b39bafb22ec66ad69381 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 26 Oct 2023 15:35:54 +0800 Subject: [PATCH 11/38] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A7=94=E6=89=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 11c91363..548cd5ba 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -800,13 +800,17 @@ class Community extends BaseController if (!$communityInfo) { return app('json')->fail('委托商品不存在'); } - $uid = $this->request->uid(); - $communityInfo['mer_info'] = Db::name('merchant')->where('uid', $uid)->where('is_del', 0)->field(['mer_id', 'mer_name', 'mer_address', 'mer_avatar', 'settle_cycle', 'interest_rate'])->find(); + // $uid = $this->request->uid(); + $entrust = Db::name('entrust')->where('community_id', $id)->where('is_del', 0)->find(); + if (!$entrust) { + return app('json')->fail('委托商品不存在'); + } + $entrustDay=$entrust['entrust_day']; + $communityInfo['mer_info'] = Db::name('merchant')->where('mer_id', $entrust['mer_id'])->where('is_del', 0)->field(['mer_id', 'mer_name', 'mer_address', 'mer_avatar', 'settle_cycle', 'interest_rate'])->find(); $communityInfo['entrust_mer_info'] = Db::name('merchant')->where('mer_id', $communityInfo['entrust_mer_id'])->where('is_del', 0)->field(['mer_id', 'mer_name', 'mer_address', 'mer_avatar'])->find(); if (empty($communityInfo['mer_info']) || empty($communityInfo['entrust_mer_info'])) { return app('json')->fail('无权限查看委托商品'); } - $entrustDay = Db::name('entrust')->where('community_id', $id)->where('is_del', 0)->value('entrust_day'); $communityInfo['entrust_day'] = $entrustDay; $communityInfo['product_list'] = Db::name('entrust')->alias('e')->leftJoin('store_product sp','e.product_id = sp.product_id')->leftJoin('store_product_attr_value spav','spav.unique = e.product_attr_unique')->where('e.community_id', $id)->where('sp.is_del', 0)->setOption('field', [])->field(['e.product_id, e.product_attr_unique, e.number, e.price, e.status, spav.price as old_price, sp.store_name, sp.image'])->select(); if ($communityInfo['product_list']) $communityInfo['product_list'] = $communityInfo['product_list']->toArray(); From 69948eed13333df3d50efab5f9fc8cd2d0f77efc Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 15:39:42 +0800 Subject: [PATCH 12/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 99b70d6c..97b424fe 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -30,6 +30,9 @@ use GuzzleHttp\Client; */ class Zhibo extends BaseController { + private $checkUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; + private $giftUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; + //用户直播送礼 public function reward() { @@ -40,9 +43,8 @@ class Zhibo extends BaseController } $token = request()->header('x-token'); //查询直播间及礼物接口,验证直播间信息及礼物信息 - $checkUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; $client = new Client(); - $response = $client->request('POST', $checkUrl, [ + $response = $client->request('POST', $this->checkUrl, [ 'verify' => false, 'headers' => ['X-Token' => $token], 'json' => [ @@ -106,16 +108,16 @@ class Zhibo extends BaseController } catch (Exception $e) { return app('json')->fail($e->getMessage()); } - $message = "{$user['nickname']}送出了{$params['gift_name']}"; //发送礼物消息 - $giftUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; + $message = "{$user['nickname']} 送出了 {$params['gift_name']}"; $client = new Client(); - $client->request('POST', $giftUrl, [ + $client->request('POST', $this->giftUrl, [ 'verify' => false, 'headers' => ['X-Token' => $token], 'json' => [ "live_stream_id" => $params['live_stream_id'], "app_name" => 'shop', + "gift_id" => $params['gift_id'], "message" => $message ] ]); @@ -131,7 +133,7 @@ class Zhibo extends BaseController if (empty($params['type'])) { return app('json')->fail('类型不能为空'); } - $user = $this->request->userInfo(); + $user = $this->request->userInfo(); $where = []; if ($params['type'] == 1) { // 送出的礼物 @@ -157,7 +159,7 @@ class Zhibo extends BaseController 'uzo.amount', 'ub.title', 'uzo.create_time' - ])->fetchSql(false)->select(); + ])->select(); return app('json')->success(compact('count', 'list')); } } From a7973a471fce40456a04bcf62afd7fd578895b88 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 15:56:14 +0800 Subject: [PATCH 13/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 97b424fe..2c850fa2 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -62,6 +62,9 @@ class Zhibo extends BaseController $params['live_name'] = $giftData['live_name']; $params['gift_name'] = $giftData['gift_name']; $params['amount'] = $giftData['gift_price']; + if ($params['amount'] > $user['now_money']) { + return app('json')->fail('余额不足'); + } try { Db::transaction(function () use ($user, $params) { //打赏订单 From d6d31ba1fdbf4f4e052d512ff4dc7225ba2cc5c9 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:05:43 +0800 Subject: [PATCH 14/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 2c850fa2..77b0362b 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -30,8 +30,8 @@ use GuzzleHttp\Client; */ class Zhibo extends BaseController { - private $checkUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; - private $giftUrl = 'https://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; + private $checkUrl = 'http://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; + private $giftUrl = 'http://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; //用户直播送礼 public function reward() From 7395229cff24c068db92dfced1aea17dfb22ef49 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:11:27 +0800 Subject: [PATCH 15/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 77b0362b..e9d0d002 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -43,16 +43,23 @@ class Zhibo extends BaseController } $token = request()->header('x-token'); //查询直播间及礼物接口,验证直播间信息及礼物信息 - $client = new Client(); - $response = $client->request('POST', $this->checkUrl, [ - 'verify' => false, - 'headers' => ['X-Token' => $token], - 'json' => [ - "live_stream_id" => $params['live_stream_id'], - "master_id" => $params['master_id'], - "gift_id" => $params['gift_id'] - ] - ]); + + try { + $client = new Client(); + $response = $client->request('POST', $this->checkUrl, [ + 'timeout' => 5, + 'verify' => false, + 'headers' => ['X-Token' => $token], + 'json' => [ + "live_stream_id" => $params['live_stream_id'], + "master_id" => $params['master_id'], + "gift_id" => $params['gift_id'] + ] + ]); + $responseData = json_decode($response->getBody()->getContents(), true); + } catch (RequestException $e) { + return app('json')->fail($e->getMessage()); + } $responseData = json_decode($response->getBody()->getContents(), true); if (empty($responseData['code'])) { $failMsg = $responseData['msg']; From 6bc794b48b2107f2ec34db518cb3a3ff0f5de3d5 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:18:47 +0800 Subject: [PATCH 16/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index e9d0d002..139daac3 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -47,8 +47,8 @@ class Zhibo extends BaseController try { $client = new Client(); $response = $client->request('POST', $this->checkUrl, [ - 'timeout' => 5, - 'verify' => false, + // 'timeout' => 5, + 'verify' => false, 'headers' => ['X-Token' => $token], 'json' => [ "live_stream_id" => $params['live_stream_id'], @@ -122,9 +122,9 @@ class Zhibo extends BaseController $message = "{$user['nickname']} 送出了 {$params['gift_name']}"; $client = new Client(); $client->request('POST', $this->giftUrl, [ - 'verify' => false, + 'verify' => false, 'headers' => ['X-Token' => $token], - 'json' => [ + 'json' => [ "live_stream_id" => $params['live_stream_id'], "app_name" => 'shop', "gift_id" => $params['gift_id'], From 65f446913900a3d781955f2ba387dd5eaed2c896 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:42:27 +0800 Subject: [PATCH 17/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 46 +------------------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 139daac3..836b2df5 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -30,45 +30,14 @@ use GuzzleHttp\Client; */ class Zhibo extends BaseController { - private $checkUrl = 'http://ceshi-zhibo.lihaink.cn/api/zhibo/checkGift'; - private $giftUrl = 'http://ceshi-zhibo.lihaink.cn/api/zhibo/sendGiftMessage'; - //用户直播送礼 public function reward() { $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id']); $user = $this->request->userInfo(); if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id'])) { - return app('json')->fail('live_stream_id, master_id, gift_id 参数不能为空'); + return app('json')->fail('live_stream_id, master_id, gift_id, live_name, gift_name, amount 参数不能为空'); } - $token = request()->header('x-token'); - //查询直播间及礼物接口,验证直播间信息及礼物信息 - - try { - $client = new Client(); - $response = $client->request('POST', $this->checkUrl, [ - // 'timeout' => 5, - 'verify' => false, - 'headers' => ['X-Token' => $token], - 'json' => [ - "live_stream_id" => $params['live_stream_id'], - "master_id" => $params['master_id'], - "gift_id" => $params['gift_id'] - ] - ]); - $responseData = json_decode($response->getBody()->getContents(), true); - } catch (RequestException $e) { - return app('json')->fail($e->getMessage()); - } - $responseData = json_decode($response->getBody()->getContents(), true); - if (empty($responseData['code'])) { - $failMsg = $responseData['msg']; - return app('json')->fail($failMsg); - } - $giftData = $responseData['data']; - $params['live_name'] = $giftData['live_name']; - $params['gift_name'] = $giftData['gift_name']; - $params['amount'] = $giftData['gift_price']; if ($params['amount'] > $user['now_money']) { return app('json')->fail('余额不足'); } @@ -118,19 +87,6 @@ class Zhibo extends BaseController } catch (Exception $e) { return app('json')->fail($e->getMessage()); } - //发送礼物消息 - $message = "{$user['nickname']} 送出了 {$params['gift_name']}"; - $client = new Client(); - $client->request('POST', $this->giftUrl, [ - 'verify' => false, - 'headers' => ['X-Token' => $token], - 'json' => [ - "live_stream_id" => $params['live_stream_id'], - "app_name" => 'shop', - "gift_id" => $params['gift_id'], - "message" => $message - ] - ]); return app('json')->success('送礼成功'); } From 41c065d0edec232634f7b4fd36d10e75289b9648 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:43:58 +0800 Subject: [PATCH 18/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 836b2df5..14179d3a 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -35,7 +35,7 @@ class Zhibo extends BaseController { $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id']); $user = $this->request->userInfo(); - if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id'])) { + if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id']) || empty($params['live_name']) || empty($params['gift_name']) || empty($params['amount'])) { return app('json')->fail('live_stream_id, master_id, gift_id, live_name, gift_name, amount 参数不能为空'); } if ($params['amount'] > $user['now_money']) { From 9d28e1f1aeea58c5b88a92e1111e80b19898e373 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:46:27 +0800 Subject: [PATCH 19/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 14179d3a..334caea7 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -33,7 +33,7 @@ class Zhibo extends BaseController //用户直播送礼 public function reward() { - $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id']); + $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id', 'live_name', 'gift_name', 'amount']); $user = $this->request->userInfo(); if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id']) || empty($params['live_name']) || empty($params['gift_name']) || empty($params['amount'])) { return app('json')->fail('live_stream_id, master_id, gift_id, live_name, gift_name, amount 参数不能为空'); From b26593a6f1aa98214e8422d6e27ca4224feb85e2 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 26 Oct 2023 16:52:50 +0800 Subject: [PATCH 20/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 334caea7..f2776008 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -33,8 +33,8 @@ class Zhibo extends BaseController //用户直播送礼 public function reward() { - $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id', 'live_name', 'gift_name', 'amount']); $user = $this->request->userInfo(); + $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id', 'live_name', 'gift_name', 'amount']); if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id']) || empty($params['live_name']) || empty($params['gift_name']) || empty($params['amount'])) { return app('json')->fail('live_stream_id, master_id, gift_id, live_name, gift_name, amount 参数不能为空'); } From 02656d6c2e33d20b233ca1d51d83a89d98819313 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 26 Oct 2023 18:23:29 +0800 Subject: [PATCH 21/38] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A7=94=E6=89=98?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8D=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 548cd5ba..37e26168 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -801,7 +801,7 @@ class Community extends BaseController return app('json')->fail('委托商品不存在'); } // $uid = $this->request->uid(); - $entrust = Db::name('entrust')->where('community_id', $id)->where('is_del', 0)->find(); + $entrust = Db::name('entrust')->where('community_id', $id)->find(); if (!$entrust) { return app('json')->fail('委托商品不存在'); } From 44ebde8ff47a9b45c6cf9d88f4e33dd0cbdd9baa Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 27 Oct 2023 09:56:45 +0800 Subject: [PATCH 22/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/Zhibo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index f2776008..338cc7e5 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -34,9 +34,9 @@ class Zhibo extends BaseController public function reward() { $user = $this->request->userInfo(); - $params = $this->request->params(['live_stream_id', 'gift_id', 'master_id', 'live_name', 'gift_name', 'amount']); + $params = $this->request->params(['live_stream_id', 'master_id', 'live_name', 'gift_id', 'gift_name', 'gift_num', 'amount']); if (empty($params['live_stream_id']) || empty($params['master_id']) || empty($params['gift_id']) || empty($params['live_name']) || empty($params['gift_name']) || empty($params['amount'])) { - return app('json')->fail('live_stream_id, master_id, gift_id, live_name, gift_name, amount 参数不能为空'); + return app('json')->fail('live_stream_id, master_id, live_name, gift_id, gift_name, gift_num, amount 参数不能为空'); } if ($params['amount'] > $user['now_money']) { return app('json')->fail('余额不足'); @@ -49,6 +49,7 @@ class Zhibo extends BaseController 'live_name' => $params['live_name'], 'gift_id' => $params['gift_id'], 'gift_name' => $params['gift_name'], + 'gift_num' => $params['gift_num'], 'uid' => $user['uid'], 'master_id' => $params['master_id'], 'order_sn' => 'zb' . date('YmdHis') . mt_rand(1000, 9999), From 4d55c6f19f205ca5ba2495acadf9507970a190c1 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 16:26:40 +0800 Subject: [PATCH 23/38] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/SpuRepository.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/common/repositories/store/product/SpuRepository.php b/app/common/repositories/store/product/SpuRepository.php index 4ae0c9f2..74211a68 100644 --- a/app/common/repositories/store/product/SpuRepository.php +++ b/app/common/repositories/store/product/SpuRepository.php @@ -202,7 +202,6 @@ class SpuRepository extends BaseRepository } $where['product_id'] = $randPidList; unset($where['mer_rand_id'], $where['page']); - $page = 1; } $entryMerId = $where['entry_mer_id'] ?? ''; unset($where['entry_mer_id']); From 11dff348e7181b4257982cfe32d047d6504f4a7d Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 19:04:56 +0800 Subject: [PATCH 24/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../community/CommunityRepository.php | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/app/common/repositories/community/CommunityRepository.php b/app/common/repositories/community/CommunityRepository.php index 29e139e5..18ea9a83 100644 --- a/app/common/repositories/community/CommunityRepository.php +++ b/app/common/repositories/community/CommunityRepository.php @@ -682,35 +682,39 @@ class CommunityRepository extends BaseRepository $entrustInfo->update($value); continue; } - $purchaseRecord = PurchaseRecord::where('unique', $value['product_attr_unique'])->find(); - $totalNumber = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('number'); - $totalSalesVolume = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('sales_volume'); - if (empty($purchaseRecord) || ($totalNumber - $totalSalesVolume) <= 0) { - throw new ValidateException('进货记录不存在或已售罄'); - } - if (($totalNumber - $totalSalesVolume) < $value['number']) { - throw new ValidateException('库存不足'); - } + + // $purchaseRecord = PurchaseRecord::where('unique', $value['product_attr_unique'])->find(); + // $totalNumber = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('number'); + // $totalSalesVolume = PurchaseRecord::where('unique', $value['product_attr_unique'])->sum('sales_volume'); + // if (empty($purchaseRecord) || ($totalNumber - $totalSalesVolume) <= 0) { + // throw new ValidateException('进货记录不存在或已售罄'); + // } + // if (($totalNumber - $totalSalesVolume) < $value['number']) { + // throw new ValidateException('库存不足'); + // } if ($value) { - $insert[] = [ - 'community_id' => $id, - 'purchase_record_id' => $purchaseRecord['id'], - 'product_id' => $purchaseRecord['product_id'], - 'product_attr_unique' => $purchaseRecord['unique'], - 'mer_id' => $purchaseRecord['mer_id'], - 'entrust_mer_id' => $entrustMerId, - 'entrust_day' => $entrustDay, - 'number' => $value['number'], - 'price' => $value['price'], - 'update_time' => date('Y-m-d H:i:s'), - ]; + $attrValue = ProductAttrValue::where('unique', $value['product_attr_unique'])->find(); + if($attrValue){ + $insert[] = [ + 'community_id' => $id, + 'purchase_record_id' => 0,//$purchaseRecord['id'], + 'product_id' => $attrValue['product_id'], + 'product_attr_unique' => $attrValue['unique'], + 'mer_id' => $attrValue['mer_id'], + 'entrust_mer_id' => $entrustMerId, + 'entrust_day' => $entrustDay, + 'number' => $value['number'], + 'price' => $value['price'], + 'update_time' => date('Y-m-d H:i:s'), + ]; + $attrValue->stock -= $value['number']; + $attrValue->save(); + } } - $purchaseRecord->product->stock -= $value['number']; - $purchaseRecord->product->save(); - $attrValue = ProductAttrValue::where('product_id', $purchaseRecord['product_id'])->where('unique', $purchaseRecord['unique'])->find(); - $attrValue->stock -= $value['number']; - $attrValue->save(); + // $purchaseRecord->product->stock -= $value['number']; + // $purchaseRecord->product->save(); + } if ($insert) { Entrust::getInstance()->insertAll($insert); From dac2051f3d239316283e83cfbc665bafaa4913c4 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 19:26:10 +0800 Subject: [PATCH 25/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/MerchantIntention.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index cb89c21e..8d7a202d 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -195,7 +195,7 @@ class MerchantIntention extends BaseController 'city' => $areaInfo['city_code'] ?? '', 'area' => $merInfo['area_id'] ?? '', 'street' => $merInfo['street_id'] ?? '', - 'address' => $merInfo['address'] ?? '', + 'address' => $intenInfo['address'] ?? '', 'bank_username' => $data['bank_username'] ?? '', 'bank_opening' => $data['bank_opening'] ?? '', 'bank_front' => $data['bank_front'] ?? '', From 79109e7f04fb6eefe1c5dd5c63d10ece62097244 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 20:14:24 +0800 Subject: [PATCH 26/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 4889122b..503115ae 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2370,8 +2370,8 @@ class ProductRepository extends BaseRepository if ($stockIn <= 0) { throw new ValidateException('入库数量不能小于等于0'); } - $attrValue->stock = $attrValue->stock + $stockIn; - $attrValue->save(); + ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->update(['stock'=>$attrValue->stock + $stockIn]); + $product->stock = $stockIn + $product->stock; if (!$product->save()) { throw new \Exception('商品库存保存失败', 500); From bcd574a3e24a25945a0e8ef15d7857182e8188e7 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 20:31:21 +0800 Subject: [PATCH 27/38] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 503115ae..e7364bc1 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2370,6 +2370,7 @@ class ProductRepository extends BaseRepository if ($stockIn <= 0) { throw new ValidateException('入库数量不能小于等于0'); } + //111 ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->update(['stock'=>$attrValue->stock + $stockIn]); $product->stock = $stockIn + $product->stock; From 6d7edcd628118aec4d9ab9c664aea72372f8aa27 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 20:41:32 +0800 Subject: [PATCH 28/38] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/product/ProductRepository.php | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index e7364bc1..1e0966d7 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2352,12 +2352,33 @@ class ProductRepository extends BaseRepository } $stockIn = $params['number'] ?? 0; $price = $params['price'] ?? 0; + $model = new PurchaseRecord(); if (!empty($params['order_id'])) { //采购、委托订单导入 $orderMerId = StoreOrder::where('order_id', $params['order_id'])->value('mer_id'); $orderProduct = StoreOrderProduct::where('order_id', $params['order_id'])->where('product_id', $params['order_product_id'])->where('product_sku', $params['order_unique'])->find(); - if (empty($orderProduct) || $orderProduct->is_imported == 1) { - throw new ValidateException('订单商品不存在或已入库'); + if (empty($orderProduct)) { + throw new ValidateException('订单商品不存在'); + } + if( $orderProduct->is_imported == 1){ + ProductAttrValue::where('mer_id', $merId) + ->where('product_id', $params['product_id'])->where('unique', $params['unique']) + ->update(['stock'=>$attrValue->stock + $stockIn]); + $data = [ + 'order_id' => $params['order_id'] ?? 0, + 'order_product_id' => $params['order_product_id'] ?? 0, + 'product_id' => $product->product_id, + 'number' => $stockIn, + 'order_unique' => $params['order_unique'] ?? '', + 'unique' => $attrValue['unique'], + 'price' => $price, + 'mer_id' => $product->mer_id, + 'supplier_mer_id' => $supplierMerId, + ]; + if (!$model->save($data)) { + throw new \Exception('入库失败', 500); + } + return true; } $stockIn = $orderProduct['product_num'] ?? 0; $price = $orderProduct['product_price'] ?? 0; @@ -2370,14 +2391,12 @@ class ProductRepository extends BaseRepository if ($stockIn <= 0) { throw new ValidateException('入库数量不能小于等于0'); } - //111 - ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->update(['stock'=>$attrValue->stock + $stockIn]); - + $attrValue->stock = $attrValue->stock + $stockIn; + $attrValue->save(); $product->stock = $stockIn + $product->stock; if (!$product->save()) { throw new \Exception('商品库存保存失败', 500); } - $model = new PurchaseRecord(); $data = [ 'order_id' => $params['order_id'] ?? 0, 'order_product_id' => $params['order_product_id'] ?? 0, From 41b2df4a81632165edb4a15f2bca8cd71198a099 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 20:49:08 +0800 Subject: [PATCH 29/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 1e0966d7..289e4f31 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2361,6 +2361,9 @@ class ProductRepository extends BaseRepository throw new ValidateException('订单商品不存在'); } if( $orderProduct->is_imported == 1){ + if($stockIn==0){ + $stockIn=1; + } ProductAttrValue::where('mer_id', $merId) ->where('product_id', $params['product_id'])->where('unique', $params['unique']) ->update(['stock'=>$attrValue->stock + $stockIn]); From 79d4d3adb97cdddcfd8062122dbc4af6ff0dd46d Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:11:25 +0800 Subject: [PATCH 30/38] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/product/ProductRepository.php | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 289e4f31..7d7a6145 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2328,20 +2328,60 @@ class ProductRepository extends BaseRepository Db::startTrans(); try { $supplierMerId = 0; + $model = new PurchaseRecord(); if (empty($params['product_id']) && !empty($params['order_product_id'])) { //有商品无规格或者无商品无规格,导入商品和规格 $product = $this->getWhere(['source_product_id' => $params['order_product_id'], 'mer_id' => $merId]); + $sku = ProductAttrValue::where('product_id', $params['order_product_id'])->where('unique', $params['order_unique'])->value('sku'); + $attrValue = ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->find(); if (!empty($product)) { - $unique = $this->importAttrValue($params['order_product_id'], $product->toArray(), $params['order_unique']); - if (!$unique) { - throw new \Exception('商品规格导入出错', 500); + $stockIn = $params['number'] ?? 0; + $price = $params['price'] ?? 0; + if (!empty($params['order_id'])) { + //采购、委托订单导入 + $orderMerId = StoreOrder::where('order_id', $params['order_id'])->value('mer_id'); + $orderProduct = StoreOrderProduct::where('order_id', $params['order_id'])->where('product_id', $params['order_product_id'])->where('product_sku', $params['order_unique'])->find(); + if (empty($orderProduct)) { + $unique = $this->importAttrValue($params['order_product_id'], $product->toArray(), $params['order_unique']); + if (!$unique) { + throw new \Exception('商品规格导入出错', 500); + } + } + if( $orderProduct->is_imported == 1){ + if($stockIn==0){ + $stockIn=1; + } + ProductAttrValue::where('mer_id', $merId) + ->where('product_id', $params['product_id'])->where('unique', $params['unique']) + ->update(['stock'=>$attrValue->stock + $stockIn]); + $data = [ + 'order_id' => $params['order_id'] ?? 0, + 'order_product_id' => $params['order_product_id'] ?? 0, + 'product_id' => $product->product_id, + 'number' => $stockIn, + 'order_unique' => $params['order_unique'] ?? '', + 'unique' => $attrValue['unique'], + 'price' => $price, + 'mer_id' => $product->mer_id, + 'supplier_mer_id' => $supplierMerId, + ]; + if (!$model->save($data)) { + throw new \Exception('入库失败', 500); + } + return true; + } + $stockIn = $orderProduct['product_num'] ?? 0; + $price = $orderProduct['product_price'] ?? 0; + $supplierMerId = $orderMerId ?? 0; + // 如果是委托商品入库后就成为供应链商家的采购类型商品 + if ($orderProduct['product_type'] == 99) { + $product->product_type = 98; + } } } else { $productId = $this->import($params['order_product_id'], request()->userInfo()); $product = $this->get($productId); } - $sku = ProductAttrValue::where('product_id', $params['order_product_id'])->where('unique', $params['order_unique'])->value('sku'); - $attrValue = ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->find(); } else { //有商品有规格 $product = $this->get($params['product_id']); @@ -2350,47 +2390,6 @@ class ProductRepository extends BaseRepository if (!$product || !$attrValue) { throw new DataNotFoundException('商品或规格不存在'); } - $stockIn = $params['number'] ?? 0; - $price = $params['price'] ?? 0; - $model = new PurchaseRecord(); - if (!empty($params['order_id'])) { - //采购、委托订单导入 - $orderMerId = StoreOrder::where('order_id', $params['order_id'])->value('mer_id'); - $orderProduct = StoreOrderProduct::where('order_id', $params['order_id'])->where('product_id', $params['order_product_id'])->where('product_sku', $params['order_unique'])->find(); - if (empty($orderProduct)) { - throw new ValidateException('订单商品不存在'); - } - if( $orderProduct->is_imported == 1){ - if($stockIn==0){ - $stockIn=1; - } - ProductAttrValue::where('mer_id', $merId) - ->where('product_id', $params['product_id'])->where('unique', $params['unique']) - ->update(['stock'=>$attrValue->stock + $stockIn]); - $data = [ - 'order_id' => $params['order_id'] ?? 0, - 'order_product_id' => $params['order_product_id'] ?? 0, - 'product_id' => $product->product_id, - 'number' => $stockIn, - 'order_unique' => $params['order_unique'] ?? '', - 'unique' => $attrValue['unique'], - 'price' => $price, - 'mer_id' => $product->mer_id, - 'supplier_mer_id' => $supplierMerId, - ]; - if (!$model->save($data)) { - throw new \Exception('入库失败', 500); - } - return true; - } - $stockIn = $orderProduct['product_num'] ?? 0; - $price = $orderProduct['product_price'] ?? 0; - $supplierMerId = $orderMerId ?? 0; - // 如果是委托商品入库后就成为供应链商家的采购类型商品 - if ($orderProduct['product_type'] == 99) { - $product->product_type = 98; - } - } if ($stockIn <= 0) { throw new ValidateException('入库数量不能小于等于0'); } From 31b4169b4598f15c8e8000fccf71cc537f10c5f4 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:26:53 +0800 Subject: [PATCH 31/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 7d7a6145..f61fda95 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2352,7 +2352,7 @@ class ProductRepository extends BaseRepository $stockIn=1; } ProductAttrValue::where('mer_id', $merId) - ->where('product_id', $params['product_id'])->where('unique', $params['unique']) + ->where('product_id', $params['product_id']) ->update(['stock'=>$attrValue->stock + $stockIn]); $data = [ 'order_id' => $params['order_id'] ?? 0, @@ -2363,7 +2363,7 @@ class ProductRepository extends BaseRepository 'unique' => $attrValue['unique'], 'price' => $price, 'mer_id' => $product->mer_id, - 'supplier_mer_id' => $supplierMerId, + 'supplier_mer_id' => $orderMerId??0, ]; if (!$model->save($data)) { throw new \Exception('入库失败', 500); From 64ed1355bc389b219c01443205860c0063401f65 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:33:17 +0800 Subject: [PATCH 32/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index f61fda95..26f0d172 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2352,7 +2352,7 @@ class ProductRepository extends BaseRepository $stockIn=1; } ProductAttrValue::where('mer_id', $merId) - ->where('product_id', $params['product_id']) + ->where('product_id', $product['product_id']) ->update(['stock'=>$attrValue->stock + $stockIn]); $data = [ 'order_id' => $params['order_id'] ?? 0, From 251a7bb1c3ac2324f6d5ee1f6910d8bf9ee48351 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:38:02 +0800 Subject: [PATCH 33/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 26f0d172..bd76734e 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2368,6 +2368,7 @@ class ProductRepository extends BaseRepository if (!$model->save($data)) { throw new \Exception('入库失败', 500); } + Db::commit(); return true; } $stockIn = $orderProduct['product_num'] ?? 0; From e1c15d7eeab62232f55733827c987dae385c5159 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:43:46 +0800 Subject: [PATCH 34/38] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index bd76734e..3c5303a6 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2325,6 +2325,7 @@ class ProductRepository extends BaseRepository */ public function stockIn($merId, $params) { + /**感觉有问题 最好在优化一下结构 */ Db::startTrans(); try { $supplierMerId = 0; From 713f8c70f8b65bb64e84395f0609352c967cb251 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 28 Oct 2023 09:38:06 +0800 Subject: [PATCH 35/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 6 +++--- app/controller/api/user/Zhibo.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 088cd0fe..edbd691e 100644 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -192,11 +192,11 @@ class UserBillDao extends BaseDao return UserBill::getDB() ->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) { if ($where['now_money'] == 0) - $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund']); + $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec']); else if ($where['now_money'] == 1) - $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell']); + $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_inc']); else if ($where['now_money'] == 2) - $query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund']); + $query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund', 'zhibo_reward_dec']); }) ->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) { $query->where('uid', $where['uid'])->where('mer_id', 0); diff --git a/app/controller/api/user/Zhibo.php b/app/controller/api/user/Zhibo.php index 338cc7e5..82b7e8a7 100644 --- a/app/controller/api/user/Zhibo.php +++ b/app/controller/api/user/Zhibo.php @@ -64,7 +64,7 @@ class Zhibo extends BaseController $user->save(); $userBillRepository = app()->make(UserBillRepository::class); //打赏人账单 - $userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward', [ + $userBillRepository->decBill($user['uid'], 'now_money', 'zhibo_reward_dec', [ 'link_id' => $orderId, 'status' => 1, 'title' => '直播送礼支出', @@ -76,7 +76,7 @@ class Zhibo extends BaseController Db::name('user')->where('uid', $params['master_id'])->inc('now_money', $params['amount'])->update(); $master = Db::name('user')->where('uid', $params['master_id'])->find(); //主播账单 - $userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward', [ + $userBillRepository->incBill($master['uid'], 'now_money', 'zhibo_reward_inc', [ 'link_id' => $orderId, 'status' => 1, 'title' => '直播送礼收入', From 1d2a72e4db9a80af282b0f0c1622f94bb92b59f3 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 28 Oct 2023 09:42:01 +0800 Subject: [PATCH 36/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index edbd691e..18327388 100644 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -189,14 +189,15 @@ class UserBillDao extends BaseDao */ public function search(array $where) { + halt($where); return UserBill::getDB() ->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) { if ($where['now_money'] == 0) $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec']); else if ($where['now_money'] == 1) - $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_inc']); + $query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_dec']); else if ($where['now_money'] == 2) - $query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund', 'zhibo_reward_dec']); + $query->where('category', 'now_money')->whereIn('type', ['recharge', 'sys_inc_money', 'brokerage', 'refund', 'zhibo_reward_inc']); }) ->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) { $query->where('uid', $where['uid'])->where('mer_id', 0); From 9ed5034de747611b23df5cd79d0ab0d3c89f1230 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 28 Oct 2023 09:42:32 +0800 Subject: [PATCH 37/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=80=81=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/user/UserBillDao.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/common/dao/user/UserBillDao.php b/app/common/dao/user/UserBillDao.php index 18327388..8e5e2153 100644 --- a/app/common/dao/user/UserBillDao.php +++ b/app/common/dao/user/UserBillDao.php @@ -189,7 +189,6 @@ class UserBillDao extends BaseDao */ public function search(array $where) { - halt($where); return UserBill::getDB() ->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) { if ($where['now_money'] == 0) From fdf697e1f4c39aba5a54406a02ea0fa61578b968 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 28 Oct 2023 15:55:30 +0800 Subject: [PATCH 38/38] =?UTF-8?q?=E5=90=8E=E5=8F=B0pc=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/mer.html | 2 +- ...5568af.css => chunk-43056c0c.68b66d07.css} | 0 ...6cf18c.css => chunk-d08ae18a.32ccfe6c.css} | 2 +- .../js/{app.fe0f742e.js => app.25f28002.js} | 2 +- ...fdcd9251.js => chunk-00584afe.624c1175.js} | 0 ...8f59ef6b.js => chunk-02ea1cc8.819ab222.js} | 0 ...042ab901.js => chunk-031de214.9543f216.js} | 0 ...86d07fc8.js => chunk-03944393.8bfab3b6.js} | 0 ...8cbd6aa0.js => chunk-03cdbf88.4487520b.js} | 0 ...2aff42ac.js => chunk-048e53ee.d62f6d74.js} | 0 ...aa21e7a0.js => chunk-0493956f.be78afa1.js} | 0 ...2ad37d1b.js => chunk-09296115.1e8c40a4.js} | 0 ...ca5bb21e.js => chunk-0b1f3772.0ba08aec.js} | 0 ...e0773add.js => chunk-0d2c1415.c4774000.js} | 0 ...a26c8980.js => chunk-0fa0e81e.80278ae1.js} | 0 ...769caa52.js => chunk-1306dfb6.6d5bf91a.js} | 0 ...7290c316.js => chunk-154b4748.0d789442.js} | 0 ...db6cbc65.js => chunk-18fda1e0.5b862cc7.js} | 0 ...1931a746.js => chunk-1df22872.bcf73eca.js} | 0 public/mer/js/chunk-21d73fce.5539a9b3.js | 1 - ...4b7cef41.js => chunk-2d0ab2c5.ccb7cbfa.js} | 0 ...18d61df1.js => chunk-2d0aba79.87953f9e.js} | 0 ...aa9a030a.js => chunk-2d0aed35.631ff8f9.js} | 0 ...30aba183.js => chunk-2d0b1e40.13688b61.js} | 0 ...0d379f8a.js => chunk-2d0ba554.7951b196.js} | 0 ...f73feb79.js => chunk-2d0c212a.b09722f2.js} | 0 ...c5e53609.js => chunk-2d0c481a.89a1b8f5.js} | 0 ...52446984.js => chunk-2d0c8a44.9cbed354.js} | 0 ...a2ede260.js => chunk-2d0d095b.71131484.js} | 0 ...02714f46.js => chunk-2d0d3300.9bf19520.js} | 0 ...52b19eb9.js => chunk-2d0e276e.23d3b1fc.js} | 0 ...a3b258af.js => chunk-2d0e5b8e.e1c10376.js} | 0 ...78663302.js => chunk-2d0e6675.4e70c6e8.js} | 0 ...cd499ae2.js => chunk-2d207706.d9c4bd71.js} | 0 ...7c26e238.js => chunk-2d209391.6745fc84.js} | 0 ...9d1daa11.js => chunk-2d213182.8506b72f.js} | 0 ...a8a920dc.js => chunk-2d213ed3.8b17b6aa.js} | 0 ...c3b530f5.js => chunk-2d21d8a3.ac5c243f.js} | 0 ...148070d8.js => chunk-2d229240.36fecbb3.js} | 0 ...e293f269.js => chunk-2d230c26.580182ee.js} | 0 ...d5a662c3.js => chunk-2f105f7b.91bb2a68.js} | 0 ...de565e36.js => chunk-32c5a54a.79b30984.js} | 0 ...8ae9799c.js => chunk-344a4872.9f13361e.js} | 0 ...06457928.js => chunk-35013ff2.21c964fc.js} | 0 ...555c036a.js => chunk-39a0bfcb.c18ef5ad.js} | 0 ...39783fd1.js => chunk-3e2c114c.d3d7810e.js} | 0 ...fdce1d90.js => chunk-3ec8e821.ea1c61fb.js} | 0 ...fa909bf4.js => chunk-406e1b8e.dd83a8e7.js} | 0 ...24abaab8.js => chunk-40dcbfe7.680a3af8.js} | 0 ...1f2c5aca.js => chunk-412170ef.760231be.js} | 0 ...50036902.js => chunk-412d33f7.6be40bb0.js} | 0 ...ea6e4fc8.js => chunk-418fea3c.3d90e1f1.js} | 0 ...e59a6118.js => chunk-43056c0c.0d9277c1.js} | 0 ...e3ddc594.js => chunk-4a9f6d94.11ae2226.js} | 0 ...cde49d77.js => chunk-4bf3fbdc.4e23f1a8.js} | 0 ...fc6490f6.js => chunk-4f7a44e8.4954143d.js} | 0 ...64844fe9.js => chunk-5310352e.72571813.js} | 0 ...c98063ac.js => chunk-546dc2ee.15d321b6.js} | 0 ...a073636b.js => chunk-59e52b70.748518b3.js} | 0 ...2d301d4f.js => chunk-5bb47ee8.44a56b61.js} | 0 ...b9e36fe7.js => chunk-5d8cc0ba.7350d926.js} | 0 ...b803e001.js => chunk-5ed4f497.d60a336c.js} | 0 ...58ddaa43.js => chunk-6231f720.f43febc0.js} | 0 ...2f0b8987.js => chunk-634734f0.98f9792e.js} | 0 ...388a52b3.js => chunk-648f00b5.db9bfa05.js} | 0 ...e8bd0321.js => chunk-67e1db22.abd27fd8.js} | 0 ...f0ca8d97.js => chunk-6a905886.f0de56de.js} | 0 ...52472e5f.js => chunk-6c88f67a.49ca2cb5.js} | 0 ...5756f677.js => chunk-7288b5a6.d553c60c.js} | 0 ...ba9efa07.js => chunk-738c6ac1.17f05c02.js} | 0 ...076d6e65.js => chunk-7788e6ba.14f30dca.js} | 0 ...7c752e4a.js => chunk-78c4a0d7.d8acd954.js} | 0 ...0aef87f6.js => chunk-7c1a0002.5e412e55.js} | 0 ...257efbe1.js => chunk-7c43671d.00c29d08.js} | 0 ...a7b44025.js => chunk-7f2544fe.ffee7d4d.js} | 0 ...b2d33e41.js => chunk-80a8cf62.35b9a0b4.js} | 0 ...8358745d.js => chunk-82bee4a8.eefcb150.js} | 0 ...27debe08.js => chunk-90657762.e50cb7b5.js} | 0 ...44d85c7b.js => chunk-961c0de4.d2693796.js} | 0 ...5aacfc38.js => chunk-9afa8a36.2cbda66b.js} | 0 ...646073ee.js => chunk-9d6d22b0.e54eef26.js} | 0 ...b4c46718.js => chunk-a0fbc2e4.228eb9f0.js} | 0 ...b6cd9810.js => chunk-a97676f4.47892021.js} | 0 ...b4cb614d.js => chunk-ab3d6574.37409ec9.js} | 0 ...846bcf99.js => chunk-ae0b147e.6d857c9b.js} | 0 ...ba3acbcc.js => chunk-afbd5864.8cb5ad78.js} | 0 ...4b421028.js => chunk-b28bec38.9413f9c5.js} | 0 ...9593a4c9.js => chunk-cd8d615e.c270674c.js} | 0 ...73afe2a9.js => chunk-cf155762.efba42ff.js} | 0 ....cc2ce7aa.js => chunk-commons.50cf883d.js} | 0 public/mer/js/chunk-d08ae18a.f45890ac.js | 1 + ...9b315160.js => chunk-edb267f4.0d92693c.js} | 0 ...9297575c.js => chunk-ef8562be.c5e8299a.js} | 0 ...d19a690.js => chunk-elementUI.d0585cc2.js} | 2 +- ...4d86ded5.js => chunk-f0a8813a.bc9fae18.js} | 0 ...f21bd127.js => chunk-f1874498.cea83324.js} | 0 ...0b03926c.js => chunk-fa99d034.c4ebd973.js} | 0 ...e1c39184.js => chunk-fe6fa87e.9918d2a6.js} | 0 ...ibs.898070c3.js => chunk-libs.f60897d8.js} | 124 ++++++++---------- 99 files changed, 63 insertions(+), 71 deletions(-) rename public/mer/css/{chunk-43056c0c.275568af.css => chunk-43056c0c.68b66d07.css} (100%) rename public/mer/css/{chunk-21d73fce.ff6cf18c.css => chunk-d08ae18a.32ccfe6c.css} (53%) rename public/mer/js/{app.fe0f742e.js => app.25f28002.js} (99%) rename public/mer/js/{chunk-00584afe.fdcd9251.js => chunk-00584afe.624c1175.js} (100%) rename public/mer/js/{chunk-02ea1cc8.8f59ef6b.js => chunk-02ea1cc8.819ab222.js} (100%) rename public/mer/js/{chunk-031de214.042ab901.js => chunk-031de214.9543f216.js} (100%) rename public/mer/js/{chunk-03944393.86d07fc8.js => chunk-03944393.8bfab3b6.js} (100%) rename public/mer/js/{chunk-03cdbf88.8cbd6aa0.js => chunk-03cdbf88.4487520b.js} (100%) rename public/mer/js/{chunk-048e53ee.2aff42ac.js => chunk-048e53ee.d62f6d74.js} (100%) rename public/mer/js/{chunk-0493956f.aa21e7a0.js => chunk-0493956f.be78afa1.js} (100%) rename public/mer/js/{chunk-09296115.2ad37d1b.js => chunk-09296115.1e8c40a4.js} (100%) rename public/mer/js/{chunk-0b1f3772.ca5bb21e.js => chunk-0b1f3772.0ba08aec.js} (100%) rename public/mer/js/{chunk-0d2c1415.e0773add.js => chunk-0d2c1415.c4774000.js} (100%) rename public/mer/js/{chunk-0fa0e81e.a26c8980.js => chunk-0fa0e81e.80278ae1.js} (100%) rename public/mer/js/{chunk-1306dfb6.769caa52.js => chunk-1306dfb6.6d5bf91a.js} (100%) rename public/mer/js/{chunk-154b4748.7290c316.js => chunk-154b4748.0d789442.js} (100%) rename public/mer/js/{chunk-18fda1e0.db6cbc65.js => chunk-18fda1e0.5b862cc7.js} (100%) rename public/mer/js/{chunk-1df22872.1931a746.js => chunk-1df22872.bcf73eca.js} (100%) delete mode 100644 public/mer/js/chunk-21d73fce.5539a9b3.js rename public/mer/js/{chunk-2d0ab2c5.4b7cef41.js => chunk-2d0ab2c5.ccb7cbfa.js} (100%) rename public/mer/js/{chunk-2d0aba79.18d61df1.js => chunk-2d0aba79.87953f9e.js} (100%) rename public/mer/js/{chunk-2d0aed35.aa9a030a.js => chunk-2d0aed35.631ff8f9.js} (100%) rename public/mer/js/{chunk-2d0b1e40.30aba183.js => chunk-2d0b1e40.13688b61.js} (100%) rename public/mer/js/{chunk-2d0ba554.0d379f8a.js => chunk-2d0ba554.7951b196.js} (100%) rename public/mer/js/{chunk-2d0c212a.f73feb79.js => chunk-2d0c212a.b09722f2.js} (100%) rename public/mer/js/{chunk-2d0c481a.c5e53609.js => chunk-2d0c481a.89a1b8f5.js} (100%) rename public/mer/js/{chunk-2d0c8a44.52446984.js => chunk-2d0c8a44.9cbed354.js} (100%) rename public/mer/js/{chunk-2d0d095b.a2ede260.js => chunk-2d0d095b.71131484.js} (100%) rename public/mer/js/{chunk-2d0d3300.02714f46.js => chunk-2d0d3300.9bf19520.js} (100%) rename public/mer/js/{chunk-2d0e276e.52b19eb9.js => chunk-2d0e276e.23d3b1fc.js} (100%) rename public/mer/js/{chunk-2d0e5b8e.a3b258af.js => chunk-2d0e5b8e.e1c10376.js} (100%) rename public/mer/js/{chunk-2d0e6675.78663302.js => chunk-2d0e6675.4e70c6e8.js} (100%) rename public/mer/js/{chunk-2d207706.cd499ae2.js => chunk-2d207706.d9c4bd71.js} (100%) rename public/mer/js/{chunk-2d209391.7c26e238.js => chunk-2d209391.6745fc84.js} (100%) rename public/mer/js/{chunk-2d213182.9d1daa11.js => chunk-2d213182.8506b72f.js} (100%) rename public/mer/js/{chunk-2d213ed3.a8a920dc.js => chunk-2d213ed3.8b17b6aa.js} (100%) rename public/mer/js/{chunk-2d21d8a3.c3b530f5.js => chunk-2d21d8a3.ac5c243f.js} (100%) rename public/mer/js/{chunk-2d229240.148070d8.js => chunk-2d229240.36fecbb3.js} (100%) rename public/mer/js/{chunk-2d230c26.e293f269.js => chunk-2d230c26.580182ee.js} (100%) rename public/mer/js/{chunk-2f105f7b.d5a662c3.js => chunk-2f105f7b.91bb2a68.js} (100%) rename public/mer/js/{chunk-32c5a54a.de565e36.js => chunk-32c5a54a.79b30984.js} (100%) rename public/mer/js/{chunk-344a4872.8ae9799c.js => chunk-344a4872.9f13361e.js} (100%) rename public/mer/js/{chunk-35013ff2.06457928.js => chunk-35013ff2.21c964fc.js} (100%) rename public/mer/js/{chunk-39a0bfcb.555c036a.js => chunk-39a0bfcb.c18ef5ad.js} (100%) rename public/mer/js/{chunk-3e2c114c.39783fd1.js => chunk-3e2c114c.d3d7810e.js} (100%) rename public/mer/js/{chunk-3ec8e821.fdce1d90.js => chunk-3ec8e821.ea1c61fb.js} (100%) rename public/mer/js/{chunk-406e1b8e.fa909bf4.js => chunk-406e1b8e.dd83a8e7.js} (100%) rename public/mer/js/{chunk-40dcbfe7.24abaab8.js => chunk-40dcbfe7.680a3af8.js} (100%) rename public/mer/js/{chunk-412170ef.1f2c5aca.js => chunk-412170ef.760231be.js} (100%) rename public/mer/js/{chunk-412d33f7.50036902.js => chunk-412d33f7.6be40bb0.js} (100%) rename public/mer/js/{chunk-418fea3c.ea6e4fc8.js => chunk-418fea3c.3d90e1f1.js} (100%) rename public/mer/js/{chunk-43056c0c.e59a6118.js => chunk-43056c0c.0d9277c1.js} (100%) rename public/mer/js/{chunk-4a9f6d94.e3ddc594.js => chunk-4a9f6d94.11ae2226.js} (100%) rename public/mer/js/{chunk-4bf3fbdc.cde49d77.js => chunk-4bf3fbdc.4e23f1a8.js} (100%) rename public/mer/js/{chunk-4f7a44e8.fc6490f6.js => chunk-4f7a44e8.4954143d.js} (100%) rename public/mer/js/{chunk-5310352e.64844fe9.js => chunk-5310352e.72571813.js} (100%) rename public/mer/js/{chunk-546dc2ee.c98063ac.js => chunk-546dc2ee.15d321b6.js} (100%) rename public/mer/js/{chunk-59e52b70.a073636b.js => chunk-59e52b70.748518b3.js} (100%) rename public/mer/js/{chunk-5bb47ee8.2d301d4f.js => chunk-5bb47ee8.44a56b61.js} (100%) rename public/mer/js/{chunk-5d8cc0ba.b9e36fe7.js => chunk-5d8cc0ba.7350d926.js} (100%) rename public/mer/js/{chunk-5ed4f497.b803e001.js => chunk-5ed4f497.d60a336c.js} (100%) rename public/mer/js/{chunk-6231f720.58ddaa43.js => chunk-6231f720.f43febc0.js} (100%) rename public/mer/js/{chunk-634734f0.2f0b8987.js => chunk-634734f0.98f9792e.js} (100%) rename public/mer/js/{chunk-648f00b5.388a52b3.js => chunk-648f00b5.db9bfa05.js} (100%) rename public/mer/js/{chunk-67e1db22.e8bd0321.js => chunk-67e1db22.abd27fd8.js} (100%) rename public/mer/js/{chunk-6a905886.f0ca8d97.js => chunk-6a905886.f0de56de.js} (100%) rename public/mer/js/{chunk-6c88f67a.52472e5f.js => chunk-6c88f67a.49ca2cb5.js} (100%) rename public/mer/js/{chunk-7288b5a6.5756f677.js => chunk-7288b5a6.d553c60c.js} (100%) rename public/mer/js/{chunk-738c6ac1.ba9efa07.js => chunk-738c6ac1.17f05c02.js} (100%) rename public/mer/js/{chunk-7788e6ba.076d6e65.js => chunk-7788e6ba.14f30dca.js} (100%) rename public/mer/js/{chunk-78c4a0d7.7c752e4a.js => chunk-78c4a0d7.d8acd954.js} (100%) rename public/mer/js/{chunk-7c1a0002.0aef87f6.js => chunk-7c1a0002.5e412e55.js} (100%) rename public/mer/js/{chunk-7c43671d.257efbe1.js => chunk-7c43671d.00c29d08.js} (100%) rename public/mer/js/{chunk-7f2544fe.a7b44025.js => chunk-7f2544fe.ffee7d4d.js} (100%) rename public/mer/js/{chunk-80a8cf62.b2d33e41.js => chunk-80a8cf62.35b9a0b4.js} (100%) rename public/mer/js/{chunk-82bee4a8.8358745d.js => chunk-82bee4a8.eefcb150.js} (100%) rename public/mer/js/{chunk-90657762.27debe08.js => chunk-90657762.e50cb7b5.js} (100%) rename public/mer/js/{chunk-961c0de4.44d85c7b.js => chunk-961c0de4.d2693796.js} (100%) rename public/mer/js/{chunk-9afa8a36.5aacfc38.js => chunk-9afa8a36.2cbda66b.js} (100%) rename public/mer/js/{chunk-9d6d22b0.646073ee.js => chunk-9d6d22b0.e54eef26.js} (100%) rename public/mer/js/{chunk-a0fbc2e4.b4c46718.js => chunk-a0fbc2e4.228eb9f0.js} (100%) rename public/mer/js/{chunk-a97676f4.b6cd9810.js => chunk-a97676f4.47892021.js} (100%) rename public/mer/js/{chunk-ab3d6574.b4cb614d.js => chunk-ab3d6574.37409ec9.js} (100%) rename public/mer/js/{chunk-ae0b147e.846bcf99.js => chunk-ae0b147e.6d857c9b.js} (100%) rename public/mer/js/{chunk-afbd5864.ba3acbcc.js => chunk-afbd5864.8cb5ad78.js} (100%) rename public/mer/js/{chunk-b28bec38.4b421028.js => chunk-b28bec38.9413f9c5.js} (100%) rename public/mer/js/{chunk-cd8d615e.9593a4c9.js => chunk-cd8d615e.c270674c.js} (100%) rename public/mer/js/{chunk-cf155762.73afe2a9.js => chunk-cf155762.efba42ff.js} (100%) rename public/mer/js/{chunk-commons.cc2ce7aa.js => chunk-commons.50cf883d.js} (100%) create mode 100644 public/mer/js/chunk-d08ae18a.f45890ac.js rename public/mer/js/{chunk-edb267f4.9b315160.js => chunk-edb267f4.0d92693c.js} (100%) rename public/mer/js/{chunk-ef8562be.9297575c.js => chunk-ef8562be.c5e8299a.js} (100%) rename public/mer/js/{chunk-elementUI.6d19a690.js => chunk-elementUI.d0585cc2.js} (99%) rename public/mer/js/{chunk-f0a8813a.4d86ded5.js => chunk-f0a8813a.bc9fae18.js} (100%) rename public/mer/js/{chunk-f1874498.f21bd127.js => chunk-f1874498.cea83324.js} (100%) rename public/mer/js/{chunk-fa99d034.0b03926c.js => chunk-fa99d034.c4ebd973.js} (100%) rename public/mer/js/{chunk-fe6fa87e.e1c39184.js => chunk-fe6fa87e.9918d2a6.js} (100%) rename public/mer/js/{chunk-libs.898070c3.js => chunk-libs.f60897d8.js} (88%) diff --git a/public/mer.html b/public/mer.html index 9f6e88da..32e51e6f 100644 --- a/public/mer.html +++ b/public/mer.html @@ -1 +1 @@ -