add
This commit is contained in:
21
app/api/model/Announcement.php
Normal file
21
app/api/model/Announcement.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
|
||||
use app\common\library\DatabaseRoute;
|
||||
use app\common\model\Common;
|
||||
use ba\Random;
|
||||
use think\facade\Db;
|
||||
use think\Model;
|
||||
|
||||
class Announcement extends Model
|
||||
{
|
||||
|
||||
public static function list($type)
|
||||
{
|
||||
$res_data = Db::connect(config('database.search_library'))->name('announcement')->where(['type' => $type, 'state' => 1])->select()->toArray();
|
||||
$res_data = convertToCamelCase($res_data);
|
||||
return returnSuccessData($res_data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user