修改获取门店信息接口

This commit is contained in:
lcc
2024-08-11 18:25:32 +08:00
parent af4776ca68
commit b78dbf8c5f
+7 -4
View File
@@ -33,6 +33,7 @@ class OpenApi extends Wxapp
$en_time = $this->input_param('en_time');
$biz_id = $this->input_param('biz_id');
$to_customers = $this->input_param('to_customers');
$remark = $this->input_param('remark');
if (!$name || !$mobile) {
throw new Exception('参数错误', API_CODE_FAIL);
}
@@ -54,7 +55,7 @@ class OpenApi extends Wxapp
}
$ret = $this->clues_model->add($data);
if (is_numeric($ret)) {
$this->clues_entity->add_log($ret, '', '', '新增线索', 3);
$this->clues_entity->add_log($ret, 1, 'admin', $remark ?: '新增线索', 3);
}
if ($to_customers) { // 分配到客户池
$this->customers($ret);
@@ -91,7 +92,7 @@ class OpenApi extends Wxapp
$customers_id = $this->customers_model->add($add);
if ($customers_id) {
$this->clues_entity->add_log($re['id'], '', '', '转交门店跟进', 3);
$this->clues_entity->add_log($re['id'], 1, 'admin', '转交门店跟进', 3);
$this->clues_model->update(['status' => 1, 'status2' => 2], ['id' => $re['id']]);
//同步线索日志到客户日志
@@ -165,13 +166,15 @@ class OpenApi extends Wxapp
}
$row = $this->biz_model->get(['id' => $biz_id]);
$address = $row['address'] ?: '';
if($row['county_id']){
if ($row['county_id']) {
$areas = $this->area_model->get(['county_id' => $row['county_id']]);
$address = $areas['province_name'].$areas['city_name'].$areas['county_name'].$address;
$address = $areas['province_name'] . $areas['city_name'] . $areas['county_name'] . $address;
}
$data = [
'biz_name' => $row['biz_name'] ?: '',
'address' => $address,
'lat' => $row['lat'] ?: '',
'lng' => $row['lng'] ?: '',
];
return $data;
}