|
@@ -340,7 +340,8 @@ class Relation extends Api
|
|
|
if(!$decorate) {
|
|
|
$this->error("道具信息获取失败!");
|
|
|
}
|
|
|
- if($walletinfo['gold'] < $decorate['price']) {
|
|
|
+ $total_price = bcmul($decorate['price'],$number,0);
|
|
|
+ if($walletinfo['gold'] < $total_price) {
|
|
|
$this->error("您的金币不足,请先充值!");
|
|
|
}
|
|
|
// 进行购买逻辑
|
|
@@ -364,7 +365,7 @@ class Relation extends Api
|
|
|
}
|
|
|
|
|
|
//扣钱
|
|
|
- $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$decorate['price'],31,'购买关系卡','user_decorate_relation',0);
|
|
|
+ $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$total_price,32,'购买关系卡','user_decorate_relation',0);
|
|
|
if($rs['status'] === false){
|
|
|
Db::rollback();
|
|
|
$this->error($rs['msg']);
|