|
@@ -209,7 +209,7 @@ module.exports = class extends Base {
|
|
|
think.logger.debug(Date.now());
|
|
|
// 更新用户余额
|
|
|
const user = await this.model('user').where({id: this.getLoginUserId()}).find();
|
|
|
- if (think.isEmpty(user) || parseInt(user.isAuthen) === 0) return this.fail('用户未注册');
|
|
|
+ if (think.isEmpty(user)) return this.fail('未找到用户');
|
|
|
if (user.balance < goodsTotalPrice) return this.fail('余额不足');
|
|
|
think.logger.debug(user.balance + '-=' + goodsTotalPrice);
|
|
|
await this.model('user').where({id: this.getLoginUserId()}).update({
|