|
@@ -70,7 +70,7 @@ class User extends AuthController
|
|
|
list($group_id) = Util::postMore([
|
|
|
['group_id', 0],
|
|
|
], $this->request, true);
|
|
|
- $uids = explode(',',$uid);
|
|
|
+ $uids = explode(',', $uid);
|
|
|
$res = UserModel::whereIn('uid', $uids)->update(['group_id' => $group_id]);
|
|
|
if ($res) {
|
|
|
return Json::successful('设置成功');
|
|
@@ -193,7 +193,8 @@ class User extends AuthController
|
|
|
if ($data['wdc_status'] && $data['wdc']) {
|
|
|
if ($data['wdc_status'] == 1) {
|
|
|
$edit['wdc'] = bcadd($user['wdc'], $data['wdc'], 2);
|
|
|
- $res21 = UserBillAdmin::income('系统增加wdc', $user['uid'], 'wdc', 'system_add', $data['wdc'], $this->adminId, $edit['wdc'], '系统增加了' . floatval($data['wdc']) . 'wdc');
|
|
|
+ $edit['wdc_all'] = bcadd($user['wdc_all'], $data['wdc'], 2);
|
|
|
+ $res21 = UserBillAdmin::income('系统增加酒币', $user['uid'], 'wdc', 'system_add', $data['wdc'], $this->adminId, $edit['wdc'], '系统增加了' . floatval($data['wdc']) . 'wdc');
|
|
|
try {
|
|
|
UserRepository::adminAddwdc($user, $data['wdc']);
|
|
|
} catch (\Exception $e) {
|
|
@@ -202,7 +203,8 @@ class User extends AuthController
|
|
|
}
|
|
|
} else if ($data['wdc_status'] == 2) {
|
|
|
$edit['wdc'] = bcsub($user['wdc'], $data['wdc'], 2);
|
|
|
- $res21 = UserBillAdmin::expend('系统减少wdc', $user['uid'], 'wdc', 'system_sub', $data['wdc'], $this->adminId, $edit['wdc'], '系统扣除了' . floatval($data['wdc']) . 'wdc');
|
|
|
+ $edit['wdc_all'] = bcsub($user['wdc_all'], $data['wdc'], 2);
|
|
|
+ $res21 = UserBillAdmin::expend('系统增加酒币', $user['uid'], 'wdc', 'system_sub', $data['wdc'], $this->adminId, $edit['wdc'], '系统扣除了' . floatval($data['wdc']) . 'wdc');
|
|
|
try {
|
|
|
UserRepository::adminAddwdc($user, $data['wdc']);
|
|
|
} catch (\Exception $e) {
|
|
@@ -380,7 +382,7 @@ class User extends AuthController
|
|
|
['integration_status', 0],
|
|
|
['integration', 0],
|
|
|
['status', 0],
|
|
|
- ['spread_uid',0],
|
|
|
+ ['spread_uid', 0],
|
|
|
]);
|
|
|
if (!$uid) return $this->failed('数据不存在');
|
|
|
$user = UserModel::get($uid);
|
|
@@ -394,7 +396,7 @@ class User extends AuthController
|
|
|
}
|
|
|
$sp = UserModel::where('uid', $sp)->value('spread_uid');
|
|
|
}
|
|
|
- if(!$spread_bl) Json::fail('设置和推荐编号不可用,产生死循环!');
|
|
|
+ if (!$spread_bl) Json::fail('设置和推荐编号不可用,产生死循环!');
|
|
|
|
|
|
BaseModel::beginTrans();
|
|
|
$res1 = false;
|
|
@@ -453,8 +455,8 @@ class User extends AuthController
|
|
|
$edit['birthday'] = strtotime($data['birthday']);
|
|
|
$edit['mark'] = $data['mark'];
|
|
|
$edit['is_promoter'] = $data['is_promoter'];
|
|
|
- if($data['spread_uid']>0)
|
|
|
- $edit['spread_uid'] = $data['spread_uid'];
|
|
|
+ if ($data['spread_uid'] > 0)
|
|
|
+ $edit['spread_uid'] = $data['spread_uid'];
|
|
|
if ($edit) $res3 = UserModel::edit($edit, $uid);
|
|
|
else $res3 = true;
|
|
|
if ($res1 && $res2 && $res3) $res = true;
|