From f992f6a0e2e4fb0677122cee90fa26734a9c7e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 2 Feb 2021 16:11:49 +0800 Subject: [PATCH] aa --- business/jxstore/cms/sync2.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/business/jxstore/cms/sync2.go b/business/jxstore/cms/sync2.go index f5a291a12..742a47942 100644 --- a/business/jxstore/cms/sync2.go +++ b/business/jxstore/cms/sync2.go @@ -341,16 +341,18 @@ func onUpdateThing(ctx *jxcontext.Context, db *dao.DaoDB, vendorInfoList []*mode VendorID: v.VendorID, VendorOrgCode: v.VendorOrgCode, } - thingMap.DeletedAt = utils.DefaultTimeValue - if err2 := getThingMap(db, thingMap); err2 == nil { - thingMap.SyncStatus |= syncStatus - thingMap.LastOperator = ctx.GetUserName() - _, err2 = dao.UpdateEntity(db, thingMap) - errList.AddErr(err2) + if v.IsJxCat == model.NO { + thingMap.DeletedAt = utils.DefaultTimeValue + if err2 := getThingMap(db, thingMap); err2 == nil { + thingMap.SyncStatus |= syncStatus + thingMap.LastOperator = ctx.GetUserName() + _, err2 = dao.UpdateEntity(db, thingMap) + errList.AddErr(err2) - updateThingMapEntity(db, thingMap) - } else { - errList.AddErr(err2) + updateThingMapEntity(db, thingMap) + } else { + errList.AddErr(err2) + } } } err = errList.GetErrListAsOne()