SRCMS·轻响应V1.9正式版
修复 管理后台管理用户搜索失效的问题 修复 前端页面CSS样式远程资源失效问题 修复 用户积分兑换逻辑问题(Issued By 藏形匿影) 修复 后台积分扣除导致排行榜错乱的问题 改动 改动了涉及用户积分相关的数据表结构 新增 后台报告审核筛选功能 新增 前台用户个人中心订单查看功能
This commit is contained in:
@@ -40,10 +40,14 @@ class OrderController extends BaseController
|
||||
public function update()
|
||||
{
|
||||
$id = I('get.id',0,'intval');
|
||||
$user_id = I('get.username',0,'intval');
|
||||
//默认显示添加表单
|
||||
if (!IS_POST) {
|
||||
$model = M('order')->where('id='.$id)->find();
|
||||
$this->assign('model',$model);
|
||||
$model = M('member');
|
||||
$info = $model->where('id='.$user_id)-> select();
|
||||
$this->assign('userM', $info);
|
||||
$this->display();
|
||||
}
|
||||
if (IS_POST) {
|
||||
@@ -79,12 +83,12 @@ class OrderController extends BaseController
|
||||
*/
|
||||
public function jifen()
|
||||
{
|
||||
$model = M('member');
|
||||
$user_id = I('post.user_id',0,'intval');
|
||||
$amount = I('post.amount',0,'intval');
|
||||
$model = M('member');
|
||||
$result = $model->where('id='.$user_id)->where('jifen>0')->setDec('jifen',$amount);
|
||||
$result = $model->where('id='.$user_id)->setDec('jinbi',$amount);
|
||||
if($result){
|
||||
$this->success("扣除积分成功", U('post/index'));
|
||||
$this->success("扣除积分成功", U('order/index'));
|
||||
}else{
|
||||
$this->error("扣除积分失败:余额不足");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user