From e493f6d2f152e15a1793664b1bbcbe32a0301d8f Mon Sep 17 00:00:00 2001 From: richboo111 Date: Tue, 26 Jul 2022 14:57:31 +0800 Subject: [PATCH] log --- business/jxstore/financial/bill.go | 2 ++ business/jxutils/jxcontext/jxcontext.go | 3 +++ business/model/dao/dao_utils.go | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/business/jxstore/financial/bill.go b/business/jxstore/financial/bill.go index 767394b36..b62042501 100644 --- a/business/jxstore/financial/bill.go +++ b/business/jxstore/financial/bill.go @@ -224,9 +224,11 @@ func WXInvestMemberNew(ctx *jxcontext.Context, memberID int, userID string) (err if memberID == model.OrderTypeMember { globals.SugarLogger.Debugf("=====================进入修改用户时间") userMember2.EndAt = time.Now().AddDate(0, 1, 0) + globals.SugarLogger.Debugf("======================= ===== %s", userMember2.EndAt) } else { userMember2.EndAt = time.Now().AddDate(1, 0, 0) } + //////// dao.WrapAddIDCULDEntity(userMember2, ctx.GetUserName()) globals.SugarLogger.Debugf("=====================数据库增加新用户信息") if err = dao.CreateEntity(db, userMember2); err != nil { diff --git a/business/jxutils/jxcontext/jxcontext.go b/business/jxutils/jxcontext/jxcontext.go index 0cbea845f..7a9a32df9 100644 --- a/business/jxutils/jxcontext/jxcontext.go +++ b/business/jxutils/jxcontext/jxcontext.go @@ -92,12 +92,15 @@ func (ctx *Context) GetUserName() string { userName := ctx.token if ctx.userInfo != nil { userName = ctx.userInfo.GetUserTag() + globals.SugarLogger.Debugf("jfjfjfhueiujsdjnhsihf") } else if userName == "" { userName = ctx.GetRealRemoteIP() + globals.SugarLogger.Debugf("tridhxbjsehsymx") } if len(userName) > MaxUserNameLen { userName = userName[:MaxUserNameLen] } + globals.SugarLogger.Debugf("urthnxdbsjs") return userName } diff --git a/business/model/dao/dao_utils.go b/business/model/dao/dao_utils.go index eaca61326..7193e1c04 100644 --- a/business/model/dao/dao_utils.go +++ b/business/model/dao/dao_utils.go @@ -2,6 +2,7 @@ package dao import ( "fmt" + "git.rosy.net.cn/jx-callback/globals" "reflect" "strings" "time" @@ -60,11 +61,14 @@ func WrapAddIDCULEntity(item interface{}, lastOperator string) interface{} { } func WrapAddIDCULDEntity(item interface{}, lastOperator string) interface{} { + globals.SugarLogger.Debugf("sajhbgduqhguqho ho") if mapData, ok := item.(map[string]interface{}); ok { mapData[model.FieldDeletedAt] = utils.DefaultTimeValue + globals.SugarLogger.Debugf("bdtrshgesghrdg") } else { value := refutil.CheckAndGetStructValue(item) value.FieldByName(model.FieldDeletedAt).Set(reflect.ValueOf(utils.DefaultTimeValue)) + globals.SugarLogger.Debugf("nhglmknhtkl;jmglk;ghm;lkghm") } return WrapAddIDCULEntity(item, lastOperator) }