fix
This commit is contained in:
@@ -72,7 +72,7 @@ TaxConfig:
|
||||
TaxRate: 0.2
|
||||
TaxExemptionAmount: 800.00
|
||||
Tianyuanapi:
|
||||
AccessID: "3c042bb99b240ccc"
|
||||
Key: "2732f526167c2de9b8dc6aa0f24ba8b7"
|
||||
AccessID: "7f8a9b2c4d5e6f1a"
|
||||
Key: "9e4f8a1b3c6d7e2f5a8b9c0d1e4f7a2b"
|
||||
BaseURL: "https://api.tianyuanapi.com"
|
||||
Timeout: 60
|
||||
@@ -73,7 +73,7 @@ TaxConfig:
|
||||
TaxRate: 0.2
|
||||
TaxExemptionAmount: 800.00
|
||||
Tianyuanapi:
|
||||
AccessID: "3c042bb99b240ccc"
|
||||
Key: "2732f526167c2de9b8dc6aa0f24ba8b7"
|
||||
AccessID: "7f8a9b2c4d5e6f1a"
|
||||
Key: "9e4f8a1b3c6d7e2f5a8b9c0d1e4f7a2b"
|
||||
BaseURL: "https://api.tianyuanapi.com"
|
||||
Timeout: 60
|
||||
@@ -72,23 +72,11 @@ func (l *PaySuccessNotifyUserHandler) ProcessTask(ctx context.Context, t *asynq.
|
||||
return fmt.Errorf("解密参数失败: %+v", aesdecryptErr)
|
||||
}
|
||||
|
||||
// 敏感数据脱敏处理
|
||||
desensitizedParams, err := l.desensitizeParams(decryptData)
|
||||
if err != nil {
|
||||
return fmt.Errorf("脱敏处理失败: %+v", err)
|
||||
}
|
||||
|
||||
// 对脱敏后的数据进行AES加密
|
||||
encryptedParams, encryptErr := crypto.AesEncrypt(desensitizedParams, key)
|
||||
if encryptErr != nil {
|
||||
return fmt.Errorf("加密脱敏数据失败: %+v", encryptErr)
|
||||
}
|
||||
|
||||
query := &model.Query{
|
||||
OrderId: order.Id,
|
||||
UserId: order.UserId,
|
||||
ProductId: product.Id,
|
||||
QueryParams: encryptedParams,
|
||||
QueryParams: data.Params,
|
||||
QueryState: "pending",
|
||||
}
|
||||
result, insertQueryErr := l.svcCtx.QueryModel.Insert(ctx, nil, query)
|
||||
|
||||
@@ -99,9 +99,6 @@ func (a *ApiRequestService) ProcessRequests(params []byte, productID int64) ([]b
|
||||
go func(i int, feature *model.Feature) {
|
||||
defer wg.Done()
|
||||
|
||||
// 错开并发请求时间,每个请求之间固定延迟50毫秒
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
@@ -209,7 +206,7 @@ func (a *ApiRequestService) PreprocessRequestApi(params []byte, apiID string) ([
|
||||
func (a *ApiRequestService) ProcessPersonEnterpriseProRequest(params []byte) ([]byte, error) {
|
||||
idCard := gjson.GetBytes(params, "id_card")
|
||||
// 设置最大调用次数上限
|
||||
maxApiCalls := 10 // 允许最多查询10个企业
|
||||
maxApiCalls := 20 // 允许最多查询20个企业
|
||||
|
||||
if !idCard.Exists() {
|
||||
return nil, errors.New("api请求, PersonEnterprisePro, 获取相关参数失败")
|
||||
@@ -391,10 +388,6 @@ func (a *ApiRequestService) ProcessPersonEnterpriseProRequest(params []byte) ([]
|
||||
wg.Add(1)
|
||||
go func(origIndex int, companyInfo gjson.Result) {
|
||||
defer wg.Done()
|
||||
|
||||
// 错开并发请求时间,每个请求之间固定延迟50毫秒
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
logx.Infof("开始处理企业[%d],企业名称: %s,统一社会信用代码: %s", origIndex, companyInfo.Get("basicInfo.name").String(), companyInfo.Get("basicInfo.creditCode").String())
|
||||
// 提取企业名称和统一社会信用代码
|
||||
orgName := companyInfo.Get("basicInfo.name")
|
||||
@@ -422,8 +415,8 @@ func (a *ApiRequestService) ProcessPersonEnterpriseProRequest(params []byte) ([]
|
||||
|
||||
// 调用QYGL8271接口获取企业涉诉信息
|
||||
lawsuitResp, err := a.tianyuanapi.CallInterface("QYGL8271", map[string]interface{}{
|
||||
"ent_name": orgName.String(),
|
||||
"ent_code": creditCode.String(),
|
||||
"ent_name": orgName.String(),
|
||||
"ent_code": creditCode.String(),
|
||||
"auth_date": generateAuthDateRange(),
|
||||
})
|
||||
// 无论是否有错误,都继续处理
|
||||
@@ -548,7 +541,7 @@ func (a *ApiRequestService) ProcessPersonEnterpriseProRequest(params []byte) ([]
|
||||
func (a *ApiRequestService) ProcesFLXG0V4BRequest(params []byte) ([]byte, error) {
|
||||
name := gjson.GetBytes(params, "name")
|
||||
idCard := gjson.GetBytes(params, "id_card")
|
||||
if !name.Exists() || !idCard.Exists() {
|
||||
if !name.Exists() || !idCard.Exists(){
|
||||
return nil, errors.New("api请求, FLXG0V4B, 获取相关参数失败")
|
||||
}
|
||||
|
||||
@@ -566,7 +559,6 @@ func (a *ApiRequestService) ProcesFLXG0V4BRequest(params []byte) ([]byte, error)
|
||||
}
|
||||
return respBytes, nil
|
||||
}
|
||||
|
||||
// ProcessFLXG0687Request 反诈反赌核验
|
||||
func (a *ApiRequestService) ProcessFLXG0687Request(params []byte) ([]byte, error) {
|
||||
idCard := gjson.GetBytes(params, "id_card")
|
||||
|
||||
Reference in New Issue
Block a user