DengBiao před 9 měsíci
rodič
revize
b61b1f5111
2 změnil soubory, kde provedl 25 přidání a 3 odebrání
  1. +1
    -1
      app/admin/hdl/hdl_demo.go
  2. +24
    -2
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 1
- 1
app/admin/hdl/hdl_demo.go Zobrazit soubor

@@ -83,7 +83,7 @@ func DemoV1(c *gin.Context) {
for _, v := range m {
if recordsId[v.RecordsId] {
repeatIds = append(repeatIds, v.Id)
centralKitchenForSchoolUserRefundDayDb.CentralKitchenForSchoolUserRefundDayDelete(v.Id)
//centralKitchenForSchoolUserRefundDayDb.CentralKitchenForSchoolUserRefundDayDelete(v.Id)
}
recordsId[v.RecordsId] = true
}


+ 24
- 2
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go Zobrazit soubor

@@ -664,7 +664,17 @@ func CentralKitchenForSchoolOrdList(req md.CentralKitchenForSchoolOrdListReq) (r
sess.And("user_identity.name like ?", "%"+req.Name+"%")
}
if req.Phone != "" {
sess.And("user.phone like ?", "%"+req.Phone+"%")
userDb := db.UserDb{}
userDb.Set()
user, err1 := userDb.GetUserByPhone(req.Phone)
if err1 != nil {
return nil, 0, err1
}
if user != nil {
sess.And("central_kitchen_for_school_package_ord.uid = ?", user.Id)
} else {
sess.And("user.phone like ?", "%"+req.Phone+"%")
}
}

if req.EnterPriseKind != 0 {
@@ -1000,7 +1010,19 @@ func CentralKitchenForSchoolReserveList(req md.CentralKitchenForSchoolReserveLis
sess.And("user_identity.name like ?", "%"+req.Name+"%")
}
if req.Phone != "" {
sess.And("user.phone like ?", "%"+req.Phone+"%")
if req.Phone != "" {
userDb := db.UserDb{}
userDb.Set()
user, err1 := userDb.GetUserByPhone(req.Phone)
if err1 != nil {
return nil, 0, err1
}
if user != nil {
sess.And("central_kitchen_for_school_package_ord.uid = ?", user.Id)
} else {
sess.And("user.phone like ?", "%"+req.Phone+"%")
}
}
}

if len(classWithUserIdentityIdsOne) > 0 {


Načítá se…
Zrušit
Uložit