正在显示
3 个修改的文件
包含
7 行增加
和
4 行删除
| @@ -108,6 +108,9 @@ func newQueryOptionV2(request *protocolx.PartnersRequest) map[string]interface{} | @@ -108,6 +108,9 @@ func newQueryOptionV2(request *protocolx.PartnersRequest) map[string]interface{} | ||
| 108 | if request.EndTime > 0 { | 108 | if request.EndTime > 0 { |
| 109 | queryOption["endTime"] = request.EndTime / 1000 | 109 | queryOption["endTime"] = request.EndTime / 1000 |
| 110 | } | 110 | } |
| 111 | + if request.Keyword != "" { | ||
| 112 | + queryOption["keyword"] = request.Keyword | ||
| 113 | + } | ||
| 111 | queryOption["limit"] = request.PageSize | 114 | queryOption["limit"] = request.PageSize |
| 112 | queryOption["offset"] = request.PageSize * request.PageIndex | 115 | queryOption["offset"] = request.PageSize * request.PageIndex |
| 113 | 116 |
| @@ -96,8 +96,8 @@ func (dao *PartnerInfoDao) Partners(partnerIds []int64, queryOptions map[string] | @@ -96,8 +96,8 @@ func (dao *PartnerInfoDao) Partners(partnerIds []int64, queryOptions map[string] | ||
| 96 | if endTime, ok := queryOptions["endTime"]; ok { | 96 | if endTime, ok := queryOptions["endTime"]; ok { |
| 97 | filterPartners.WriteString(fmt.Sprintf(" and cooperate_time<to_timestamp(%v)", endTime)) | 97 | filterPartners.WriteString(fmt.Sprintf(" and cooperate_time<to_timestamp(%v)", endTime)) |
| 98 | } | 98 | } |
| 99 | - if keyword, ok := queryOptions["keyword"]; ok { | ||
| 100 | - filterPartners.WriteString(fmt.Sprintf(" and partner_name LIKE %v", keyword)) | 99 | + if keyword, ok := queryOptions["keyword"]; ok && keyword.(string) != "" { |
| 100 | + filterPartners.WriteString(fmt.Sprintf(` and partner_name LIKE '%v'`, fmt.Sprintf("%%%s%%", "%%" + keyword.(string) + "%"))) | ||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | sql.WriteString(fmt.Sprintf(` | 103 | sql.WriteString(fmt.Sprintf(` |
| @@ -26,8 +26,8 @@ func CreateResponseLogFilter(logger *logs.BeeLogger) func(ctx *context.Context) | @@ -26,8 +26,8 @@ func CreateResponseLogFilter(logger *logs.BeeLogger) func(ctx *context.Context) | ||
| 26 | return func(ctx *context.Context) { | 26 | return func(ctx *context.Context) { |
| 27 | requestId := ctx.Request.Header.Get("requestId") | 27 | requestId := ctx.Request.Header.Get("requestId") |
| 28 | body, _ := json.Marshal(ctx.Input.GetData("outputData")) | 28 | body, _ := json.Marshal(ctx.Input.GetData("outputData")) |
| 29 | - if len(body) > 1000 { | ||
| 30 | - body = body[:1000] | 29 | + if len(body) > 10000 { |
| 30 | + body = body[:10000] | ||
| 31 | } | 31 | } |
| 32 | logger.Debug(fmt.Sprintf("<====Send RequestId:%v BodyData:%s", requestId, body)) | 32 | logger.Debug(fmt.Sprintf("<====Send RequestId:%v BodyData:%s", requestId, body)) |
| 33 | } | 33 | } |
-
请 注册 或 登录 后发表评论