dataLists(new DeliveryServiceLists()); } /** * @notes 添加配送员 * @return \think\response\Json * @author admin * @date 2024/08/08 14:07 */ public function add() { $params = (new DeliveryServiceValidate())->post()->goCheck('add'); $result = DeliveryServiceLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(DeliveryServiceLogic::getError()); } /** * @notes 编辑配送员 * @return \think\response\Json * @author admin * @date 2024/08/08 14:07 */ public function edit() { $params = (new DeliveryServiceValidate())->post()->goCheck('edit'); $result = DeliveryServiceLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(DeliveryServiceLogic::getError()); } /** * @notes 删除配送员 * @return \think\response\Json * @author admin * @date 2024/08/08 14:07 */ public function delete() { $params = (new DeliveryServiceValidate())->post()->goCheck('delete'); DeliveryServiceLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取配送员详情 * @return \think\response\Json * @author admin * @date 2024/08/08 14:07 */ public function detail() { $params = (new DeliveryServiceValidate())->goCheck('detail'); $result = DeliveryServiceLogic::detail($params); return $this->data($result); } }