|
@@ -0,0 +1,48 @@
|
|
|
|
|
+package com.uas.platform.b2c.common.lottery.controller.api;
|
|
|
|
|
+
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.uas.platform.b2c.common.lottery.service.ActivityItemService;
|
|
|
|
|
+import com.uas.platform.b2c.common.lottery.service.LotteryService;
|
|
|
|
|
+import com.uas.platform.b2c.common.lottery.service.PrizeService;
|
|
|
|
|
+import com.uas.platform.b2c.common.lottery.service.UserInfoService;
|
|
|
|
|
+import com.uas.platform.b2c.common.lottery.service.WinningHistoryService;
|
|
|
|
|
+import com.uas.platform.b2c.common.search.util.PageParams;
|
|
|
|
|
+import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 推广抽奖活动接口
|
|
|
|
|
+ * Created by wangyc on 2018/9/12.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @version 2018/9/12 10:25 wangyc
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController(value = "api.LotteryController")
|
|
|
|
|
+@RequestMapping(value = "api/lottery")
|
|
|
|
|
+public class LotteryController {
|
|
|
|
|
+
|
|
|
|
|
+ private final WinningHistoryService winningHistoryService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ public LotteryController(UserInfoService userInfoService, ActivityItemService activityItemService, PrizeService prizeService, WinningHistoryService winningHistoryService, LotteryService lotteryService) {
|
|
|
|
|
+ this.winningHistoryService = winningHistoryService;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取当前等级信息、下一等级信息
|
|
|
|
|
+ * @param activityCode 活动编号
|
|
|
|
|
+ * @return
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取获奖记录
|
|
|
|
|
+ * @param activityCode 活动编号
|
|
|
|
|
+ * @param size 条数
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/user/winninghistories", method = RequestMethod.GET, produces = "application/json")
|
|
|
|
|
+ public ResultMap getWinningHistories(String activityCode, Integer size) {
|
|
|
|
|
+ return winningHistoryService.getWinningHistories(activityCode, size);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|