<?php

namespace App\Http\Controllers\API\Admin\YeWu;

use Illuminate\Support\Facades\DB;

class BlackListController
{
    public function GetList()
    {
        $list = DB::table('s_blacklist')->where('is_del',0);

        $count =$list ->count();
        $list = $list ->get();
        return \Yz::Return(true,'操作成功',['list'=>$list,'count'=>$count]);
    }
    public function Delete()
    {
        $id = request('id');
        if(empty($id)){
            return \Yz::echoError1('参数错误');
        }
        $d=DB::table('s_blacklist')
            ->where('id',$id)
            ->update(['is_del'=>1]);
        if($d){
            return \Yz::Return(true,'操作成功');
        }else{
            return \Yz::echoError1('删除失败');
        }

    }
}
