DengBiao 9 mesi fa
parent
commit
943687bef8
1 ha cambiato i file con 21 aggiunte e 0 eliminazioni
  1. +21
    -0
      app/admin/hdl/hdl_suggested_feedback.go

+ 21
- 0
app/admin/hdl/hdl_suggested_feedback.go Vedi File

@@ -1,8 +1,10 @@
package hdl

import (
enum2 "applet/app/admin/enum"
"applet/app/admin/lib/validate"
"applet/app/admin/md"
"applet/app/admin/svc"
"applet/app/db"
"applet/app/e"
"github.com/gin-gonic/gin"
@@ -38,6 +40,25 @@ func SuggestedFeedbackList(c *gin.Context) {
if req.Phone != "" {
sess.And("user.phone like ?", "%"+req.Phone+"%")
}
admin := svc.GetUser(c)
if admin.IsSuperAdministrator != enum2.IsSuperAdministratorTure {
adminWithEnterpriseDb := db.AdminWithEnterpriseDb{}
adminWithEnterpriseDb.Set()
adminWithEnterprise, err1 := adminWithEnterpriseDb.FindAdminWithEnterprise(admin.AdmId)
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
var enterPriseIds []int
for _, v1 := range *adminWithEnterprise {
enterPriseIds = append(enterPriseIds, v1.EnterpriseId)
}
if len(enterPriseIds) == 0 {
return
}
sess.In("device.enterprise_id", enterPriseIds)
}

var m []*db.SuggestedFeedbackWithUserIdentity
count, err := sess.


Caricamento…
Annulla
Salva