|
|
@@ -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) { |
|
|
|
var o []model.TaobaoRelation |
|
|
|
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 |
|
|
|
} |
|
|
|
func TaobaoRelationListInsert(Db *xorm.Engine, m *model.TaobaoRelation) bool { |
|
|
|
_, err := Db.InsertOne(m) |
|
|
|
if err != nil { |
|
|
|
logx.Warn(err) |
|
|
|
return false |
|
|
|
} |
|
|
|
return true |
|
|
|