信息收集接口

This commit is contained in:
chenbo 2024-01-25 10:48:00 +08:00
parent d91383849e
commit 45564895b9
1 changed files with 19 additions and 1 deletions

View File

@ -27,6 +27,7 @@ use Symfony\Component\HttpClient\HttpClient;
use think\cache\driver\Redis; use think\cache\driver\Redis;
use think\facade\Db; use think\facade\Db;
use think\facade\Log; use think\facade\Log;
use think\Model;
use think\model\Pivot; use think\model\Pivot;
use think\response\Json; use think\response\Json;
@ -38,7 +39,9 @@ use think\response\Json;
*/ */
class IndexController extends BaseApiController class IndexController extends BaseApiController
{ {
public array $notNeedLogin = ['index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty', 'notifyAuthentication', 'notifyVehicleContractUpdate','townCarRent','systemCarRent', 'selfCarRent', 'cancelRent', 'buyCar', 'vehicleCarList']; public array $notNeedLogin = ['index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty',
'notifyAuthentication', 'notifyVehicleContractUpdate','townCarRent','systemCarRent', 'selfCarRent',
'cancelRent', 'buyCar', 'vehicleCarList', 'addVillagerInfo'];
/** /**
* @notes 首页数据 * @notes 首页数据
@ -820,4 +823,19 @@ class IndexController extends BaseApiController
Db::name('company_authentication_fail_log')->insert(['company_id'=>$parmas['id'], 'log_type'=>3, 'fail_reason'=>$data['msg'], 'create_time'=>time()]); Db::name('company_authentication_fail_log')->insert(['company_id'=>$parmas['id'], 'log_type'=>3, 'fail_reason'=>$data['msg'], 'create_time'=>time()]);
} }
} }
public function addVillagerInfo()
{
$params = $this->request->post();
$params['house_rent_info'] = json_encode($params['house_rent_info']);
$params['land_rent_info'] = json_encode($params['land_rent_info']);
$params['product_info'] = json_encode($params['product_info']);
$params['idle_asset_rent_info'] = json_encode($params['idle_asset_rent_info']);
$params['house_decoration_construction'] = json_encode($params['house_decoration_construction']);
$params['create_time'] = time();
$params['update_time'] = time();
$model = Db::name('villager_information')->insertGetId($params);
return $this->success('添加成功');
}
} }