12345678910111213141516171819202122232425262728293031323334 |
- 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
- }
|