Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
ops
Commits
17647892
Commit
17647892
authored
Sep 03, 2024
by
wujipeng
Browse files
排期增删改查
parent
bc8ab99d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/sms/controller/ScheduleController.java
View file @
17647892
package
com.ruzhoukj.sms.controller
;
import
com.ruzhoukj.sms.common.PageResponse
;
import
com.ruzhoukj.sms.common.Result
;
import
com.ruzhoukj.sms.pojo.dto.ScheduleDTO
;
import
com.ruzhoukj.sms.pojo.vo.ScheduleVO
;
import
com.ruzhoukj.sms.service.ScheduleService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -31,4 +29,22 @@ public class ScheduleController {
List
<
ScheduleVO
>
list
=
scheduleService
.
pageSchedule
(
scheduleDTO
);
return
PageResponse
.
success
(
list
.
size
(),
list
);
}
@ApiOperation
(
value
=
"新增或修改"
)
@PostMapping
(
"/saveOrUpdate"
)
public
Result
saveOrUpdateSchedule
(
@RequestBody
ScheduleDTO
scheduleDTO
)
{
return
Result
.
success
(
scheduleService
.
saveOrUpdate
(
scheduleDTO
));
}
@ApiOperation
(
value
=
"删除"
)
@DeleteMapping
(
"/{id}"
)
public
Result
saveOrUpdateSchedule
(
@PathVariable
String
id
)
{
return
Result
.
success
(
scheduleService
.
removeById
(
id
));
}
@ApiOperation
(
value
=
"查询详情"
)
@GetMapping
(
"/{id}"
)
public
Result
getSchedule
(
@PathVariable
String
id
)
{
return
Result
.
success
(
scheduleService
.
getById
(
id
));
}
}
src/main/java/com/ruzhoukj/sms/service/ScheduleService.java
View file @
17647892
...
...
@@ -27,4 +27,6 @@ public interface ScheduleService extends IService<ScheduleEntity> {
* @return List<ScheduleVO>
*/
List
<
ScheduleVO
>
pageSchedule
(
ScheduleDTO
scheduleDTO
);
}
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