This commit is contained in:
苏尹岚
2021-04-19 15:50:50 +08:00
parent 89417e6f6d
commit 14f7fc7828
4 changed files with 918 additions and 947 deletions

View File

@@ -1923,7 +1923,10 @@ func TempJob() (err error) {
}
func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (actList []*partner.ActivityList, err error) {
return partner.GetHandler(vendorID).GetUnionActList(ctx, actType)
if handler := partner.GetHandler(vendorID); handler != nil {
actList, err = handler.GetUnionActList(ctx, actType)
}
return actList, err
}
func ShareUnionLink(ctx *jxcontext.Context, vendorID, linkType int) (link string, err error) {

View File

@@ -12,7 +12,7 @@ func (s *UnionHandler) ShareUnionLink(ctx *jxcontext.Context, linkType int) (lin
}
func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (actList []*partner.ActivityList, err error) {
if result, err := getAPI().ActivityList(actType, 20, 0); err == nil {
if result, err2 := getAPI().ActivityList(actType, 20, 0); err2 == nil {
for _, v := range result {
act := &partner.ActivityList{
ActID: v.ID,
@@ -28,6 +28,8 @@ func (s *UnionHandler) GetUnionActList(ctx *jxcontext.Context, actType int) (act
}
actList = append(actList, act)
}
} else {
err = err2
}
return actList, err
}