|
@@ -12,6 +12,9 @@ import com.webchat.domain.vo.response.lottery.LotteryActivityVO;
|
|
|
import com.webchat.service.UserWalletService;
|
|
|
import com.webchat.service.lottery.LotteryActivityService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -24,7 +27,7 @@ import java.util.List;
|
|
|
* @Date 2022/11/16 23:40
|
|
|
* @description
|
|
|
*/
|
|
|
-@Api(tags = "【幸运抽奖】抽奖活动")
|
|
|
+@Api(tags = "【幸运抽奖】抽奖活动接口")
|
|
|
@RestController
|
|
|
@RequestMapping("/api/lottery/activity")
|
|
|
public class LotteryActivityController {
|
|
@@ -40,6 +43,7 @@ public class LotteryActivityController {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("创建或更新抽奖活动")
|
|
|
@ValidatePermission
|
|
|
@PostMapping("/save")
|
|
|
public APIResponseBean<Long> save(@RequestBody LotteryActivitySaveVO lotteryActivityVO) {
|
|
@@ -53,6 +57,7 @@ public class LotteryActivityController {
|
|
|
* @param lotteryActivityStatusUpdate
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("更新活动状态")
|
|
|
@ValidatePermission
|
|
|
@PostMapping("/updateStatus")
|
|
|
public APIResponseBean<Boolean> updateStatus(@RequestBody LotteryActivityStatusUpdateVO lotteryActivityStatusUpdate) {
|
|
@@ -67,6 +72,7 @@ public class LotteryActivityController {
|
|
|
* @param lotteryActivityId
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("抽奖活动详情查询")
|
|
|
@GetMapping("/detail/{lotteryActivityId}")
|
|
|
public APIResponseBean<LotteryActivityVO> detail(@PathVariable String lotteryActivityId) {
|
|
|
LotteryActivityVO lotteryActivity = lotteryActivityService.getLotteryActivityDetailFromCache(lotteryActivityId);
|
|
@@ -80,6 +86,7 @@ public class LotteryActivityController {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("最新一期活动信息查询")
|
|
|
@GetMapping("/last")
|
|
|
public APIResponseBean<LotteryActivityVO> last() {
|
|
|
return APIResponseBeanUtil.success(lotteryActivityService.getLastLotteryActivityBaseFromCache());
|
|
@@ -90,6 +97,7 @@ public class LotteryActivityController {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("最新一期活动ID查询")
|
|
|
@GetMapping("/lastId")
|
|
|
public APIResponseBean<String> lastId() {
|
|
|
return APIResponseBeanUtil.success(lotteryActivityService.getLastLotteryActivityIdFromCache());
|
|
@@ -102,9 +110,14 @@ public class LotteryActivityController {
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("历史活动列表查询")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "lastId", value = "活动id", dataType = "Long"),
|
|
|
+ @ApiImplicitParam(name = "size", value = "条数,默认8", dataType = "Integer")
|
|
|
+ })
|
|
|
@GetMapping("/history/list")
|
|
|
public APIResponseBean<List<LotteryActivityVO>> queryHistory(@RequestParam(value = "lastId", required = false) Long lastId,
|
|
|
- @RequestParam(value = "lastId", required = false, defaultValue = "8") Integer size) {
|
|
|
+ @RequestParam(value = "size", required = false, defaultValue = "8") Integer size) {
|
|
|
|
|
|
|
|
|
return APIResponseBeanUtil.success(lotteryActivityService.getHistoryActivityList(lastId, size));
|
|
@@ -118,6 +131,13 @@ public class LotteryActivityController {
|
|
|
* @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
|
+ @ApiOperation("活动列表检索")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "name", value = "活动名称", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "status", value = "状态", dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "pageNo", value = "页码,默认1", dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "页条数,默认8", dataType = "Integer")
|
|
|
+ })
|
|
|
@ValidatePermission
|
|
|
@GetMapping("/page")
|
|
|
public APIPageResponseBean<List<LotteryActivityBaseVO>> page(@RequestParam(value = "name", required = false) String name,
|