| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | |
| | | @PostMapping("add") |
| | | @ControllerEndpoint(operation = "新增", exceptionMessage = "新增失败") |
| | | public FebsResponse addActivity(@RequestBody @Valid AdminActivityAddDto adminActivityAddDto) { |
| | | return iActivityService.addActivity(adminActivityAddDto); |
| | | return iActivityService.addAdminActivity(adminActivityAddDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | public FebsResponse discountUpdate(@RequestBody @Valid AdminDiscountVO adminDiscountVO) { |
| | | return iActivityService.discountUpdate(adminDiscountVO); |
| | | } |
| | | |
| | | |
| | | @GetMapping(value = "/activityList") |
| | | public FebsResponse activityList() { |
| | | return new FebsResponse().success().data(iActivityService.getAdminActivityList()); |
| | | } |
| | | |
| | | /** |
| | | * 活动-开启 |
| | | */ |
| | | @GetMapping("changeState/{id}/{state}") |
| | | @ControllerEndpoint(operation = "活动-开启", exceptionMessage = "操作失败") |
| | | public FebsResponse changeState(@NotNull(message = "{required}") @PathVariable Long id |
| | | ,@NotNull(message = "{required}") @PathVariable Integer state) { |
| | | return iActivityService.changeAdminState(id,state); |
| | | } |
| | | |
| | | /** |
| | | * 活动-删除 |
| | | */ |
| | | @GetMapping("delActivity/{id}") |
| | | @ControllerEndpoint(operation = "活动-删除", exceptionMessage = "删除失败") |
| | | public FebsResponse delActivity(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return iActivityService.delAdminActivity(id); |
| | | } |
| | | } |