Quellcode durchsuchen

update

add_mode
DengBiao vor 1 Jahr
Ursprung
Commit
5710b1d743
3 geänderte Dateien mit 17 neuen und 3 gelöschten Zeilen
  1. +7
    -1
      app/admin/hdl/hdl_comm.go
  2. +2
    -2
      app/admin/svc/svc_data_statisstics.go
  3. +8
    -0
      app/db/db_permission_group.go

+ 7
- 1
app/admin/hdl/hdl_comm.go Datei anzeigen

@@ -14,7 +14,7 @@ func MenuList(c *gin.Context) {
admin := svc.GetUser(c)
qrcodeWithBatchRecordsDb := db.PermissionGroupDb{}
qrcodeWithBatchRecordsDb.Set()
groupList, err := qrcodeWithBatchRecordsDb.FindPermissionGroup()
groupList, err := qrcodeWithBatchRecordsDb.FindPermissionGroupV2()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
@@ -46,6 +46,7 @@ func MenuList(c *gin.Context) {
var tempRespMap = map[string]*md.PermissionGroupListResp{}
var tempRespMapKeys []string
for _, v := range *groupList {

var isCheck bool
if admin.IsSuperAdministrator == enum.IsSuperAdministratorTure {
isCheck = true
@@ -56,6 +57,11 @@ func MenuList(c *gin.Context) {
if utils.InArr(utils.IntToStr(v.Id), adminHasPermissionGroupIds) {
isCheck = true
}

if v.State == enum.PermissionGroupStateForNormal {
isCheck = false
}

tempRespMap[utils.IntToStr(v.Id)] = &md.PermissionGroupListResp{
Id: v.Id,
Name: v.Name,


+ 2
- 2
app/admin/svc/svc_data_statisstics.go Datei anzeigen

@@ -224,7 +224,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
switch req.Kind {
case 1:
//教师消费统计表
xlsx, _ := excelize.OpenFile("./static/upload/自营学校(教师消费统计表).xlsx")
xlsx, _ := excelize.OpenFile("./static/template/自营学校(教师消费统计表).xlsx")
fileName = "教师消费统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx"
downloadPath = "/export/self_support_for_school/" + fileName

@@ -301,7 +301,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
break
case 2:
//商家分餐数据统计表
xlsx, _ := excelize.OpenFile("./static/upload/自营学校(商家分餐数据统计表).xlsx")
xlsx, _ := excelize.OpenFile("./static/template/自营学校(商家分餐数据统计表).xlsx")
fileName = "商家分餐数据统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx"
downloadPath = "/export/self_support_for_school/" + fileName



+ 8
- 0
app/db/db_permission_group.go Datei anzeigen

@@ -22,3 +22,11 @@ func (permissionGroupDb *PermissionGroupDb) FindPermissionGroup() (*[]model.Perm
}
return &m, nil
}

func (permissionGroupDb *PermissionGroupDb) FindPermissionGroupV2() (*[]model.PermissionGroup, error) {
var m []model.PermissionGroup
if err := permissionGroupDb.Db.Asc("id").Find(&m); err != nil {
return nil, logx.Error(err)
}
return &m, nil
}

Laden…
Abbrechen
Speichern