mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
fix 一些使用问题
This commit is contained in:
@@ -109,7 +109,7 @@ func setDefault(field *sysin.GenCodesColumnListModel) {
|
||||
|
||||
setDefaultValue(field)
|
||||
|
||||
if field.IsAllowNull == "YES" {
|
||||
if field.IsAllowNull == "NO" {
|
||||
field.Required = true
|
||||
}
|
||||
|
||||
|
@@ -346,6 +346,15 @@ func (s *sAdminMenu) GetMenuList(ctx context.Context, memberId int64) (lists rol
|
||||
if err != nil {
|
||||
return role.DynamicRes{}, err
|
||||
}
|
||||
if len(array) > 0 {
|
||||
pidList, err := dao.AdminMenu.Ctx(ctx).Fields("pid").WhereIn("id", array).Group("pid").Array()
|
||||
if err != nil {
|
||||
return role.DynamicRes{}, err
|
||||
}
|
||||
if len(pidList) > 0 {
|
||||
array = append(pidList, array...)
|
||||
}
|
||||
}
|
||||
mod = mod.Where("id", array)
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ func (s *sSysLog) Export(ctx context.Context, in sysin.LogListInp) (err error) {
|
||||
|
||||
// RealWrite 真实写入
|
||||
func (s *sSysLog) RealWrite(ctx context.Context, commonLog entity.SysLog) (err error) {
|
||||
_, err = dao.SysLog.Ctx(ctx).Data(commonLog).Insert()
|
||||
_, err = dao.SysLog.Ctx(ctx).Data(commonLog).FieldsEx(dao.SysLog.Columns().Id).Insert()
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ func (s *sSysLoginLog) List(ctx context.Context, in sysin.LoginLogListInp) (list
|
||||
}
|
||||
|
||||
for _, v := range list {
|
||||
g.DumpWithType(v)
|
||||
//g.DumpWithType(v)
|
||||
//// 获取省市编码对应的地区名称
|
||||
//region, err := location.ParseRegion(ctx, v.SysLogProvinceId, v.SysLogCityId, 0)
|
||||
//if err != nil {
|
||||
@@ -191,6 +191,6 @@ func (s *sSysLoginLog) Push(ctx context.Context, in sysin.LoginLogPushInp) {
|
||||
|
||||
// RealWrite 真实写入
|
||||
func (s *sSysLoginLog) RealWrite(ctx context.Context, models entity.SysLoginLog) (err error) {
|
||||
_, err = dao.SysLoginLog.Ctx(ctx).Data(models).Insert()
|
||||
_, err = dao.SysLoginLog.Ctx(ctx).Data(models).FieldsEx(dao.SysLoginLog.Columns().Id).Insert()
|
||||
return
|
||||
}
|
||||
|
@@ -144,6 +144,6 @@ func (s *sSysServeLog) View(ctx context.Context, in sysin.ServeLogViewInp) (res
|
||||
|
||||
// RealWrite 真实写入
|
||||
func (s *sSysServeLog) RealWrite(ctx context.Context, models entity.SysServeLog) (err error) {
|
||||
_, err = dao.SysServeLog.Ctx(ctx).Data(models).Insert()
|
||||
_, err = dao.SysServeLog.Ctx(ctx).Data(models).FieldsEx(dao.SysServeLog.Columns().Id).Insert()
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user