浏览代码

update

tmp
dengbiao 6 个月前
父节点
当前提交
b7b5252da5
共有 1 个文件被更改,包括 45 次插入45 次删除
  1. +45
    -45
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 45
- 45
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go 查看文件

@@ -1622,7 +1622,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
identityIds = append(identityIds, utils.IntToStr(m.Id))
}
if len(identityIds) <= 0 {
//无请假学生
@@ -1631,10 +1631,10 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIds, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -1705,7 +1705,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
identityIds = append(identityIds, utils.IntToStr(m.Id))
}
if len(identityIds) <= 0 {
//无请假学生
@@ -1714,10 +1714,10 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIds, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -1788,7 +1788,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
identityIds = append(identityIds, utils.IntToStr(m.Id))
}
if len(identityIds) <= 0 {
//无请假学生
@@ -1797,10 +1797,10 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIds, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -1915,7 +1915,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -1924,10 +1924,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -1998,7 +1998,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -2007,10 +2007,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -2081,7 +2081,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -2090,10 +2090,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -2197,7 +2197,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -2206,10 +2206,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForBreakfast)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -2280,7 +2280,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -2289,10 +2289,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForLunch)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {
@@ -2363,7 +2363,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.Id))
}
if len(identityIdsV2) <= 0 {
//无请假学生
@@ -2372,10 +2372,10 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho

//2、更改 `central_kitchen_for_school_user_with_day` 的 state 为 退款中
idsStr := strings.Join(identityIdsV2, ",")
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d and state =%d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner, enum2.CentralKitchenForSchoolUserWithDayStateForWait)
sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
//sql := "update central_kitchen_for_school_user_with_day set state = %d where identity_id In (%s) and date = '%s' and kind = %d"
//sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr, date, enum2.CentralKitchenForSchoolUserWithDayKindForDinner)
sql := "update central_kitchen_for_school_user_with_day set state = %d where id In (%s)"
sql = fmt.Sprintf(sql, enum2.CentralKitchenForSchoolUserWithDayStateForCanceling, idsStr)
fmt.Println(sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {


正在加载...
取消
保存