添加审核通过状态筛选
This commit is contained in:
parent
a80fa4416f
commit
d1357fc659
@ -11,8 +11,15 @@ use think\facade\Config;
|
||||
class LocalStoreGoodsLogic extends Logic
|
||||
{
|
||||
private static $STATUS = [
|
||||
'shelves' => 1,
|
||||
'status_sold_out' => 2
|
||||
'stay' => 0, // 默认
|
||||
'shelves' => 1, // 已上架
|
||||
'status_sold_out' => 2 // 已下架
|
||||
];
|
||||
|
||||
private static $AUDIT_STATUS = [
|
||||
'audit_status_stay' => 0, // 待审核
|
||||
'audit_status_ok' => 1, // 审核通过
|
||||
'audit_status_refuse' => 2 // 审核失败
|
||||
];
|
||||
|
||||
// 获取商品列表
|
||||
@ -23,6 +30,7 @@ class LocalStoreGoodsLogic extends Logic
|
||||
->where([
|
||||
'lstore_id' => $get['lstore_id'],
|
||||
'state' => $get['type'],
|
||||
'audit_status' => self::$AUDIT_STATUS['audit_status_ok'],
|
||||
'delete_time' => 0,
|
||||
])
|
||||
->order('id', 'desc')
|
||||
@ -33,6 +41,7 @@ class LocalStoreGoodsLogic extends Logic
|
||||
$count = LocalStoreGoods::where([
|
||||
'lstore_id' => $get['lstore_id'],
|
||||
'state' => $get['lstore_id'],
|
||||
'audit_status' => self::$AUDIT_STATUS['audit_status_ok'],
|
||||
'delete_time' => 0,
|
||||
])->count();
|
||||
|
||||
@ -136,13 +145,13 @@ class LocalStoreGoodsLogic extends Logic
|
||||
'id' => $get['id'],
|
||||
'lstore_id' => $get['lstore_id'],
|
||||
'delete_time' => 0,
|
||||
'audit_status' => self::$STATUS['audit_status_ok'],
|
||||
])->find()->toArray();
|
||||
|
||||
if ($data) {
|
||||
foreach ($data['pic'] as &$v) {
|
||||
$v['url'] = Config::get('aliyunoss.domain') . $v['url'];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user