From 023f798b64df50872f36b76b5bb3b8b2eca8cafd Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sun, 10 Jul 2022 09:48:29 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.2.1=E5=88=86=E4=BD=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svc/get_plan_cfg.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/svc/get_plan_cfg.go b/svc/get_plan_cfg.go index 4c8de3c..9f177a6 100644 --- a/svc/get_plan_cfg.go +++ b/svc/get_plan_cfg.go @@ -91,6 +91,17 @@ func GetPlanCfg(eg *xorm.Engine, pvd, masterId string) (*comm_plan.PlanOpt, erro } } } + if strings.Contains(commissionOpt.Data, "\"buy_deliver_list\":[") { // + tmp := strings.Split(commissionOpt.Data, "\"buy_deliver_list\":[") + if len(tmp) > 0 { + tmp1 := strings.Split(tmp[1], "]") + if len(tmp1) > 0 { + str := "\"buy_deliver_list\":[" + tmp1[0] + "]" + str1 := "\"buy_deliver_list\":{" + tmp1[0] + "}" + commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, str, str1) + } + } + } if err := json.Unmarshal([]byte(commissionOpt.Data), &subsidyTmp); err != nil { return nil, zhios_order_relate_logx.Warn(fmt.Sprintf("%s:分佣方案数据设置错误", masterId)) }