|
@@ -47,13 +47,13 @@ func ResourcePowerDeduct(ctx g.Ctx, accountId, entAccountId int64, id string) er
|
|
|
//0:失败 1:成功 -1:不在有效期内 -2:数量不足 -3:没有授权
|
|
|
switch res.Status {
|
|
|
case 0:
|
|
|
- return fmt.Errorf("账户 accountId:%d entAccountId:%d 扣除业务失败 聊天记录:%s权限", accountId, entAccountId, id)
|
|
|
+ return fmt.Errorf("资源异常")
|
|
|
case -1:
|
|
|
- return fmt.Errorf("账户 accountId:%d entAccountId:%d 扣除业务权限失败,权限已过期 聊天记录:%s权限", accountId, entAccountId, id)
|
|
|
+ return fmt.Errorf("权益已过期")
|
|
|
case -2:
|
|
|
- return fmt.Errorf("账户 accountId:%d entAccountId:%d 扣除业务权限失败,余额不足 聊天记录:%s权限", accountId, entAccountId, id)
|
|
|
+ return fmt.Errorf("对不起,当日提问已达上限,请明日再来吧~")
|
|
|
case -3:
|
|
|
- return fmt.Errorf("账户 accountId:%d entAccountId:%d 扣除业务权限失败,没有授权 聊天记录:%s权限", accountId, entAccountId, id)
|
|
|
+ return fmt.Errorf("资源权限异常")
|
|
|
}
|
|
|
return nil
|
|
|
}
|