TaskSystem/app/api/controller/ShopCallController.php
2024-01-13 15:21:35 +08:00

36 lines
1.1 KiB
PHP

<?php
namespace app\api\controller;
use app\common\logic\task\TaskLogic;
use app\common\model\auth\Admin;
use app\common\model\Company;
use app\common\model\dict\DictData;
use app\common\model\task\Task;
use app\common\model\task_template\TaskTemplate;
use think\Exception;
use think\facade\Db;
use think\facade\Log;
/**
* 商城主动调用接口类
*/
class ShopCallController extends BaseApiController
{
public array $notNeedLogin = ['getVillageCompany'];
public function getVillageCompany()
{
$param = $this->request->param();
$geoVillage = Db::name('geo_village')->where('village_id', $param['village_id'])->find();
$company = Company::where(['village' =>$geoVillage['village_code'], 'company_type'=>17])->find();
$find= Admin::where('id', $company['admin_id'])->field('avatar,id_card')->find();
if($find){
$company['avatar']=$find['avatar'];
$company['id_card']=$find['id_card'];
}else{
$company['avatar']='';
$company['id_card']='';
}
return $this->success('成功', compact('company'));
}
}