|
|
|
@@ -3,6 +3,7 @@ package com.iformall.controller.market; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.SystemControllerLog; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
@@ -54,6 +55,14 @@ public class WxGameController extends BaseController { |
|
|
|
if (StringUtils.isBlank(wxGame.getCouponIds())) { |
|
|
|
wxGame.setCouponIds(JSONArray.toJSONString(new String[0])); |
|
|
|
} |
|
|
|
if(wxGame.getPlayCreditLimit() != null && wxGame.getPlayCreditLimit() >= 0){ |
|
|
|
if(wxGame.getPlayCredit() == null || wxGame.getPlayCredit() <= 0){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"游戏消耗积分不能为空或为0"); |
|
|
|
} |
|
|
|
if(wxGame.getPlayLimit() == null || wxGame.getPlayLimit() == 0){ |
|
|
|
wxGame.setPlayLimit(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
wxGame.setStatus(EnumGameStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxGame.updateTenantInfo(getTenantInfo()); |
|
|
|
wxGameService.saveOrUpdate(wxGame); |
|
|
|
@@ -68,6 +77,14 @@ public class WxGameController extends BaseController { |
|
|
|
if (StringUtils.isBlank(wxGame.getCouponIds())) { |
|
|
|
wxGame.setCouponIds(JSONArray.toJSONString(new String[0])); |
|
|
|
} |
|
|
|
if(wxGame.getPlayCreditLimit() != null && wxGame.getPlayCreditLimit() >= 0){ |
|
|
|
if(wxGame.getPlayCredit() == null || wxGame.getPlayCredit() <= 0){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"游戏消耗积分不能为空或为0"); |
|
|
|
} |
|
|
|
if(wxGame.getPlayLimit() == null || wxGame.getPlayLimit() == 0){ |
|
|
|
wxGame.setPlayLimit(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
wxGame.updateTenantInfo(getTenantInfo()); |
|
|
|
wxGameService.saveOrUpdate(wxGame); |
|
|
|
return new ResultData(); |
|
|
|
|