|
|
@@ -94,85 +94,53 @@ class UserServiceController extends BaseAdminController
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * @notes 编辑农耕分类
|
|
|
- * @return \think\response\Json
|
|
|
- * @author heshihu
|
|
|
- * @date 2022/2/21 17:49
|
|
|
- */
|
|
|
- public function edit()
|
|
|
- {
|
|
|
- $params = (new AgriculturalMachineryServiceCategoryValidate())->post()->goCheck('edit');
|
|
|
- $result = AgriculturalMachineryServiceCategoryLogic::edit($params);
|
|
|
- if (true === $result) {
|
|
|
- return $this->success('编辑成功', [], 1, 1);
|
|
|
- }
|
|
|
- return $this->fail(AgriculturalMachineryServiceCategoryLogic::getError());
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
- * @notes 删除农耕分类
|
|
|
+ * @notes 删除服务商
|
|
|
* @return \think\response\Json
|
|
|
* @author heshihu
|
|
|
* @date 2022/2/21 17:52
|
|
|
*/
|
|
|
public function delete()
|
|
|
{
|
|
|
- $params = (new AgriculturalMachineryServiceCategoryValidate())->post()->goCheck('delete');
|
|
|
- AgriculturalMachineryServiceCategoryLogic::delete($params);
|
|
|
+ $params = (new UserServiceValidate())->post()->goCheck('delete');
|
|
|
+ UserServiceLogic::delete($params);
|
|
|
return $this->success('删除成功', [], 1, 1);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @notes 农耕分类详情
|
|
|
+ * @notes 服务详情
|
|
|
* @return \think\response\Json
|
|
|
* @author heshihu
|
|
|
* @date 2022/2/21 17:54
|
|
|
*/
|
|
|
public function detail()
|
|
|
{
|
|
|
- $params = (new AgriculturalMachineryServiceCategoryValidate())->goCheck('detail');
|
|
|
- $result = AgriculturalMachineryServiceCategoryLogic::detail($params);
|
|
|
+ $params = (new UserServiceValidate())->goCheck('detail');
|
|
|
+ $result = UserServiceLogic::detail($params);
|
|
|
return $this->data($result);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @notes 更改农耕分类状态
|
|
|
+ * @notes 更改服务商状态
|
|
|
* @return \think\response\Json
|
|
|
* @author heshihu
|
|
|
* @date 2022/2/21 10:15
|
|
|
*/
|
|
|
public function updateStatus()
|
|
|
{
|
|
|
- $params = (new AgriculturalMachineryServiceCategoryValidate())->post()->goCheck('status');
|
|
|
- $result = AgriculturalMachineryServiceCategoryLogic::updateStatus($params);
|
|
|
+ $params = (new UserServiceValidate())->post()->goCheck('status');
|
|
|
+ $result = UserServiceLogic::updateStatus($params);
|
|
|
if (true === $result) {
|
|
|
return $this->success('修改成功', [], 1, 1);
|
|
|
}
|
|
|
- return $this->fail(AgriculturalMachineryServiceCategoryLogic::getError());
|
|
|
+ return $this->fail(UserServiceLogic::getError());
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @notes 获取有效农耕分类
|
|
|
- * @return \think\response\Json
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
- * @throws \think\db\exception\DbException
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
- * @author 段誉
|
|
|
- * @date 2022/10/13 10:54
|
|
|
- */
|
|
|
- public function getValidCate()
|
|
|
- {
|
|
|
- $params = (new AgriculturalMachineryServiceCategoryValidate())->get()->goCheck('list');
|
|
|
- $result = AgriculturalMachineryServiceCategoryLogic::getValidCateData($params);
|
|
|
- return $this->data($result);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* @notes 获取会员列表
|
|
|
* @return \think\response\Json
|
|
|
* @throws \think\db\exception\DataNotFoundException
|