dataLists(new PropertyOrderLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2024/09/19 14:48 */ public function add() { $params = (new PropertyOrderValidate())->post()->goCheck('add'); $result = PropertyOrderLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(PropertyOrderLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2024/09/19 14:48 */ public function edit() { $params = (new PropertyOrderValidate())->post()->goCheck('edit'); $result = PropertyOrderLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(PropertyOrderLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author likeadmin * @date 2024/09/19 14:48 */ public function delete() { $params = (new PropertyOrderValidate())->post()->goCheck('delete'); PropertyOrderLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2024/09/19 14:48 */ public function detail() { $params = (new PropertyOrderValidate())->goCheck('detail'); $result = PropertyOrderLogic::detail($params); return $this->data($result); } /** * @notes 客服下工单 * @return \think\response\Json * @author likeadmin * @date 2024/09/19 14:48 */ public function placeOrder() { $serviceOrderParams = (new ServiceOrderValidate())->post()->goCheck('add'); if (empty($serviceOrderParams['id'])){ return $this->fail('物业单id不能为空'); } $result = PropertyOrderLogic::placeOrder($serviceOrderParams); if (true === $result) { return $this->success('客服下单成功', [], 1, 1); } return $this->fail(PropertyOrderLogic::getError()); } }