updateuserbalancelogic.go 947 B

123456789101112131415161718192021222324252627282930313233343536
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jyResourcesCenter/rpc/internal/svc"
  4. "app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
  5. "app.yhyue.com/moapp/jyResourcesCenter/service"
  6. "context"
  7. "github.com/tal-tech/go-zero/core/logx"
  8. )
  9. type UpdateUserBalanceLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewUpdateUserBalanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserBalanceLogic {
  15. return &UpdateUserBalanceLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. var balanceService service.BalanceService
  22. // 根据账户标识修改资源结存账
  23. func (l *UpdateUserBalanceLogic) UpdateUserBalance(in *resourcesCenter.Balance) (*resourcesCenter.Response, error) {
  24. // todo: add your logic here and delete this line
  25. code, msg := balanceService.UpdateUserBalance(in)
  26. return &resourcesCenter.Response{
  27. Code: code,
  28. Message: msg,
  29. }, nil
  30. }