修复聚合请求结果json tag未设置的问题

This commit is contained in:
白茶清欢 2025-03-31 22:04:43 +08:00
parent 53ed0fe04f
commit 655b6d3a21

View File

@ -83,8 +83,9 @@ func (c *client) Request() *Response {
respByte := serialize.JSON.MarshalForByteIgnoreError(c.resp.AliasResultTable)
fieldList := make([]validate.StructField, 0)
for _, item := range c.reqCfg.ResultRule {
pathArr := strings.Split(item.DataPath, ".")
fieldList = append(fieldList, validate.StructField{
JsonTag: "",
JsonTag: pathArr[len(pathArr)-1],
Type: item.DataType,
Required: false,
RuleList: nil,