Merge pull request 'master-fix-0914' (#22) from master-fix-0914 into master
Reviewed-on: #22
This commit is contained in:
commit
78df05614e
@ -371,6 +371,7 @@ class CompanyController extends BaseAdminController
|
||||
if (empty($params['master_name'])) {
|
||||
throw new Exception('商户法人名称不能为空');
|
||||
}
|
||||
|
||||
$data = [
|
||||
'mer_intention_id' => $params['mer_intention_id'], // 商城商户入驻申请id,签约完成后回调使用
|
||||
'company_name' => $params['company_name'],
|
||||
@ -378,10 +379,12 @@ class CompanyController extends BaseAdminController
|
||||
'city' => $params['city'],
|
||||
'area' => $params['area'],
|
||||
'street' => $params['street'],
|
||||
'address' => $params['address'],
|
||||
'master_name' => $params['master_name'],
|
||||
'master_phone' => $params['master_phone'],
|
||||
'master_email' => substr(md5(uniqid()),rand(0, 22),10)."@lihai.com",
|
||||
'face_create_status' => 1
|
||||
'face_create_status' => 1,
|
||||
'qualification' => $params['images']
|
||||
];
|
||||
|
||||
$shopMerchantModel = ShopMerchant::create($data);
|
||||
|
@ -59,6 +59,7 @@ class ShopContractLists extends BaseAdminDataLists implements ListsSearchInterfa
|
||||
->field(['id', 'contract_no', 'party_a', 'party_b', 'area_manager', 'type', 'evidence_url', 'check_status', 'status'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->with(['partyA', 'partyB'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
@ -119,6 +119,10 @@ class ShopContractLogic extends BaseLogic
|
||||
province,city,area,street,village,brigade,address,province province_name,city city_name,area area_name,street street_name,village village_name,brigade brigade_name,master_phone,master_name,
|
||||
qualification'];
|
||||
$shopMerchant = ShopMerchant::where(['id' => $data['party_b']])->field($field)->find()->toArray();
|
||||
$shopMerchant['qualification'] = json_decode($shopMerchant['qualification'], true);
|
||||
if($shopMerchant['qualification'] && isset($shopMerchant['qualification']['other_qualifications'])){
|
||||
$shopMerchant['qualification']['other_qualifications']=json_decode($shopMerchant['qualification']['other_qualifications'],true);
|
||||
}
|
||||
return $shopMerchant;
|
||||
})
|
||||
->withAttr('party_a_info', function ($value, $data) {
|
||||
@ -126,7 +130,9 @@ class ShopContractLogic extends BaseLogic
|
||||
province,city,area,street,village,brigade,address,province province_name,city city_name,area area_name,street street_name,village village_name,brigade brigade_name,master_phone,master_name,
|
||||
qualification'];
|
||||
$shopMerchant = ShopMerchant::where(['id' => $data['party_a']])->field($field)->find()->toArray();
|
||||
|
||||
if($shopMerchant['qualification'] && isset($shopMerchant['qualification']['other_qualifications'])){
|
||||
$shopMerchant['qualification']['other_qualifications']=json_decode($shopMerchant['qualification']['other_qualifications'],true);
|
||||
}
|
||||
return $shopMerchant;
|
||||
})
|
||||
->withAttr('status_name', function ($value, $data) {
|
||||
|
@ -18,11 +18,21 @@ class JunziqianController extends BaseApiController
|
||||
public array $notNeedLogin = ['download_file'];
|
||||
|
||||
/**请求地址*/
|
||||
private $serviceUrl = env('junzi.url');
|
||||
private $serviceUrl;
|
||||
/**appkey*/
|
||||
private $appkey =env('junzi.app_key');
|
||||
private $appkey;
|
||||
/**secret*/
|
||||
private $appSecret = env('junzi.app_secret');
|
||||
private $appSecret;
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
$this->serviceUrl=env('junzi.url_prefix');
|
||||
$this->appkey=env('junzi.app_key');
|
||||
$this->appSecret=env('junzi.app_secret');
|
||||
|
||||
parent::initialize();
|
||||
|
||||
}
|
||||
/**请求地址*/
|
||||
// private $serviceUrl = 'https://api.junziqian.com';
|
||||
// /**appkey*/
|
||||
|
@ -8,7 +8,9 @@ class RedisLogic extends BaseLogic
|
||||
{
|
||||
$redisInstance = new \Redis();
|
||||
$redisInstance->connect(env('redis.host'));
|
||||
$redisInstance->auth(env('redis.auth'));
|
||||
if (env('redis.auth', '') != '') {
|
||||
$redisInstance->auth(env('redis.auth'));
|
||||
}
|
||||
return $redisInstance;
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
use app\common\model\dict\DictData;
|
||||
|
||||
|
||||
/**
|
||||
@ -28,7 +28,51 @@ class ShopContract extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'shop_contract';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联company_name
|
||||
* @return \think\model\relation\HasOne
|
||||
* @author likeadmin
|
||||
* @date 2023/07/18 14:28
|
||||
*/
|
||||
public function companyName()
|
||||
{
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'company_id')->bind(['company_name']);
|
||||
}
|
||||
public function company()
|
||||
{
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'company_id');
|
||||
}
|
||||
public function partyAInfo()
|
||||
{
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'party_a')->field('id,company_name,organization_code,master_name,master_phone,master_email,area_manager');
|
||||
}
|
||||
public function partyBInfo()
|
||||
{
|
||||
// halt($this->type);
|
||||
// if($this->type==1){
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'party_b')->field('id,company_name,organization_code,master_name,master_phone,master_email,area_manager');
|
||||
// }else{
|
||||
// return $this->hasOne(User::class, 'id', 'party_b')->field('id,nickname company_name');
|
||||
// }
|
||||
}
|
||||
public function partyA()
|
||||
{
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'party_a')->bind(['party_a_name' => 'company_name']);
|
||||
}
|
||||
public function partyB()
|
||||
{
|
||||
return $this->hasOne(ShopMerchant::class, 'id', 'party_b')->bind(['party_b_name' => 'company_name']);
|
||||
}
|
||||
public function contractType()
|
||||
{
|
||||
return $this->hasOne(DictData::class, 'id', 'contract_type')->bind(['contract_type_name' => 'name']);
|
||||
}
|
||||
|
||||
public function getContractTypeNameAttr($value)
|
||||
{
|
||||
return DictData::where(['id' => $this->contract_type])->value('name');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user