修改IAP为iOS充值
This commit is contained in:
@@ -32,7 +32,7 @@ public class ChargeUserLimitAdminVo extends ChargeUserLimit {
|
||||
* IAP
|
||||
*/
|
||||
@ApiModelProperty("IAP")
|
||||
private Integer isIap = 0;
|
||||
private Integer isIos = 0;
|
||||
|
||||
/**
|
||||
* Google
|
||||
@@ -46,17 +46,17 @@ public class ChargeUserLimitAdminVo extends ChargeUserLimit {
|
||||
@ApiModelProperty("H5")
|
||||
private Integer isH5 = 0;
|
||||
|
||||
public Integer getIsIap() {
|
||||
public Integer getIsIos() {
|
||||
Integer limitType = this.getLimitType();
|
||||
if (limitType == null) {
|
||||
limitType = 0;
|
||||
}
|
||||
if ((limitType & ChargeUserLimitConstant.LIMIT_TYPE_OF_IAP) != 0) {
|
||||
isIap = Constant.Yes1No0.YES;
|
||||
if ((limitType & ChargeUserLimitConstant.LIMIT_TYPE_OF_IOS) != 0) {
|
||||
isIos = Constant.Yes1No0.YES;
|
||||
} else {
|
||||
isIap = Constant.Yes1No0.NO;
|
||||
isIos = Constant.Yes1No0.NO;
|
||||
}
|
||||
return isIap;
|
||||
return isIos;
|
||||
}
|
||||
|
||||
public Integer getIsGoogle() {
|
||||
|
@@ -47,7 +47,7 @@
|
||||
<div class="form-group">
|
||||
<label for="limitType" class="col-sm-3 control-label">限制内容:</label>
|
||||
<div class="col-sm-9" id="limitType">
|
||||
<input type="checkbox" name="limitType" value="1"/>IAP充值<br>
|
||||
<input type="checkbox" name="limitType" value="1"/>iOS充值<br>
|
||||
<input type="checkbox" name="limitType" value="2"/>Google充值<br>
|
||||
<input type="checkbox" name="limitType" value="4"/>H5充值<br>
|
||||
</div>
|
||||
@@ -87,11 +87,11 @@
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
var value = '';
|
||||
var isIap = row.isIap;
|
||||
var isIos = row.isIos;
|
||||
var isGoogle = row.isGoogle;
|
||||
var isH5 = row.isH5;
|
||||
if (isIap) {
|
||||
value += 'IAP充值<br/>';
|
||||
if (isIos) {
|
||||
value += 'iOS充值<br/>';
|
||||
}
|
||||
if (isGoogle) {
|
||||
value += 'Google充值<br/>';
|
||||
|
@@ -830,6 +830,8 @@ public enum BusiStatus {
|
||||
NOT_FOUNT_REWARD_ITEM(5002, "找不到对应奖励道具"),
|
||||
UNENOUGH_ACT_PROP_ITEM(5003, "活动道具不足"),
|
||||
|
||||
CHARGE_ERROR(50000, "儲值失敗,請聯繫客服處理~"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@ package com.accompany.payment.constant;
|
||||
*/
|
||||
public interface ChargeUserLimitConstant {
|
||||
|
||||
int LIMIT_TYPE_OF_IAP = 0b1;
|
||||
int LIMIT_TYPE_OF_IOS = 0b1;
|
||||
|
||||
int LIMIT_TYPE_OF_GOOGLE = 0b10;
|
||||
|
||||
|
@@ -32,9 +32,9 @@ public class ChargeUserLimit {
|
||||
private Long uid;
|
||||
|
||||
/**
|
||||
* 限制类型 0b1:IAP充值 0b10:Google充值 0b100:H5充值
|
||||
* 限制类型 0b1:iOS充值 0b10:Google充值 0b100:H5充值
|
||||
*/
|
||||
@ApiModelProperty("限制类型 0b1:IAP充值 0b10:Google充值 0b100:H5充值")
|
||||
@ApiModelProperty("限制类型 0b1:iOS充值 0b10:Google充值 0b100:H5充值")
|
||||
private Integer limitType;
|
||||
|
||||
/**
|
||||
|
@@ -2,6 +2,7 @@ package com.accompany.payment.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.accompany.common.exception.ApiException;
|
||||
import com.accompany.common.status.BusiStatus;
|
||||
import com.accompany.payment.mapper.ChargeUserLimitMapper;
|
||||
import com.accompany.payment.model.ChargeUserLimit;
|
||||
import com.accompany.payment.service.ChargeUserLimitService;
|
||||
@@ -37,7 +38,7 @@ public class ChargeUserLimitServiceImpl extends ServiceImpl<ChargeUserLimitMappe
|
||||
@Override
|
||||
public void chargeLimitCheck(Long uid, Integer limitType) {
|
||||
if (isLimit(uid, limitType)) {
|
||||
throw new ApiException("儲值失敗,請聯繫客服處理");
|
||||
throw new ApiException(BusiStatus.CHARGE_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user