mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-15 05:33:47 +08:00
更新2.1.1版本,优化代码提示
This commit is contained in:
@@ -31,14 +31,6 @@ var (
|
||||
// Fill with you ideas below.
|
||||
|
||||
// IsUniqueName 判断用户名是否唯一
|
||||
// @Description:
|
||||
// @receiver dao
|
||||
// @param ctx
|
||||
// @param id
|
||||
// @param name
|
||||
// @return bool
|
||||
// @return error
|
||||
//
|
||||
func (dao *adminMemberDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
|
||||
var data *entity.AdminDept
|
||||
m := dao.Ctx(ctx).Where("username", name)
|
||||
@@ -60,14 +52,6 @@ func (dao *adminMemberDao) IsUniqueName(ctx context.Context, id int64, name stri
|
||||
}
|
||||
|
||||
// IsUniqueEmail 判断邮箱是否唯一
|
||||
// @Description:
|
||||
// @receiver dao
|
||||
// @param ctx
|
||||
// @param id
|
||||
// @param email
|
||||
// @return bool
|
||||
// @return error
|
||||
//
|
||||
func (dao *adminMemberDao) IsUniqueEmail(ctx context.Context, id int64, email string) (bool, error) {
|
||||
var data *entity.AdminMember
|
||||
m := dao.Ctx(ctx).Where("email", email)
|
||||
@@ -89,14 +73,6 @@ func (dao *adminMemberDao) IsUniqueEmail(ctx context.Context, id int64, email st
|
||||
}
|
||||
|
||||
// IsUniqueMobile 判断手机号是否唯一
|
||||
// @Description:
|
||||
// @receiver dao
|
||||
// @param ctx
|
||||
// @param id
|
||||
// @param mobile
|
||||
// @return bool
|
||||
// @return error
|
||||
//
|
||||
func (dao *adminMemberDao) IsUniqueMobile(ctx context.Context, id int64, mobile string) (bool, error) {
|
||||
var data *entity.AdminMember
|
||||
m := dao.Ctx(ctx).Where("mobile", mobile)
|
||||
@@ -116,4 +92,3 @@ func (dao *adminMemberDao) IsUniqueMobile(ctx context.Context, id int64, mobile
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ func (dao *adminMenuDao) IsUniqueName(ctx context.Context, id int64, name string
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// GenLabelTreeList
|
||||
func (dao *adminMenuDao) GenLabelTreeList(ctx context.Context, pid int64) ([]*model.LabelTreeMenu, error) {
|
||||
|
||||
var (
|
||||
@@ -100,16 +99,7 @@ func (dao *adminMenuDao) GenLabelTreeList(ctx context.Context, pid int64) ([]*mo
|
||||
return newLst, nil
|
||||
}
|
||||
|
||||
//
|
||||
// @Title 生成树列表
|
||||
// @Description
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @Param ctx
|
||||
// @Param pid
|
||||
// @Param lists
|
||||
// @Return []*model.TreeMenu
|
||||
// @Return error
|
||||
//
|
||||
// GenTreeList 生成树列表
|
||||
func (dao *adminMenuDao) GenTreeList(ctx context.Context, pid int64, ids []int64) ([]*model.TreeMenu, error) {
|
||||
|
||||
var (
|
||||
@@ -131,25 +121,7 @@ func (dao *adminMenuDao) GenTreeList(ctx context.Context, pid int64, ids []int64
|
||||
return newLst, nil
|
||||
}
|
||||
|
||||
//
|
||||
// @Title 获取最上级pid
|
||||
// @Description
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @Param ctx
|
||||
// @Param data
|
||||
// @Return int64
|
||||
// @Return error
|
||||
//
|
||||
|
||||
//
|
||||
// TopPid
|
||||
// @Description:
|
||||
// @receiver dao
|
||||
// @param ctx
|
||||
// @param data
|
||||
// @return int64
|
||||
// @return error
|
||||
//
|
||||
// TopPid 获取最上级pid
|
||||
func (dao *adminMenuDao) TopPid(ctx context.Context, data *entity.AdminMenu) (int64, error) {
|
||||
var pidData *entity.AdminMenu
|
||||
if data.Pid == 0 {
|
||||
|
||||
Reference in New Issue
Block a user