f
This commit is contained in:
@@ -214,14 +214,16 @@ func (l *PaymentLogic) QueryOrderPayment(req *types.PaymentReq, session sqlx.Ses
|
||||
if encryptErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "生成订单, 加密身份证号失败: %v", encryptErr)
|
||||
}
|
||||
// 查询72小时内的查询次数
|
||||
queryCount, countErr := l.svcCtx.QueryUserRecordModel.CountByEncryptedIdCardIn72Hours(l.ctx, encryptedIdCard)
|
||||
if countErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "生成订单, 查询记录失败: %v", countErr)
|
||||
}
|
||||
// 如果72小时内查询次数大于等于2次,禁止支付(当前这次是第3次)
|
||||
if queryCount >= 2 {
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("查询受限通知:检测到您72小时内已完成2次报告查询,系统已自动暂停服务。如需紧急查询,请联系客服申请临时额度。"), "生成订单, 查询次数超限: %d", queryCount)
|
||||
// 查询72小时内的查询次数(仅对代理渠道订单进行限制)
|
||||
if data.AgentIdentifier != "" {
|
||||
queryCount, countErr := l.svcCtx.QueryUserRecordModel.CountByEncryptedIdCardIn72Hours(l.ctx, encryptedIdCard)
|
||||
if countErr != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "生成订单, 查询记录失败: %v", countErr)
|
||||
}
|
||||
// 如果72小时内查询次数大于等于2次,禁止支付(当前这次是第3次)
|
||||
if queryCount >= 2 {
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("查询受限通知:检测到您72小时内已完成2次报告查询,系统已自动暂停服务。如需紧急查询,请联系客服申请临时额度。"), "生成订单, 查询次数超限: %d", queryCount)
|
||||
}
|
||||
}
|
||||
|
||||
var orderID int64
|
||||
|
||||
@@ -40,7 +40,8 @@ func NewQueryServiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Quer
|
||||
|
||||
func (l *QueryServiceLogic) QueryService(req *types.QueryServiceReq) (resp *types.QueryServiceResp, err error) {
|
||||
if req.AgentIdentifier != "" {
|
||||
l.ctx = context.WithValue(l.ctx, "agentIdentifier", req.AgentIdentifier)
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("服务暂不可用,系统已暂停查询服务,请稍后再试"), "查询服务暂停, AgentIdentifier: %s", req.AgentIdentifier)
|
||||
// l.ctx = context.WithValue(l.ctx, "agentIdentifier", req.AgentIdentifier)
|
||||
} else if req.App {
|
||||
l.ctx = context.WithValue(l.ctx, "app", req.App)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user