抽奖 maps为空
This commit is contained in:
@@ -134,11 +134,11 @@ public class DiscSpinningController {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "{\"sum\":\"总抽奖次数\",\"count\":\"剩余抽奖次数\"}"),
|
||||
})
|
||||
public Result drawCount(@ApiIgnore @RequestAttribute("userId") Long userId,@Nullable @ApiIgnore @RequestBody Map maps) {
|
||||
public Result drawCount(@ApiIgnore @RequestAttribute("userId") Long userId, @Nullable @ApiIgnore @RequestBody Map maps) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
int drawCount = Integer.parseInt(commonRepository.findOne(901).getValue());
|
||||
map.put("sum", drawCount);
|
||||
if (maps!=null && maps.containsKey("source") && "task".equals(maps.get("source"))) {
|
||||
if (maps != null && maps.containsKey("source") && "task".equals(maps.get("source"))) {
|
||||
//任务可抽奖次数
|
||||
|
||||
} else {
|
||||
@@ -158,10 +158,10 @@ public class DiscSpinningController {
|
||||
@ApiImplicitParam(name = "source", value = "`task`任务拉起抽奖 或者 `order` 订单拉起抽奖", dataTypeClass = String.class, paramType = "body"),
|
||||
})
|
||||
@ApiOperation("抽取大转盘")
|
||||
public Result draw(@ApiIgnore @RequestAttribute("userId") Long userId,@Nullable @ApiIgnore @RequestBody Map maps) {
|
||||
public Result draw(@ApiIgnore @RequestAttribute("userId") Long userId, @Nullable @ApiIgnore @RequestBody Map maps) {
|
||||
double amount = 0;
|
||||
Long orderId = null;
|
||||
if (maps!=null && !maps.containsKey("source") && !"task".equals(maps.get("source"))) {
|
||||
if (maps != null && !maps.containsKey("source") && !"task".equals(maps.get("source"))) {
|
||||
//任务抽奖
|
||||
int drawCount = Integer.parseInt(commonRepository.findOne(901).getValue());
|
||||
Integer i = recordService.countDraw(userId);
|
||||
@@ -176,7 +176,7 @@ public class DiscSpinningController {
|
||||
}
|
||||
}
|
||||
return new Result().put("data",
|
||||
draws(amount, orderId, userId, maps.get("source") == null ? "order" : maps.get("source").toString()));
|
||||
draws(amount, orderId, userId, maps == null || maps.get("source") == null ? "order" : maps.get("source").toString()));
|
||||
}
|
||||
|
||||
@PostMapping("/app/discSpinning/receive")
|
||||
|
||||
Reference in New Issue
Block a user