message_personal.go 1.2 KB
package notify

import (
	"github.com/linmadan/egglib-go/core/application"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/command"
)

// 个人信息提示

type MessagePersonalService struct {
}

func NewMessagePersonalService() *MessagePersonalService {
	newService := &MessagePersonalService{}
	return newService
}

// 获取今天的周期综合自评消息提示
func (srv *MessagePersonalService) TodayMessageSummaryEvaluationSelf(param *command.GetUserMessageCommand) (interface{}, error) {
	transactionContext, err := factory.CreateTransactionContext(nil)
	if err != nil {
		return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
	}
	if err := transactionContext.StartTransaction(); err != nil {
		return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
	}
	defer func() {
		_ = transactionContext.RollbackTransaction()
	}()
	// nowTime := time.Now()

	if err := transactionContext.CommitTransaction(); err != nil {
		return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
	}
	return nil, nil
}