29 lines
639 B
PHP
29 lines
639 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]);
|
|
}
|
|
} |