配置修改

This commit is contained in:
2026-04-18 11:13:26 +08:00
parent e0b45888ed
commit b18d1595a4
2 changed files with 41 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace app\api\logic;
use app\common\basics\Logic;
use app\common\model\shop\Shop;
use app\common\model\shop\ShopGoodsCategory;
class ShopGoodsCategoryLogic extends Logic
@ -25,4 +26,32 @@ class ShopGoodsCategoryLogic extends Logic
return $data;
}
public static function getCityGoodsCategory($city_id)
{
$shop_msg = Shop::where("city_id",$city_id)
->where("is_run",1)
->where("is_freeze",0)
->where("del",0)
->find();
$c = "";
if($shop_msg == null){
$shopId = 1;
}else{
$shopId = $shop_msg['id'];
}
$where = [
'del' => 0,
'shop_id' => $shopId,
'is_show' => 1
];
$order = [
'sort' => 'asc',
'id' => 'desc'
];
$data = ShopGoodsCategory::field('id,name')
->where($where)->order($order)->select()->toArray();
return $data;
}
}