request->params([ ["create_year_month",""], ["create_date",""], ["source_channel",""], ["source",""], ["consultant",""], ["name",""], ["age",""], ["gender",""], ["phone_number",""], ["demand",""], ["purchasing_power",""], ["cognitive_idea",""], ["optional_class_time",""], ["distance",""], ["decision_maker",""], ["initial_intent",""], ["campus",""] ]); return success((new CustomerResourcesService())->getPage($data)); } /** * 客户资源详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new CustomerResourcesService())->getInfo($id)); } /** * 添加客户资源 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["create_year_month",""], ["create_date","2025-05-16 17:34:54"], ["source_channel",""], ["source",""], ["consultant",""], ["name",""], ["age",0], ["gender",""], ["phone_number",""], ["demand",""], ["purchasing_power",""], ["cognitive_idea",""], ["optional_class_time",""], ["distance",""], ["decision_maker",""], ["initial_intent",""], ["campus",""], ]); $this->validate($data, 'app\validate\customer_resources\CustomerResources.add'); $id = (new CustomerResourcesService())->add($data); return success('ADD_SUCCESS', ['id' => $id]); } /** * 客户资源编辑 * @param $id 客户资源id * @return \think\Response */ public function edit(int $id){ $data = $this->request->params([ ["create_year_month",""], ["create_date","2025-05-16 17:34:54"], ["source_channel",""], ["source",""], ["consultant",""], ["name",""], ["age",0], ["gender",""], ["phone_number",""], ["demand",""], ["purchasing_power",""], ["cognitive_idea",""], ["optional_class_time",""], ["distance",""], ["decision_maker",""], ["initial_intent",""], ["campus",""], ]); $this->validate($data, 'app\validate\customer_resources\CustomerResources.edit'); (new CustomerResourcesService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 客户资源删除 * @param $id 客户资源id * @return \think\Response */ public function del(int $id){ (new CustomerResourcesService())->del($id); return success('DELETE_SUCCESS'); } }