|
@@ -36,14 +36,13 @@ func GetRelationPid(eg *xorm.Engine, unionId int, pid []string, relationId strin |
|
|
func TaobaoRelationListByTaobaoIds(Db *xorm.Engine, unionId int, ids []int64) (*[]model.TaobaoRelation, error) { |
|
|
func TaobaoRelationListByTaobaoIds(Db *xorm.Engine, unionId int, ids []int64) (*[]model.TaobaoRelation, error) { |
|
|
var o []model.TaobaoRelation |
|
|
var o []model.TaobaoRelation |
|
|
if err := Db.In("relation_id", ids).Where("union_id=?", unionId).Find(&o); err != nil { |
|
|
if err := Db.In("relation_id", ids).Where("union_id=?", unionId).Find(&o); err != nil { |
|
|
return nil, logx.Error(err) |
|
|
|
|
|
|
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
return &o, nil |
|
|
return &o, nil |
|
|
} |
|
|
} |
|
|
func TaobaoRelationListInsert(Db *xorm.Engine, m *model.TaobaoRelation) bool { |
|
|
func TaobaoRelationListInsert(Db *xorm.Engine, m *model.TaobaoRelation) bool { |
|
|
_, err := Db.InsertOne(m) |
|
|
_, err := Db.InsertOne(m) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
logx.Warn(err) |
|
|
|
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
return true |
|
|
return true |
|
|