hellologic.go 524 B

12345678910111213141516171819202122232425262728
  1. package logic
  2. import (
  3. "context"
  4. "git.i2edu.net/i2/go-zero/core/logx"
  5. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  6. )
  7. type HelloLogic struct {
  8. logx.Logger
  9. ctx context.Context
  10. svcCtx *svc.ServiceContext
  11. }
  12. func NewHelloLogic(ctx context.Context, svcCtx *svc.ServiceContext) HelloLogic {
  13. return HelloLogic{
  14. Logger: logx.WithContext(ctx),
  15. ctx: ctx,
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (l *HelloLogic) Hello() error {
  20. // todo: add your logic here and delete this line
  21. l.svcCtx.Wechat.GetAccessToken()
  22. return nil
  23. }