You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
3.3 KiB
113 lines
3.3 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
// +----------------------------------------------------------------------
|
|
// | 官方网址:https://www.niucloud.com
|
|
// +----------------------------------------------------------------------
|
|
// | niucloud团队 版权所有 开源版本可自由商用
|
|
// +----------------------------------------------------------------------
|
|
// | Author: Niucloud Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\adminapi\controller\six_speed;
|
|
|
|
use core\base\BaseAdminController;
|
|
use app\service\admin\six_speed\SixSpeedService;
|
|
|
|
|
|
/**
|
|
* 六一速控制器
|
|
* Class SixSpeed
|
|
* @package app\adminapi\controller\six_speed
|
|
*/
|
|
class SixSpeed extends BaseAdminController
|
|
{
|
|
/**
|
|
* 获取六一速列表
|
|
* @return \think\Response
|
|
*/
|
|
public function lists(){
|
|
$data = $this->request->params([
|
|
|
|
]);
|
|
return success((new SixSpeedService())->getPage($data));
|
|
}
|
|
|
|
/**
|
|
* 六一速详情
|
|
* @param int $id
|
|
* @return \think\Response
|
|
*/
|
|
public function info(int $id){
|
|
return success((new SixSpeedService())->getInfo($id));
|
|
}
|
|
|
|
/**
|
|
* 添加六一速
|
|
* @return \think\Response
|
|
*/
|
|
public function add(){
|
|
$data = $this->request->params([
|
|
["purchase_power",""],
|
|
["concept_awareness",""],
|
|
["preferred_class_time",""],
|
|
["distance",""],
|
|
["communication",""],
|
|
["promised_visit_time","2025-05-18 16:21:59"],
|
|
["actual_visit_time","2025-05-18 16:21:59"],
|
|
["call_intent",""],
|
|
["first_visit_status",""],
|
|
["second_visit_status",""],
|
|
["is_closed",0],
|
|
|
|
]);
|
|
$this->validate($data, 'app\validate\six_speed\SixSpeed.add');
|
|
$id = (new SixSpeedService())->add($data);
|
|
return success('ADD_SUCCESS', ['id' => $id]);
|
|
}
|
|
|
|
/**
|
|
* 六一速编辑
|
|
* @param $id 六一速id
|
|
* @return \think\Response
|
|
*/
|
|
public function edit(int $id){
|
|
$data = $this->request->params([
|
|
["purchase_power",""],
|
|
["concept_awareness",""],
|
|
["preferred_class_time",""],
|
|
["distance",""],
|
|
["communication",""],
|
|
["promised_visit_time","2025-05-18 16:21:59"],
|
|
["actual_visit_time","2025-05-18 16:21:59"],
|
|
["call_intent",""],
|
|
["first_visit_status",""],
|
|
["second_visit_status",""],
|
|
["is_closed",0],
|
|
|
|
]);
|
|
$this->validate($data, 'app\validate\six_speed\SixSpeed.edit');
|
|
(new SixSpeedService())->edit($id, $data);
|
|
return success('EDIT_SUCCESS');
|
|
}
|
|
|
|
/**
|
|
* 六一速删除
|
|
* @param $id 六一速id
|
|
* @return \think\Response
|
|
*/
|
|
public function del(int $id){
|
|
(new SixSpeedService())->del($id);
|
|
return success('DELETE_SUCCESS');
|
|
}
|
|
|
|
|
|
public function getPersonnelAll(){
|
|
return success(( new SixSpeedService())->getPersonnelAll());
|
|
}
|
|
|
|
public function getCustomerResourcesAll(){
|
|
return success(( new SixSpeedService())->getCustomerResourcesAll());
|
|
}
|
|
|
|
}
|
|
|