|
|
@@ -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 { |
|
|
|