This commit is contained in:
youda 2025-05-16 21:01:07 +08:00
parent 74af0e12cd
commit 644f1b1752
3 changed files with 5 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class Diamond extends Base
// 更新数据
$result = DiamondProducts::edit($id, $param);
if ($result) {
if ($result !== false) {
return $this->succ('修改成功');
} else {
return $this->err('修改失败');

View File

@ -1298,6 +1298,9 @@ class User extends Base
}
$invite_code = request()->param('invite_code', '');
$user = Usermodel::where('id', '=', $user_id)->find();
if ($user['uid'] == $invite_code) {
return $this->renderError("不能绑定自己");
}
$p_user = Usermodel::where('uid', '=', $invite_code)->find();
if ($p_user != null) {
$user->pid = $p_user['id'];

View File

@ -427,6 +427,7 @@ class User extends Base
$money1 = ProfitIntegral::field('change_money')
->where('user_id', '=', $data['pid'])
->where('type', '=', 5)
->where('share_uid', '=', $data['id'])
->where('change_money', '>', 0)
->sum('change_money');
if ($money1 > 0) {