Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2020-01-14 19:11:48 +08:00
7 changed files with 25 additions and 20 deletions

View File

@@ -150,6 +150,11 @@ func UpdateCategory(ctx *jxcontext.Context, categoryID int, payload map[string]i
if err = dao.GetEntity(db, cat); err != nil {
return 0, err
}
for k, v := range payload {
if v == nil {
delete(payload, k)
}
}
valid := dao.StrictMakeMapByStructObject(payload, cat, userName)
if len(valid) > 0 {
// syncStatus := 0

View File

@@ -255,7 +255,7 @@ func excel2FakeJdThingMap(ctx *jxcontext.Context, reader io.Reader) (thingMapLis
for rowNum, row := range rows {
thingMap := &model.FakeJdThingMap{
JxID: int(utils.Str2Int64WithDefault(row[0], 0)),
JdID: utils.Str2Int64WithDefault(row[0], 0),
JdID: utils.Str2Int64WithDefault(row[1], 0),
}
if thingMap.JxID == 0 || thingMap.JdID == 0 {
if rowNum == 0 {

View File

@@ -18,7 +18,7 @@ func TestSyncStoreSku4FakeJD(t *testing.T) {
}
func TestUploadFakeJdThingMap(t *testing.T) {
file, err := os.Open("/Users/xujianhua/Downloads/thingmap.xlsx")
file, err := os.Open("/Users/xujianhua/Downloads/到家菜市门店与商品映射信息(1).xlsx")
if err != nil {
t.Fatal(err)
}