Browse Source

update

tmp
DengBiao 10 months ago
parent
commit
b61b1f5111
2 changed files with 25 additions and 3 deletions
  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 View File

@@ -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 View File

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


Loading…
Cancel
Save