Compare commits
3 Commits
d52fcf46d2
...
4a48add783
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a48add783 | |||
| 9d428a32dc | |||
| 65bcd4bc1a |
@@ -121,6 +121,13 @@ func BuildEncryptedQuery(ctx context.Context, svcCtx *svc.ServiceContext, queryM
|
|||||||
}
|
}
|
||||||
query.Product = product.ProductEn
|
query.Product = product.ProductEn
|
||||||
query.ProductName = product.ProductName
|
query.ProductName = product.ProductName
|
||||||
|
|
||||||
|
// 获取订单信息,添加订单金额
|
||||||
|
order, orderErr := svcCtx.OrderModel.FindOne(ctx, queryModel.OrderId)
|
||||||
|
if orderErr == nil {
|
||||||
|
query.Amount = order.Amount
|
||||||
|
}
|
||||||
|
|
||||||
queryBytes, marshalErr := json.Marshal(query)
|
queryBytes, marshalErr := json.Marshal(query)
|
||||||
if marshalErr != nil {
|
if marshalErr != nil {
|
||||||
return "", errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 序列化查询结果失败: %v", marshalErr)
|
return "", errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "报告查询, 序列化查询结果失败: %v", marshalErr)
|
||||||
|
|||||||
@@ -114,6 +114,10 @@ func (l *QueryShareDetailLogic) QueryShareDetail(req *types.QueryShareDetailReq)
|
|||||||
}
|
}
|
||||||
query.ProductName = product.ProductName
|
query.ProductName = product.ProductName
|
||||||
query.Product = product.ProductEn
|
query.Product = product.ProductEn
|
||||||
|
|
||||||
|
// 从订单获取金额
|
||||||
|
query.Amount = order.Amount
|
||||||
|
|
||||||
successResp := shareDetail{
|
successResp := shareDetail{
|
||||||
Status: "success",
|
Status: "success",
|
||||||
Query: &query,
|
Query: &query,
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ var requestProcessors = map[string]func(*ApiRequestService, []byte) ([]byte, err
|
|||||||
"IVYZ8I9J": (*ApiRequestService).ProcessIVYZ8I9JRequest,
|
"IVYZ8I9J": (*ApiRequestService).ProcessIVYZ8I9JRequest,
|
||||||
"JRZQ7F1A": (*ApiRequestService).ProcessJRZQ7F1ARequest,
|
"JRZQ7F1A": (*ApiRequestService).ProcessJRZQ7F1ARequest,
|
||||||
"IVYZ3P9M": (*ApiRequestService).ProcessIVYZ3P9MRequest,
|
"IVYZ3P9M": (*ApiRequestService).ProcessIVYZ3P9MRequest,
|
||||||
|
"JRZQ6F2A": (*ApiRequestService).ProcessJRZQ6F2ARequest,
|
||||||
}
|
}
|
||||||
|
|
||||||
// PreprocessRequestApi 调用指定的请求处理函数
|
// PreprocessRequestApi 调用指定的请求处理函数
|
||||||
@@ -1577,3 +1578,26 @@ func (a *ApiRequestService) ProcessIVYZ3P9MRequest(params []byte) ([]byte, error
|
|||||||
|
|
||||||
return convertTianyuanResponse(resp)
|
return convertTianyuanResponse(resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ProcessJRZQ6F2ARequest 借贷申请
|
||||||
|
|
||||||
|
func (a *ApiRequestService) ProcessJRZQ6F2ARequest(params []byte) ([]byte, error) {
|
||||||
|
idCard := gjson.GetBytes(params, "id_card")
|
||||||
|
name := gjson.GetBytes(params, "name")
|
||||||
|
mobile := gjson.GetBytes(params, "mobile")
|
||||||
|
if !idCard.Exists() || !name.Exists() || !mobile.Exists() {
|
||||||
|
return nil, errors.New("api请求, JRZQ6F2A, 获取相关参数失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := a.tianyuanapi.CallInterface("JRZQ6F2A", map[string]interface{}{
|
||||||
|
"id_card": idCard.String(),
|
||||||
|
"name": name.String(),
|
||||||
|
"mobile_no": mobile.String(),
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertTianyuanResponse(resp)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user