tag_407
This commit is contained in:
@@ -261,16 +261,29 @@ Class Lichene extends HD_Controller
|
||||
* Notes:显示客户标签
|
||||
* Created on: 2022/3/24 15:01
|
||||
* Created by: dengbw
|
||||
* https://liche-api-dev.xiaoyu.com/wechat/lichene/show_corp_tag
|
||||
* https://liche-api-dev.xiaoyu.com/wechat/lichene/show_corp_tag?sd=1
|
||||
* https://api.liche.cn/wechat/lichene/show_corp_tag
|
||||
*/
|
||||
public function show_corp_tag()
|
||||
{
|
||||
$this->load->model('receiver/receiver_customer_tag_model', 'mdCustomerTag');
|
||||
$param = $this->input->get();
|
||||
if ($param['sd']) {
|
||||
$where = ['pid' => 0];
|
||||
$select = 'id,name,qy_id,sort,status';
|
||||
} else {
|
||||
$where = ["status" => 1, 'pid' => 0];
|
||||
$select = 'id,name,qy_id,sort';
|
||||
}
|
||||
$list = [];
|
||||
$res = $this->mdCustomerTag->select(["status" => 1, 'pid' => 0], "sort desc,id desc", 0, 0, 'id,name,qy_id,sort');
|
||||
$res = $this->mdCustomerTag->select($where, "sort desc,id desc", 0, 0, $select);
|
||||
foreach ($res as $key => $value) {
|
||||
$res_tag = $this->mdCustomerTag->select(["status" => 1, 'pid' => $value['id']], "sort desc,id desc", 0, 0, 'id,name,qy_id,sort');
|
||||
if ($param['sd']) {
|
||||
$where2 = ["status" => 1, 'pid' => $value['id']];
|
||||
} else {
|
||||
$where2 = ['pid' => $value['id']];
|
||||
}
|
||||
$res_tag = $this->mdCustomerTag->select($where2, "sort desc,id desc", 0, 0, $select);
|
||||
$value['options'] = $res_tag;
|
||||
$list[] = $value;
|
||||
}
|
||||
@@ -327,6 +340,25 @@ Class Lichene extends HD_Controller
|
||||
echo json_encode($re_yq, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:删除客户标签
|
||||
* Created on: 2022/4/06 15:01
|
||||
* Created by: dengbw
|
||||
* https://liche-api-dev.xiaoyu.com/wechat/lichene/del_tag?ids=1,2,3
|
||||
* https://api.liche.cn/wechat/lichene/del_tag
|
||||
*/
|
||||
public function del_tag()
|
||||
{
|
||||
$param = $this->input->get();
|
||||
if (!$param['ids']) {
|
||||
echo '无ids';
|
||||
exit;
|
||||
}
|
||||
$this->load->model('receiver/receiver_customer_tag_model', 'mdCustomerTag');
|
||||
$ret = $this->mdCustomerTag->delete(['status' => -1, "id in({$param['ids']})" => null]);
|
||||
print_r($ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:批量添加企业客户标签
|
||||
* Created on: 2022/3/24 15:01
|
||||
|
||||
Reference in New Issue
Block a user