添加审核通过状态筛选

This commit is contained in:
wangxiaowei 2024-08-26 11:54:48 +08:00
parent 3672adedfb
commit 6fbf0615c0
2 changed files with 34 additions and 1 deletions

@ -51,6 +51,18 @@ class LocalStoreGoods extends Api
return JsonServer::success('提交成功', [], 1, 1);
}
public function shopDetails()
{
$get = $this->request->get();
$get['user_id'] = $this->user_id;
$result = LocalStoreGoodsLogic::shop_details($get);
if ($result) {
return JsonServer::success('获取成功', $result);
}
return JsonServer::error('获取失败');
}
public function details()
{
$get = $this->request->get();

@ -141,6 +141,27 @@ class LocalStoreGoodsLogic extends Logic
}
}
// 获取商家自身的商品详情
public static function shop_details($get)
{
$data = LocalStoreGoods::with('pic')
->where([
'id' => $get['id'],
'lstore_id' => $get['lstore_id'],
'delete_time' => 0,
'audit_status' => $get['audit_status']
])->find()->toArray();
if ($data) {
foreach ($data['pic'] as &$v) {
$v['url'] = Config::get('aliyunoss.domain') . $v['url'];
}
return $data;
}
return false;
}
// 获取商品详情
public static function details($get)
{
@ -149,7 +170,7 @@ class LocalStoreGoodsLogic extends Logic
'id' => $get['id'],
'lstore_id' => $get['lstore_id'],
'delete_time' => 0,
'audit_status' => self::$STATUS['audit_status_ok'],
'audit_status' => self::$AUDIT_STATUS['audit_status_ok'],
])->find()->toArray();
if ($data) {