dengbiao 2 mesi fa
parent
commit
f20091a903
6 ha cambiato i file con 16 aggiunte e 1 eliminazioni
  1. +3
    -0
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +1
    -0
      app/admin/md/md_enterprise_manage.go
  3. +9
    -1
      app/customer/hdl/hdl_user_identity.go
  4. +1
    -0
      app/customer/md/md_enterprise.go
  5. +1
    -0
      app/customer/svc/svc_enterprise.go
  6. +1
    -0
      app/db/model/central_kitchen_for_school_set.go

+ 3
- 0
app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go Vedi File

@@ -910,6 +910,7 @@ func SetBasicCentralKitchenForSchool(c *gin.Context) {
set.IsOpenTeacherReportMealForMonth = req.IsOpenTeacherReportMealForMonth
set.IsOpenTeacherReportMealForSemester = req.IsOpenTeacherReportMealForSemester
set.IsOpenLimitOrderFood = req.IsOpenLimitOrderFood
set.IsOpenLimitTeacherRegister = req.IsOpenLimitTeacherRegister
set.UpdateAt = now.Format("2006-01-02 15:04:05")

_, err2 := centralKitchenForSchoolSetDb.CentralKitchenForSchoolSetUpdate(set.Id, set,
@@ -930,6 +931,7 @@ func SetBasicCentralKitchenForSchool(c *gin.Context) {
IsOpenTeacherReportMealForMonth: req.IsOpenTeacherReportMealForMonth,
IsOpenTeacherReportMealForSemester: req.IsOpenTeacherReportMealForSemester,
IsOpenLimitOrderFood: req.IsOpenLimitOrderFood,
IsOpenLimitTeacherRegister: req.IsOpenLimitTeacherRegister,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
})
@@ -1028,6 +1030,7 @@ func GetBasicCentralKitchenForSchool(c *gin.Context) {
IsOpenTeacherReportMealForMonth: 1,
IsOpenTeacherReportMealForSemester: 1,
IsOpenLimitOrderFood: 2,
IsOpenLimitTeacherRegister: 2,
CreateAt: time.Now().Format("2006-01-02 15:04:05"),
UpdateAt: time.Now().Format("2006-01-02 15:04:05"),
}


+ 1
- 0
app/admin/md/md_enterprise_manage.go Vedi File

@@ -240,6 +240,7 @@ type SetBasicCentralKitchenForSchoolReq struct {
IsOpenTeacherReportMealForMonth int `json:"is_open_teacher_report_meal_for_month" label:"开启教师按月报餐(1:开启 2:关闭)"`
IsOpenTeacherReportMealForSemester int `json:"is_open_teacher_report_meal_for_semester" label:"开启教师按学期报餐(1:开启 2:关闭)"`
IsOpenLimitOrderFood int `json:"is_open_limit_order_food" label:"是否开启限制订餐(1:开启 2:关闭)"`
IsOpenLimitTeacherRegister int `json:"is_open_limit_teacher_register" label:"是否开启教师注册(1:开启 2:关闭)"`
IsOpenTeacherReportMeal int `json:"is_open_teacher_report_meal" label:"'教师报餐(1:开启 2:关闭)"`
}



+ 9
- 1
app/customer/hdl/hdl_user_identity.go Vedi File

@@ -39,10 +39,18 @@ func SaveCentralKitchenForSchoolUserIdentity(c *gin.Context) {

now := time.Now()
if isHasUserIdentity == nil {
if identity != enum.UserIdentityForCentralKitchenForStudent {
centralKitchenForSchoolSetDb := db.CentralKitchenForSchoolSetDb{}
centralKitchenForSchoolSetDb.Set(req.EnterpriseId)
set, err := centralKitchenForSchoolSetDb.GetCentralKitchenForSchoolSet()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
if identity != enum.UserIdentityForCentralKitchenForStudent && set.IsOpenLimitTeacherRegister == 1 {
e.OutErr(c, e.ERR_NO_DATA, "当前身份信息不存在")
return
}

//2、新增身份信息
userIdentity := &model.UserIdentity{
Uid: user.Id,


+ 1
- 0
app/customer/md/md_enterprise.go Vedi File

@@ -19,6 +19,7 @@ type CentralKitchenForSchoolInfoResp struct {
IsOpenTeacherReportMealForMonth int `json:"is_open_teacher_report_meal_for_month" label:"开启教师按月报餐(1:开启 2:关闭)"`
IsOpenTeacherReportMealForSemester int `json:"is_open_teacher_report_meal_for_semester" label:"开启教师按学期报餐(1:开启 2:关闭)"`
IsOpenLimitOrderFood int `json:"is_open_limit_order_food" label:"是否开启限制订餐(1:开启 2:关闭)"`
IsOpenLimitTeacherRegister int `json:"is_open_limit_teacher_register" label:"是否开启教师注册(1:开启 2:关闭)"`
IsOpenBreakfast int `json:"is_open_breakfast" label:"是否开启早餐(1:开启 0:关闭)"`
IsOpenLunch int `json:"is_open_lunch" label:"是否开启午餐(1:开启 0:关闭)"`
IsOpenDinner int `json:"is_open_dinner" label:"是否开启晚餐(1:开启 0:关闭)"`


+ 1
- 0
app/customer/svc/svc_enterprise.go Vedi File

@@ -80,6 +80,7 @@ func CentralKitchenForSchoolInfo(enterpriseId int) (err error, resp md.CentralKi
resp.IsOpenTeacherReportMealForMonth = set.IsOpenTeacherReportMealForMonth
resp.IsOpenTeacherReportMealForSemester = set.IsOpenTeacherReportMealForSemester
resp.IsOpenLimitOrderFood = set.IsOpenLimitOrderFood
resp.IsOpenLimitTeacherRegister = set.IsOpenLimitTeacherRegister
}
return
}


+ 1
- 0
app/db/model/central_kitchen_for_school_set.go Vedi File

@@ -11,6 +11,7 @@ type CentralKitchenForSchoolSet struct {
IsOpenTeacherReportMealForMonth int `json:"is_open_teacher_report_meal_for_month" xorm:"not null default 1 comment('开启按月教师报餐(1:开启 2:关闭)') TINYINT(1)"`
IsOpenTeacherReportMealForSemester int `json:"is_open_teacher_report_meal_for_semester" xorm:"not null default 1 comment('开启按学期教师报餐(1:开启 2:关闭)') TINYINT(1)"`
IsOpenLimitOrderFood int `json:"is_open_limit_order_food" xorm:"not null default 2 comment('是否开启限制订餐(1:开启 2:关闭)') TINYINT(1)"`
IsOpenLimitTeacherRegister int `json:"is_open_limit_teacher_register" xorm:"not null default 2 comment('是否开启教师注册(1:开启 2:关闭)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

Caricamento…
Annulla
Salva