|
|
@@ -71,12 +71,13 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) |
|
|
|
} |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -90,12 +91,13 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
|
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -108,12 +110,13 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) |
|
|
|
} |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Date: v1.Date, |
|
|
|
Amount: amount, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Date: v1.Date, |
|
|
|
Amount: amount, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@@ -181,12 +184,13 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota |
|
|
|
|
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -200,12 +204,13 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
|
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Amount: amount, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -218,12 +223,13 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota |
|
|
|
} |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Amount: amount, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Amount: amount, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@@ -276,12 +282,13 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP |
|
|
|
} |
|
|
|
|
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
Amount: amount, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
Date: v1.Date, |
|
|
|
Amount: amount, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
} |
|
|
@@ -295,12 +302,13 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP |
|
|
|
} |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Amount: amount, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Amount: amount, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -313,12 +321,13 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP |
|
|
|
} |
|
|
|
totalPrice += utils.StrToFloat64(amount) |
|
|
|
data = append(data, &model.CentralKitchenForSchoolUserWithDay{ |
|
|
|
Uid: uid, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Amount: amount, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
Uid: uid, |
|
|
|
EnterpriseId: buyPackageReq.EnterpriseId, |
|
|
|
IdentityId: buyPackageReq.UserIdentityId, |
|
|
|
Kind: enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
Amount: amount, |
|
|
|
Date: v1.Date, |
|
|
|
State: enum.CentralKitchenForSchoolUserWithDayStateForWait, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|