Browse Source
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
# Conflicts: # config/autoload/dependencies.phpmaster
11 changed files with 130 additions and 64 deletions
-
8app/Constants/v3/Goods.php
-
7app/Controller/v3/GoodsController.php
-
52app/Controller/v3/LocationController.php
-
15app/Model/v3/Area.php
-
11app/Model/v3/User.php
-
32app/Service/v3/Implementations/GoodsService.php
-
31app/Service/v3/Implementations/LocationService.php
-
22app/Service/v3/Implementations/OrderListService.php
-
2app/Service/v3/Interfaces/GoodsServiceInterface.php
-
13app/Service/v3/Interfaces/LocationServiceInterface.php
-
1config/autoload/dependencies.php
@ -0,0 +1,15 @@ |
|||
<?php |
|||
|
|||
namespace App\Model\v3; |
|||
|
|||
use App\Model\Model; |
|||
|
|||
class Area extends Model |
|||
{ |
|||
protected $table = 'lanzu_area'; |
|||
|
|||
public function markets() |
|||
{ |
|||
return $this->hasMany(Market::class, 'city_id', 'id'); |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Service\v3\Implementations; |
|||
use App\Service\v3\Interfaces\LocationServiceInterface; |
|||
use App\Model\v3\Area; |
|||
use App\Model\v3\Market; |
|||
class LocationService implements LocationServiceInterface |
|||
{ |
|||
|
|||
public function do() |
|||
{ |
|||
// TODO: Implement do() method.
|
|||
} |
|||
|
|||
public function check() |
|||
{ |
|||
// TODO: Implement check() method.
|
|||
} |
|||
|
|||
public function undo() |
|||
{ |
|||
// TODO: Implement undo() method.
|
|||
} |
|||
|
|||
public function getMarketListByLocation($cityIds) |
|||
{ |
|||
$res = Area::query()->with('markets')->whereIn('id',$cityIds)->get(); |
|||
return $res; |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Service\v3\Interfaces; |
|||
|
|||
|
|||
interface LocationServiceInterface |
|||
{ |
|||
public function do(); |
|||
public function check(); |
|||
public function undo(); |
|||
public function getMarketListByLocation($cityIds); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue