Change-Id: I6acb2e3fe695b9f40f9d5becf3f805f8cb53c0b3
This commit is contained in:
vguanyiwgd 2024-06-05 15:46:27 +08:00
parent c466edc96c
commit 49521eae27
3 changed files with 22 additions and 1 deletions

View File

@ -1047,6 +1047,19 @@ class Recharge extends CI_Controller
$data['supplierId'] = $this->session->userdata("supplierId");
$data['userTypeName'] = $userTypeInfo['name'];
$data['userInfo'] = $userInfo;
// 获取充值在赠送金额
$this->load->library('Recharge_config');
$rechargeInfo = $this->recharge_config->rechargeRule($userInfo, $userInfo['company_id'], $count, 2);
$rechargeInfo = json_decode($rechargeInfo, 1);
$data['giveFee'] = 0;
if($rechargeInfo['status'] == 1){
$giveFee = $rechargeInfo['data']['gift_fee'];
if($giveFee > 0){
$data['giveFee'] = $giveFee;
}
}
$html = $this->load->view('recharge/xj/modal_confirm', $data, true);
echo $this->lw_load->jsonResult(true, array('msg' => $actionText . '信息确认', 'html' => $html));
break;

View File

@ -99,6 +99,14 @@ $text = ($action==1)?"充值":"退款";
<label class="control-label col-md-6">(请收入管理费)</label>
</div>
</div>
<div class="row margin-bottom">
<div class="form-group">
<label class="control-label col-md-2">充值赠送金额</label>
<div class="col-md-4">
<input id="real-count" disabled type="text" class="form-control" value="<?=$giveFee?>">
</div>
</div>
</div>
</div>
</div>
</div><!-- /.box-body -->

View File

@ -111,7 +111,7 @@ class CI_Recharge_config {
return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1 and YEAR(record_datetime) = YEAR(CURDATE())", array($userId))->row()->num;
}else{
// 每次赠送
return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1", array($userId))->row()->count;
return $this->CI->db->query("select count(id) as num from tb_recharge where user_id=? and type=1", array($userId))->row()->num;
}
}