| | |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.common.core.utils.page.CollUtils; |
| | | import com.xinquan.common.core.utils.page.PageDTO; |
| | | import com.xinquan.common.log.annotation.Log; |
| | | import com.xinquan.common.log.enums.BusinessType; |
| | | import com.xinquan.common.security.utils.SecurityUtils; |
| | | import com.xinquan.course.api.domain.Course; |
| | | import com.xinquan.course.api.domain.CourseCategory; |
| | |
| | | |
| | | @PostMapping("/addPrize") |
| | | @ApiOperation(value = "新增奖品管理", tags = "管理后台-奖品管理") |
| | | @Log(title = "【奖品管理】新增奖品", businessType = BusinessType.INSERT) |
| | | |
| | | public R addPrize(@RequestBody Prize homeBackgroundMusic) { |
| | | homeBackgroundMusic.setCreateBy(SecurityUtils.getUsername()); |
| | | homeBackgroundMusic.setCreateTime(LocalDateTime.now()); |
| | |
| | | return R.ok(prizeService.getById(uid)); |
| | | } |
| | | @GetMapping("/updateState") |
| | | @Log(title = "【奖品管理】修改奖品上下架状态", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改奖品管理上下架状态", tags = "管理后台-奖品管理") |
| | | public R updateState(String uid) { |
| | | Prize byId = prizeService.getById(uid); |
| | |
| | | } |
| | | @PostMapping("/updatePrize") |
| | | @ApiOperation(value = "修改奖品管理", tags = "管理后台-奖品管理") |
| | | @Log(title = "【奖品管理】修改奖品", businessType = BusinessType.UPDATE) |
| | | public R updatePrize(@RequestBody Prize homeBackgroundMusic) { |
| | | homeBackgroundMusic.setUpdateBy(SecurityUtils.getUsername()); |
| | | homeBackgroundMusic.setUpdateTime(LocalDateTime.now()); |
| | |
| | | } |
| | | @PostMapping("/deletePrize") |
| | | @ApiOperation(value = "批量删除", tags = "管理后台-奖品管理") |
| | | @Log(title = "【奖品管理】批量删除", businessType = BusinessType.DELETE) |
| | | public R deletePrize(String ids) { |
| | | List<Long> collect = Arrays.stream(ids.split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | for (Long l : collect) { |