35 lines
794 B
PHP
35 lines
794 B
PHP
<?php
|
|
|
|
namespace app\admin\logic\shop;
|
|
|
|
use app\common\basics\Logic;
|
|
use app\common\model\LocalStore;
|
|
use app\common\model\user\User;
|
|
|
|
class LocalStoreLogic extends Logic
|
|
{
|
|
public static $STATE_ENUM = [1, 2];
|
|
|
|
public static function lists()
|
|
{
|
|
return array(
|
|
'lists' => LocalStore::with('info')->select()->toArray()
|
|
);
|
|
}
|
|
|
|
public static function get_data($id)
|
|
{
|
|
return LocalStore::where(['lstore_id' => $id])->find();
|
|
}
|
|
|
|
public static function update_state($id, $state)
|
|
{
|
|
return LocalStore::where(['lstore_id' => $id])->update(['store_state' => $state]);
|
|
}
|
|
|
|
// 获取未审核数据
|
|
public static function get_unaudited_data()
|
|
{
|
|
return LocalStore::where(['store_state' => 0])->count();
|
|
}
|
|
} |