| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取红包配置 |
| | | */ |
| | | @ApiOperation(value = "获取红包配置", tags = {"管理后台-活动管理-签到红包"}) |
| | | @GetMapping("/getRedPackegeSet") |
| | | public R<RedPackegeSet> getRedPackegeSet(){ |
| | | return R.ok(redPackegeSetService.getOne(null)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加红包配置 |
| | | */ |
| | | @ApiOperation(value = "添加红包配置", tags = {"管理后台-活动管理-签到红包"}) |
| | | @GetMapping("/addRedPackegeSet") |
| | | public R<Void> addRedPackegeSet(RedPackegeSet redPackegeSet){ |
| | | RedPackegeSet one = redPackegeSetService.getOne(null); |
| | | if (one==null){ |
| | | redPackegeSet.setId(1); |
| | | redPackegeSetService.save(redPackegeSet); |
| | | }else { |
| | | if (one.getId()==null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | redPackegeSetService.updateById(redPackegeSet); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除红包配置 |
| | | */ |
| | | @ApiOperation(value = "删除红包配置", tags = {"管理后台-活动管理-签到红包"}) |
| | | @GetMapping("/delRedPackegeSet") |
| | | public R<Void> delRedPackegeSet(){ |
| | | redPackegeSetService.removeById(1); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |