修改如果结束次数为0就不限次数判断

Change-Id: I1284e02f23f49b80e3d94db800f03088dabaab5c
This commit is contained in:
vguanyiwgd 2024-06-06 16:37:24 +08:00
parent edf22f688e
commit 4cfcc5b2a6
1 changed files with 11 additions and 1 deletions

View File

@ -55,9 +55,14 @@ class CI_Recharge_config {
if($year_count != 0){
$year_count = $year_count+1;
}
if($v['many_times_consume_start'] == 0 && $v['many_times_consume_end'] == 0){
if($v['many_times_consume_start'] == 0 && $v['many_times_consume_end'] == 0) {
// 无限制
$gift_fee = $v['price'];
}elseif($v['many_times_consume_end'] == 0){
// 结束无限制,只判断开始
if($year_count >= $v['many_times_consume_start']){
$gift_fee = $v['price'];
}
}elseif($year_count >= $v['many_times_consume_start'] && $year_count <= $v['many_times_consume_end']){
// 在规则的次数内
$gift_fee = $v['price'];
@ -74,6 +79,11 @@ class CI_Recharge_config {
if($v['many_times_consume_start'] == 0 && $v['many_times_consume_end'] == 0) {
// 无限制
$gift_fee = $v['price'];
}elseif($v['many_times_consume_end'] == 0){
// 结束无限制,只判断开始
if($count >= $v['many_times_consume_start']){
$gift_fee = $v['price'];
}
}elseif($count >= $v['many_times_consume_start'] && $count <= $v['many_times_consume_end']){
// 在规则的次数内
$gift_fee = $v['price'];