|
|
@@ -89,10 +89,9 @@ class Airdrop extends Backend
|
|
|
$this->model->validateFailException()->validate($validate);
|
|
|
}
|
|
|
if($params['type_id'] == 0){
|
|
|
- $params['address'] = (substr($params['address'], 0, 2) == '0x')? $params['address']: (new UserModel)->getUserByUid($params['address']);
|
|
|
- $user = (new UserModel)->getByAddress($params['address']);
|
|
|
- if(empty($user)) throw new Exception('用户不存在');
|
|
|
- WelfareLoginc::setUserProductOrder($params['num'], 0, 0, 0, $params['product_id'], $user->id, ProductOrder::Airdrop);
|
|
|
+ $user_id = UserModel::getUserByUid($params['address'], (substr($params['address'], 0, 2) == '0x')? 0: 1);
|
|
|
+ if(empty($user_id)) throw new Exception('用户不存在');
|
|
|
+ WelfareLoginc::setUserProductOrder($params['num'], 0, 0, 0, $params['product_id'], $user_id, ProductOrder::Airdrop);
|
|
|
$params['status'] = 1;
|
|
|
}
|
|
|
if($params['type_id'] == 1){
|