| 127 | } |
| 128 | |
| 129 | func (i *imlSubscribeService) UpdateSubscribeStatus(ctx context.Context, application string, service string, status int) error { |
| 130 | info, err := i.store.First(ctx, map[string]interface{}{"service": service, "application": application}) |
| 131 | if err != nil { |
| 132 | return err |
| 133 | } |
| 134 | info.ApplyStatus = status |
| 135 | info.ApproveAt = time.Now() |
| 136 | //info.Approver = utils.UserId(ctx) |
| 137 | return i.store.Save(ctx, info) |
| 138 | } |
| 139 | |
| 140 | func (i *imlSubscribeService) MySubscribeServices(ctx context.Context, application string, serviceIDs []string) ([]*Subscribe, error) { |
| 141 | w := make(map[string]interface{}) |