package logic import ( "context" "time" "bp.jydev.jianyu360.cn/ApplicationCenter/marketing/api/internal/svc" "bp.jydev.jianyu360.cn/ApplicationCenter/marketing/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type TimeNowLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewTimeNowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TimeNowLogic { return &TimeNowLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *TimeNowLogic) TimeNow(req *types.Timereq) (resp *types.Reply, err error) { // todo: add your logic here and delete this line resp = &types.Reply{} resp.Data = map[string]interface{}{ "time": time.Now().Unix(), } return }