1、股东人企关系精准版加密方式修改 2、CallAPI传参方式修改
This commit is contained in:
@@ -79,18 +79,22 @@ func (l *QYGLB4C0Logic) QYGLB4C0(req *types.Request) (resp string, err *errs.App
|
||||
}
|
||||
|
||||
// 3、西部加密
|
||||
westConfig := l.svcCtx.Config.WestConfig
|
||||
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
|
||||
if encryptStructFieldsErr != nil {
|
||||
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
|
||||
return "", errs.ErrSystem
|
||||
//westConfig := l.svcCtx.Config.WestConfig
|
||||
//encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
|
||||
//if encryptStructFieldsErr != nil {
|
||||
// logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
|
||||
// return "", errs.ErrSystem
|
||||
//}
|
||||
IDCard := crypto.Md5Encrypt(data.IDCard)
|
||||
encryptedFields := map[string]interface{}{
|
||||
"IDCard": IDCard,
|
||||
}
|
||||
|
||||
// 4、发送请求到西部
|
||||
logx.Infof("交易号:%s", transactionID)
|
||||
apiRequest := common.MapStructToAPIRequest(encryptedFields, westmodel.QYGLB4C0FieldMapping, "data")
|
||||
apiRequest := common.MapStructToAPIRequest(encryptedFields, westmodel.QYGLB4C0FieldMapping, "")
|
||||
|
||||
westResp, callAPIErr := l.svcCtx.WestDexService.CallAPI("G05HZ01", apiRequest)
|
||||
westResp, callAPIErr := l.svcCtx.WestDexService.CallAPI("G05HZ01", apiRequest, l.svcCtx.Config.WestConfig.SecretSecondId)
|
||||
if callAPIErr != nil {
|
||||
if callAPIErr.Code == errs.ErrDataSource.Code {
|
||||
encryptData, aesEncrypt := crypto.AesEncrypt(westResp, key)
|
||||
|
||||
Reference in New Issue
Block a user