fix
This commit is contained in:
@@ -3,13 +3,13 @@ package service
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"tydata-server/app/main/api/internal/config"
|
|
||||||
"tydata-server/app/main/model"
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
"tydata-server/app/main/api/internal/config"
|
||||||
|
"tydata-server/app/main/model"
|
||||||
|
|
||||||
"github.com/jung-kurt/gofpdf"
|
"github.com/jung-kurt/gofpdf"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -163,10 +163,10 @@ func (s *AuthorizationService) generatePDFContent(userInfo map[string]interface{
|
|||||||
|
|
||||||
// 构建授权书内容(去掉标题部分)
|
// 构建授权书内容(去掉标题部分)
|
||||||
content := fmt.Sprintf(`海南天远大数据科技有限公司:
|
content := fmt.Sprintf(`海南天远大数据科技有限公司:
|
||||||
本人%s拟向贵司申请大数据分析报告查询业务,贵司需要了解本人相关状况,用于查询大数据分析报告,因此本人同意向贵司提供本人的姓名和手机号等个人信息,并同意贵司向第三方(包括但不限于西部数据交易有限公司)传送上述信息。第三方将使用上述信息核实信息真实情况,查询信用记录,并生成报告。
|
本人%s拟向贵司申请大数据分析报告查询业务,贵司需要了解本人相关状况,用于查询大数据分析报告,因此本人同意向贵司提供本人的姓名和手机号等个人信息,并同意贵司向第三方传送上述信息。第三方将使用上述信息核实信息真实情况,查询信用记录,并生成报告。
|
||||||
|
|
||||||
授权内容如下:
|
授权内容如下:
|
||||||
贵司向依法成立的第三方服务商(包括但不限于西部数据交易有限公司)根据本人提交的信息进行核实,并有权通过前述第三方服务机构查询、使用本人的身份信息、设备信息、运营商信息等,查询本人信息(包括但不限于学历、婚姻、资产状况及对信息主体产生负面影响的不良信息),出具相关报告。
|
贵司向依法成立的第三方服务商根据本人提交的信息进行核实,并有权通过前述第三方服务机构查询、使用本人的身份信息、设备信息、运营商信息等,查询本人信息(包括但不限于学历、婚姻、资产状况及对信息主体产生负面影响的不良信息),出具相关报告。
|
||||||
依法成立的第三方服务商查询或核实、搜集、保存、处理、共享、使用(含合法业务应用)本人相关数据,且不再另行告知本人,但法律、法规、监管政策禁止的除外。
|
依法成立的第三方服务商查询或核实、搜集、保存、处理、共享、使用(含合法业务应用)本人相关数据,且不再另行告知本人,但法律、法规、监管政策禁止的除外。
|
||||||
本人授权有效期为自授权之日起 1个月。本授权为不可撤销授权,但法律法规另有规定的除外。
|
本人授权有效期为自授权之日起 1个月。本授权为不可撤销授权,但法律法规另有规定的除外。
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"tydata-server/app/main/api/internal/config"
|
|
||||||
"tydata-server/app/main/model"
|
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -12,6 +10,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
"tydata-server/app/main/api/internal/config"
|
||||||
|
"tydata-server/app/main/model"
|
||||||
|
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@@ -393,9 +393,9 @@ func TestSavePDFToLocal(t *testing.T) {
|
|||||||
|
|
||||||
// 准备测试数据
|
// 准备测试数据
|
||||||
userInfo := map[string]interface{}{
|
userInfo := map[string]interface{}{
|
||||||
"name": "何志勇",
|
"name": "张三",
|
||||||
"id_card": "452528197907133014",
|
"id_card": "110101199001011234",
|
||||||
"mobile": "18276151590",
|
"mobile": "13800138000",
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成PDF内容
|
// 生成PDF内容
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ type Response struct {
|
|||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
Success bool `json:"success"`
|
Success bool `json:"success"`
|
||||||
TransactionID string `json:"transaction_id"` // 流水号
|
TransactionID string `json:"transaction_id"` // 流水号
|
||||||
Data map[string]interface{} `json:"data"` // 解密后的数据
|
Data interface{} `json:"data"` // 解密后的数据
|
||||||
Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
|
Timeout int64 `json:"timeout"` // 请求耗时(毫秒)
|
||||||
Error string `json:"error,omitempty"`
|
Error string `json:"error,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ func (c *Client) Call(req Request) (*Response, error) {
|
|||||||
if apiResp.Data != "" {
|
if apiResp.Data != "" {
|
||||||
decryptedData, err := c.decrypt(apiResp.Data)
|
decryptedData, err := c.decrypt(apiResp.Data)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
var decryptedMap map[string]interface{}
|
var decryptedMap interface{}
|
||||||
if json.Unmarshal([]byte(decryptedData), &decryptedMap) == nil {
|
if json.Unmarshal([]byte(decryptedData), &decryptedMap) == nil {
|
||||||
response.Data = decryptedMap
|
response.Data = decryptedMap
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user