DengBiao há 8 meses
ascendente
cometimento
b61b1f5111
2 ficheiros alterados com 25 adições e 3 eliminações
  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 Ver ficheiro

@@ -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 Ver ficheiro

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


Carregando…
Cancelar
Guardar