From 6ad5157cdc8069f1b34d4ea7caa9bb35c0a34595 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 14:13:08 +0800 Subject: [PATCH 1/5] debug address --- business/jxstore/cms/job.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 19af3f7f5..7e94544d6 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -155,7 +155,9 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (jobID int, errCod } } if job.Address != "" && (job.Lng == 0 || job.Lat == 0) { + fmt.Println("================================" + job.Address) lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddressByPage(job.Address, job.JobCityCode) + fmt.Println("=========", lng, "=============", lat) if lng == 0 || lat == 0 { return 0, errCode, fmt.Errorf("请填写完整且正确的门店地址!") } From c34535b638df399d6a6ecc65c2c8711da09f3bb0 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 14:24:35 +0800 Subject: [PATCH 2/5] debug address --- business/jxstore/cms/job.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 7e94544d6..91dbd4100 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -155,9 +155,10 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (jobID int, errCod } } if job.Address != "" && (job.Lng == 0 || job.Lat == 0) { - fmt.Println("================================" + job.Address) + globals.SugarLogger.Debugf("==================" + job.Address) lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddressByPage(job.Address, job.JobCityCode) - fmt.Println("=========", lng, "=============", lat) + globals.SugarLogger.Debugf("%f", lng) + globals.SugarLogger.Debugf("%f", lat) if lng == 0 || lat == 0 { return 0, errCode, fmt.Errorf("请填写完整且正确的门店地址!") } From 7f894c9cef6691ee466fe8308e479c527a4cd36d Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 16:58:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=BC=80=E9=80=9A=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=B4=BB=E5=8A=A8=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/user2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index 858857592..7bc870648 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -600,8 +600,9 @@ func InvestMember(ctx *jxcontext.Context, memberID int, userID string, isFree bo } } if !isFree { + //支出明细 - if err = financial.AddExpendUpdateAccount(txDB, userBill, model.BillTypeMember, memberCard.Price, 0); err != nil { + if err = financial.AddExpendUpdateAccount(txDB, userBill, model.BillTypeMember, memberCard.ActPrice, 0); err != nil { dao.Rollback(db, txDB) return } From 81fca6fb447f5469b5c99354cfc0401ba61345b3 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 17:44:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/user2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index 7bc870648..2d8afa446 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -559,7 +559,7 @@ func InvestMember(ctx *jxcontext.Context, memberID int, userID string, isFree bo if err = auth2.CheckWeixinminiAuthBind(userIDReal); err != nil { return "", err } - if userBill.AccountBalance < memberCard.Price { + if userBill.AccountBalance < memberCard.ActPrice { return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("用户余额不足,请充值!") } } From 6191973f130cfe11797b7283ebd5493f8a4d779c Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 18:21:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/job.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 91dbd4100..19af3f7f5 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -155,10 +155,7 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (jobID int, errCod } } if job.Address != "" && (job.Lng == 0 || job.Lat == 0) { - globals.SugarLogger.Debugf("==================" + job.Address) lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddressByPage(job.Address, job.JobCityCode) - globals.SugarLogger.Debugf("%f", lng) - globals.SugarLogger.Debugf("%f", lat) if lng == 0 || lat == 0 { return 0, errCode, fmt.Errorf("请填写完整且正确的门店地址!") }