b_robot_config.go 1.0 KB

123456789101112131415161718192021222324252627
  1. package bll
  2. import (
  3. "context"
  4. "yx-dataset-server/app/schema"
  5. "yx-dataset-server/library/dingtalk"
  6. )
  7. // IRobotConfig RobotConfig业务逻辑接口
  8. type IRobotConfig interface {
  9. // 查询数据
  10. Query(ctx context.Context, params schema.RobotConfigQueryParam, opts ...schema.RobotConfigQueryOptions) (*schema.RobotConfigQueryResult, error)
  11. // 查询指定数据
  12. Get(ctx context.Context, recordID string, opts ...schema.RobotConfigQueryOptions) (*schema.RobotConfig, error)
  13. // 创建数据
  14. Create(ctx context.Context, item schema.RobotConfig) (*schema.RobotConfig, error)
  15. // 更新数据
  16. Update(ctx context.Context, recordID string, item schema.RobotConfig) (*schema.RobotConfig, error)
  17. // 删除数据
  18. Delete(ctx context.Context, recordID string) error
  19. // 更新状态
  20. UpdateStatus(ctx context.Context, recordID string, status int) error
  21. // 接收消息
  22. ReceiveMessage(ctx context.Context, id string, item dingtalk.Message) error
  23. // 服务启动时批量拉起所有钉钉卡片回复模式的机器人
  24. RestartAllRobots(ctx context.Context) error
  25. }