|
|
@ -15,6 +15,7 @@ import com.hai.enum_type.ActivityInfoStatus; |
|
|
|
import com.hai.model.HighUserModel; |
|
|
|
import com.hai.model.HighUserModel; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.service.HighActivityAwardService; |
|
|
|
import com.hai.service.HighActivityAwardService; |
|
|
|
|
|
|
|
import com.hai.service.HighActivityAwardUserService; |
|
|
|
import com.hai.service.HighActivityInfoService; |
|
|
|
import com.hai.service.HighActivityInfoService; |
|
|
|
import com.hai.service.HighActivityUserLotteryNumService; |
|
|
|
import com.hai.service.HighActivityUserLotteryNumService; |
|
|
|
import com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException; |
|
|
|
import com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException; |
|
|
@ -53,6 +54,9 @@ public class HighActivityController { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighActivityAwardService highActivityAwardService; |
|
|
|
private HighActivityAwardService highActivityAwardService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighActivityAwardUserService highActivityAwardUserService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighActivityUserLotteryNumService highActivityUserLotteryNumService; |
|
|
|
private HighActivityUserLotteryNumService highActivityUserLotteryNumService; |
|
|
|
|
|
|
|
|
|
|
@ -69,7 +73,6 @@ public class HighActivityController { |
|
|
|
log.error("HighActivityController --> lottery() error!", "参数错误"); |
|
|
|
log.error("HighActivityController --> lottery() error!", "参数错误"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 活动信息
|
|
|
|
// 活动信息
|
|
|
|
HighActivityInfo activityInfo = highActivityInfoService.getDetailById(body.getLong("activityId")); |
|
|
|
HighActivityInfo activityInfo = highActivityInfoService.getDetailById(body.getLong("activityId")); |
|
|
|
if (activityInfo == null) { |
|
|
|
if (activityInfo == null) { |
|
|
@ -102,10 +105,10 @@ public class HighActivityController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getLotteryNum",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/getUserLotteryNum",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询抽奖数量") |
|
|
|
@ApiOperation(value = "获取用户抽奖次数") |
|
|
|
public ResponseData getLotteryNum(@RequestParam(name = "activityId", required = true) Long activityId, |
|
|
|
public ResponseData getUserLotteryNum(@RequestParam(name = "activityId", required = true) Long activityId, |
|
|
|
HttpServletRequest request) { |
|
|
|
HttpServletRequest request) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 用户
|
|
|
|
// 用户
|
|
|
@ -160,5 +163,19 @@ public class HighActivityController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getWinLotteryList",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "查询中奖记录") |
|
|
|
|
|
|
|
public ResponseData getWinLotteryList(@RequestParam(name = "activityId", required = true) Long activityId) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highActivityAwardUserService.getWinLotteryList(activityId)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighActivityController -> getWinLotteryList() error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|