Skip to content

Commit

Permalink
fix #896 修复充值,提现积分日志记录
Browse files Browse the repository at this point in the history
  • Loading branch information
magicblack committed Feb 20, 2024
1 parent 089159e commit 4bea130
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/common/model/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,20 @@ public function useData($card_no,$card_pwd,$user_info)
if($res===false){
return ['code' => 1003, 'msg' =>lang('model/card/update_user_points_err')];
}
//积分日志
$data = [];
$data['user_id'] = $user_info['user_id'];
$data['plog_type'] = 1;
$data['plog_points'] = $info['card_points'];
$result = model('Plog')->saveData($data);

$update=[];
$update['card_sale_status'] = 1;
$update['card_use_status'] = 1;
$update['card_use_time'] = time();
$update['user_id'] = $user_info['user_id'];
$res = $this->where($where)->update($update);
if($res===false){
if($res === false){
return ['code' => 1004, 'msg' =>lang('model/card/update_card_status_err')];
}

Expand Down
6 changes: 6 additions & 0 deletions application/common/model/Cash.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ public function auditData($where)
if(false === $res){
return ['code'=>1005,'msg'=>'更新用户积分失败:'.$this->getError() ];
}
//积分日志
$data = [];
$data['user_id'] = $v['user_id'];
$data['plog_type'] = 9;
$data['plog_points'] = $v['cash_points'];
$result = model('Plog')->saveData($data);

}
return ['code'=>1,'msg'=>'审核成功'];
Expand Down

0 comments on commit 4bea130

Please sign in to comment.