DengBiao пре 1 година
родитељ
комит
9f80292ce2
1 измењених фајлова са 22 додато и 19 уклоњено
  1. +22
    -19
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 22
- 19
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go Прегледај датотеку

@@ -910,7 +910,10 @@ func CentralKitchenForSchoolOrdRefund(req md.CentralKitchenForSchoolOrdRefundReq
var m []model.CentralKitchenForSchoolUserWithDay
centralKitchenForSchoolUserWithDayDb := db.CentralKitchenForSchoolUserWithDayDb{}
centralKitchenForSchoolUserWithDayDb.Set(0)
err = centralKitchenForSchoolUserWithDayDb.Db.In("id", req.Ids).Find(&m)
err = centralKitchenForSchoolUserWithDayDb.Db.
Where("state != ?", enum2.CentralKitchenForSchoolUserWithDayStateForCancel).
And("state != ?", enum2.CentralKitchenForSchoolUserWithDayStateForCanceling).
In("id", req.Ids).Find(&m)
if err != nil {
return err
}
@@ -990,7 +993,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if len(mm) > 0 {
var identityIds []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
@@ -1015,7 +1018,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1067,7 +1070,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if len(mm) > 0 {
var identityIds []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
@@ -1092,7 +1095,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1147,7 +1150,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
if len(mm) > 0 {
var identityIds []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIds = append(identityIds, utils.IntToStr(m.IdentityId))
@@ -1172,7 +1175,7 @@ func CentralKitchenForSchoolBatchAskForLeaveBySchool(req md.CentralKitchenForSch
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1268,7 +1271,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1293,7 +1296,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1345,7 +1348,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1370,7 +1373,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1422,7 +1425,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1447,7 +1450,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByGrade(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1532,7 +1535,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1557,7 +1560,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1609,7 +1612,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1634,7 +1637,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo
@@ -1686,7 +1689,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
if len(mm) > 0 {
var identityIdsV2 []string
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
identityIdsV2 = append(identityIdsV2, utils.IntToStr(m.IdentityId))
@@ -1711,7 +1714,7 @@ func CentralKitchenForSchoolBatchAskForLeaveByClass(req md.CentralKitchenForScho
var centralKitchenForSchoolUserRefundDays []*model.CentralKitchenForSchoolUserRefundDay
now := time.Now()
for _, m := range mm {
if m.State != enum2.CentralKitchenForSchoolUserWithDayStateForWait {
if m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCanceling || m.State == enum2.CentralKitchenForSchoolUserWithDayStateForCancel {
continue
}
dealOutTradeNo[m.OrdNo] = m.OrdNo


Loading…
Откажи
Сачувај