Sfoglia il codice sorgente

游戏

release_toaliyun_real
xhxu 5 anni fa
parent
commit
3ae5ce66be
5 ha cambiato i file con 32 aggiunte e 2 eliminazioni
  1. +17
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxGameController.java
  2. +3
    -0
      mallinkAdmin/src/main/resources/db/migration/V202012290001__wx_game.sql
  3. +2
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java
  4. +7
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxGame.java
  5. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java

+ 17
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxGameController.java Vedi File

@@ -3,6 +3,7 @@ package com.iformall.controller.market;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog; import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result; import com.iformall.common.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController; import com.iformall.controller.base.BaseController;
@@ -54,6 +55,14 @@ public class WxGameController extends BaseController {
if (StringUtils.isBlank(wxGame.getCouponIds())) { if (StringUtils.isBlank(wxGame.getCouponIds())) {
wxGame.setCouponIds(JSONArray.toJSONString(new String[0])); 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.setStatus(EnumGameStatus.STATUS_THROW_IN.getCode());
wxGame.updateTenantInfo(getTenantInfo()); wxGame.updateTenantInfo(getTenantInfo());
wxGameService.saveOrUpdate(wxGame); wxGameService.saveOrUpdate(wxGame);
@@ -68,6 +77,14 @@ public class WxGameController extends BaseController {
if (StringUtils.isBlank(wxGame.getCouponIds())) { if (StringUtils.isBlank(wxGame.getCouponIds())) {
wxGame.setCouponIds(JSONArray.toJSONString(new String[0])); 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()); wxGame.updateTenantInfo(getTenantInfo());
wxGameService.saveOrUpdate(wxGame); wxGameService.saveOrUpdate(wxGame);
return new ResultData(); return new ResultData();


+ 3
- 0
mallinkAdmin/src/main/resources/db/migration/V202012290001__wx_game.sql Vedi File

@@ -0,0 +1,3 @@
ALTER TABLE `wx_game`
ADD COLUMN `play_credit_limit` int(11) NOT NULL DEFAULT -1 AFTER `award_limit`,
ADD COLUMN `play_credit` int(11) AFTER `play_credit_limit`;

+ 2
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java Vedi File

@@ -961,6 +961,8 @@ public class WxUserGrantController extends BaseController {
wxCreditHistory.setOperatorId(memberId); wxCreditHistory.setOperatorId(memberId);
wxCreditHistoryService.saveOrUpdate(wxCreditHistory); wxCreditHistoryService.saveOrUpdate(wxCreditHistory);
wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, record,tenantEntity); wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT, record,tenantEntity);

removeCacheCUser();
} }
return new ResultData(); return new ResultData();
} }


+ 7
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxGame.java Vedi File

@@ -34,9 +34,15 @@ public class WxGame extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "触发条件(-1:不受限制,1:登录触发, 2:主页固定入口,3:购买触发,4:核销触发,5:公众号链接触发,6:二维码触发)", name = "triggleAction") @io.swagger.annotations.ApiModelProperty(value = "触发条件(-1:不受限制,1:登录触发, 2:主页固定入口,3:购买触发,4:核销触发,5:公众号链接触发,6:二维码触发)", name = "triggleAction")
private Integer triggleAction; private Integer triggleAction;


@io.swagger.annotations.ApiModelProperty(value = "限玩次数(0:不受限制,n:限玩次数)", name = "playLimit")
@io.swagger.annotations.ApiModelProperty(value = "限玩免费次数(-1:不能免费玩,0:不受限制,n:限玩次数)", name = "playLimit")
private Integer playLimit; private Integer playLimit;


@io.swagger.annotations.ApiModelProperty(value = "限玩积分次数(-1:不能积分玩法,0:不受限制,n:限玩次数)", name = "playCreditLimit")
private Integer playCreditLimit;

@io.swagger.annotations.ApiModelProperty(value = "积分玩法消耗积分", name = "playCredit")
private Integer playCredit;

@io.swagger.annotations.ApiModelProperty(value = "限奖次数(0:不受限制,n:限奖次数)", name = "awardLimit") @io.swagger.annotations.ApiModelProperty(value = "限奖次数(0:不受限制,n:限奖次数)", name = "awardLimit")
private Integer awardLimit; private Integer awardLimit;




+ 3
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java Vedi File

@@ -280,7 +280,9 @@ public class WxGameServiceImpl implements WxGameService {
Long couponId = obj.getLong("couponId"); Long couponId = obj.getLong("couponId");
int weight = obj.getIntValue("weight"); int weight = obj.getIntValue("weight");
try { try {
saveOrUpdateCouponChannel(couponId, wxCouponChannelsMap, record);
if(couponId != null){
saveOrUpdateCouponChannel(couponId, wxCouponChannelsMap, record);
}
} catch (MallinkException e) { } catch (MallinkException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }


Caricamento…
Annulla
Salva