|
|
@@ -1167,7 +1167,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
|
//查找订单数据 |
|
|
|
sess := db.Db.Desc("central_kitchen_for_school_package_ord.id") |
|
|
|
sess.And("central_kitchen_for_school_package_ord.state =?", enum.CentralKitchenForSchoolPackageOrdStateForSuccess) |
|
|
|
sess.And("central_kitchen_for_school_package_ord.state =?", enum.CentralKitchenForSchoolPackageOrdStateForSuccess).And("user_identity.identity = ?", enum.UserIdentityForCentralKitchenForStudent) |
|
|
|
if req.EnterpriseId != 0 { |
|
|
|
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId) |
|
|
|
} |
|
|
@@ -1192,7 +1192,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
sess1 := db.Db.Where("central_kitchen_for_school_user_refund_day.state =?", enum.CentralKitchenForSchoolUserRefundDayStateForAuditComplete).Desc("central_kitchen_for_school_user_refund_day.id") |
|
|
|
sess1 := db.Db.Where("central_kitchen_for_school_user_refund_day.state =?", enum.CentralKitchenForSchoolUserRefundDayStateForAuditComplete).And("user_identity.identity = ?", enum.UserIdentityForCentralKitchenForStudent).Desc("central_kitchen_for_school_user_refund_day.id") |
|
|
|
if req.EnterpriseId != 0 { |
|
|
|
sess1.And("enterprise.id =?", req.EnterpriseId) |
|
|
|
} |
|
|
|