...
|
...
|
@@ -77,7 +77,7 @@ class Algorithm extends Api |
|
|
//只有一条测试记录
|
|
|
$UserInfo = Db::name('user')->where('id', $UserID)->find();
|
|
|
//用户自身增加1000积分
|
|
|
$AddNum = Db::name('user')->where('id', $UserID)->update(['num' => $UserInfo['num'] + 1000]);
|
|
|
$AddNum = Db::name('user')->where('id', $UserID)->update(['num' => $UserInfo['num'] + 100]);
|
|
|
if (!$AddNum) {
|
|
|
$this->error('首次测试增加积分失败', 0);
|
|
|
die;
|
...
|
...
|
@@ -86,9 +86,9 @@ class Algorithm extends Api |
|
|
$data = [
|
|
|
'user_id' => $UserID,
|
|
|
'status' => 1,
|
|
|
'num' => 1000,
|
|
|
'num' => 000,
|
|
|
'type' => 1,
|
|
|
'up_num' => $UserInfo['num'] + 1000,
|
|
|
'up_num' => $UserInfo['num'] + 100,
|
|
|
'createtime' => time()
|
|
|
];
|
|
|
$IsNum = Db::name('num')->insert($data);
|
...
|
...
|
@@ -102,7 +102,7 @@ class Algorithm extends Api |
|
|
//存在
|
|
|
$FUserInfo = Db::name('user')->where('id', $FUserId)->find();
|
|
|
//用户上级增加100积分
|
|
|
$FAddNum = Db::name('user')->where('id', $FUserId)->update(['num' => $FUserInfo['num'] + 100]);
|
|
|
$FAddNum = Db::name('user')->where('id', $FUserId)->update(['num' => $FUserInfo['num'] + 50]);
|
|
|
if (!$FAddNum) {
|
|
|
$this->error('首次测试上级增加积分失败', 0);
|
|
|
die;
|
...
|
...
|
@@ -111,9 +111,9 @@ class Algorithm extends Api |
|
|
$Fdata = [
|
|
|
'user_id' => $FUserId,
|
|
|
'status' => 1,
|
|
|
'num' => 100,
|
|
|
'num' => 50,
|
|
|
'type' => 1,
|
|
|
'up_num' => $FUserInfo['num'] + 100,
|
|
|
'up_num' => $FUserInfo['num'] + 50,
|
|
|
'createtime' => time()
|
|
|
];
|
|
|
$FIsNum = Db::name('num')->insert($Fdata);
|
...
|
...
|
|