Browse Source

接口整理优化

master
Lemon 5 years ago
parent
commit
7f14d1aefe
  1. 6
      app/Controller/PurchaseLimitController.php
  2. 10
      app/Service/PurchaseLimitService.php
  3. 1
      app/Service/PurchaseLimitServiceInterface.php
  4. 2
      config/routes.php

6
app/Controller/PurchaseLimitController.php

@ -34,10 +34,4 @@ class PurchaseLimitController extends BaseController
return $this->success($res); return $this->success($res);
} }
public function test()
{
$res = $this->purchaseLimitService->PurchaseLimit($this->request->input('global_order_id'));
return $this->success($res);
}
} }

10
app/Service/PurchaseLimitService.php

@ -101,14 +101,4 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface
return true; return true;
} }
public function test($params)
{
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class);
//添加领取记录到ssdb
$data = [
'620',1561,
];
$test = $ssdb->exec('multi_hset', SsdbKeysPrefix::PURCHASE_RECORD. date('Ymd') .'_620', $data);
return $test;
}
} }

1
app/Service/PurchaseLimitServiceInterface.php

@ -14,5 +14,4 @@ interface PurchaseLimitServiceInterface
public function PurchaseLimit($orderGoods); public function PurchaseLimit($orderGoods);
public function test($params);
} }

2
config/routes.php

@ -61,7 +61,7 @@ Router::addGroup('/v1/',function (){
//加入购物车 //加入购物车
Router::post('ShopCar/addShopCar', 'App\Controller\ShopCarController@addShopCar'); Router::post('ShopCar/addShopCar', 'App\Controller\ShopCarController@addShopCar');
Router::post('ShopCar/updateShopCar', 'App\Controller\ShopCarController@updateShopCar'); Router::post('ShopCar/updateShopCar', 'App\Controller\ShopCarController@updateShopCar');
Router::post('PurchaseLimit/test', 'App\Controller\PurchaseLimitController@test');
Router::post('PurchaseLimit/delSsdbPurchaseRecord', 'App\Controller\PurchaseLimitController@delSsdbPurchaseRecord'); Router::post('PurchaseLimit/delSsdbPurchaseRecord', 'App\Controller\PurchaseLimitController@delSsdbPurchaseRecord');
Router::post('PurchaseLimit/getStoreIdByMarketId', 'App\Controller\PurchaseLimitController@getStoreIdByMarketId'); Router::post('PurchaseLimit/getStoreIdByMarketId', 'App\Controller\PurchaseLimitController@getStoreIdByMarketId');

Loading…
Cancel
Save