Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
external
on-site-service
Commits
8c07daa1
Commit
8c07daa1
authored
Jul 26, 2022
by
lining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 维修工接口合并
parent
dec72b89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
ServiceWorkerController.java
...ce/miniapp/controller/worker/ServiceWorkerController.java
+12
-18
No files found.
mini-app/src/main/java/com/onsiteservice/miniapp/controller/worker/ServiceWorkerController.java
View file @
8c07daa1
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
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment