This commit is contained in:
2025-12-01 12:27:15 +08:00
parent fa268d3145
commit 6a3b885438
4 changed files with 39 additions and 27 deletions

View File

@@ -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);