实现了门店员工、员工角色的接口开发

This commit is contained in:
2025-06-12 17:13:25 +08:00
parent fac2bd41b3
commit 80b1aa9b91
46 changed files with 1196 additions and 25 deletions

View File

@ -5,8 +5,6 @@ import (
"fmt"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/grand"
"server/internal/consts"
"server/internal/dao"
@ -80,13 +78,6 @@ func (s *sMerchantAdmin) Login(ctx context.Context, in *model.MerchantLoginIn) (
out = &model.MerchantLoginOut{
Token: token,
}
go func(ctx context.Context, merchantAdminId int64) {
// 更新商户管理员登录时间
dao.MerchantAdmins.Ctx(ctx).WherePri(merchantAdminId).Update(do.MerchantAdmins{
LastLoginAt: gtime.Now(),
LastLoginIp: ghttp.RequestFromCtx(ctx).RemoteAddr,
})
}(context.Background(), mAdminId)
return
}
func (s *sMerchantAdmin) Info(ctx context.Context, in *model.MerchantAdminInfoIn) (out *model.MerchantAdminInfoOut, err error) {