12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\controller;
- use think\facade\Db;
- use think\annotation\Route;
- use think\annotation\route\Middleware;
- use hg\apidoc\annotation as Apidoc;
- /**
- * @Apidoc\Title("ElaticSearch")
- * @Apidoc\Group("ElaticSearch")
- * @Apidoc\Sort (10)
- */
- class EsConnect extends \app\BaseController
- {
- /**
- * @Apidoc\Title("saveEs")
- * @Apidoc\Tag("saveEs")
- * @Apidoc\Method ("GET")
- * @Apidoc\Author ("ihavoc")
- * @Route("saveEs",method="GET")
- * @Middleware({"jwt"})
- */
- public function saveEs(){
- $res=Db::connect("elasticsearch")->name('enterprises')->select();
- return $this->JsonSucess($res);
- }
- }
|