LocalStore::where(['del' => 0])->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]); } /** * @notes 删除本地商家数据 */ public static function del_data($id) { return LocalStore::where(['lstore_id' => $id, 'del' => 0])->update([ 'del' => 1, 'del_time' => date('Y-m-d H:i:s') ]); } /** * @notes 获取未审核数据 */ public static function get_unaudited_data() { return LocalStore::where(['store_state' => 0])->count(); } }