21 lines
491 B
PHP
21 lines
491 B
PHP
<?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('think-orm.search_library'))->name('announcement')->where(['type' => $type, 'state' => 1])->select()->toArray();
|
|
$res_data = convertToCamelCase($res_data);
|
|
return returnSuccessData($res_data);
|
|
}
|
|
|
|
} |