Commit 8c07daa1 authored by lining's avatar lining

feat: 维修工接口合并

parent dec72b89
package com.onsiteservice.miniapp.controller.worker;
import com.onsiteservice.entity.service.ServiceWorker;
import com.onsiteservice.core.result.Result;
import com.onsiteservice.miniapp.controller.worker.vo.ServiceWorkerVO;
import com.onsiteservice.miniapp.service.worker.ServiceWorkerService;
import com.onsiteservice.core.result.Result;
import com.onsiteservice.dao.common.page.PageInfoVO;
import com.onsiteservice.dao.common.page.PageParams;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.NonNull;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import java.util.List;
import static com.onsiteservice.core.result.ResultGenerator.success;
import static com.onsiteservice.core.result.ResultGenerator.fail;
/**
* <P>维修工模块</P>
......@@ -40,15 +34,15 @@ public class ServiceWorkerController {
private ServiceWorkerService serviceWorkerService;
@ApiOperation(value = "查询全部维修工")
@GetMapping("all")
public Result<List<ServiceWorkerVO>> all() {
return success(serviceWorkerService.all());
}
// @ApiOperation(value = "查询全部维修工")
// @GetMapping("all")
// public Result<List<ServiceWorkerVO>> all() {
// return success(serviceWorkerService.all());
// }
@ApiOperation(value = "根据姓名查询")
@GetMapping("get/{name}")
public Result<List<ServiceWorkerVO>> getDetails(@ApiParam(name = "name", value = "维修工姓名") @PathVariable @NotBlank String name) {
@GetMapping("get")
public Result<List<ServiceWorkerVO>> getDetails(@ApiParam(name = "name", value = "维修工姓名") @RequestParam(required = false) String name) {
return success(serviceWorkerService.selectByName(name));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment