DengBiao 9ヶ月前
コミット
943687bef8
1個のファイルの変更21行の追加0行の削除
  1. +21
    -0
      app/admin/hdl/hdl_suggested_feedback.go

+ 21
- 0
app/admin/hdl/hdl_suggested_feedback.go ファイルの表示

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


読み込み中…
キャンセル
保存