出价
This commit is contained in:
@@ -11,14 +11,10 @@ class MarketValue extends Model
|
||||
* 身价变化
|
||||
* @param int $user_id 用户id
|
||||
* @param int $change_value 身价变化值
|
||||
* @param int $type 0-升值,1-系统降身价,2-使用降身卡
|
||||
* @param int $type 0-收礼升值,1-系统降身价,2-使用降身卡,3-签约溢价 涨身价
|
||||
* * @return array
|
||||
*/
|
||||
public function change($user_id,$change_value,$type){
|
||||
//判断是否为整数
|
||||
// if(!is_int($change_value)){
|
||||
// return ['code' => 0, 'msg' => '身价变化参数错误=》'.$change_value];
|
||||
// }
|
||||
$before = db::name('user')->where('id',$user_id)->value('market_value');
|
||||
if($type == 0){
|
||||
$result = db::name('user')->where('id',$user_id)->setInc('market_value',$change_value);
|
||||
|
||||
Reference in New Issue
Block a user