Browse Source

看板账号统计接口增加账号纬度查询

boweniac 3 months ago
parent
commit
c38d8f7bdd
3 changed files with 6 additions and 0 deletions
  1. 2 0
      desc/wechat/dashboard.api
  2. 3 0
      internal/logic/dashboard/get_wxs_logic.go
  3. 1 0
      internal/types/types.go

+ 2 - 0
desc/wechat/dashboard.api

@@ -61,6 +61,8 @@ type (
 
         // 租户id
         OrganizationId  *uint64 `json:"organizationId,optional"`
+
+        Wxid  *string `json:"wxid,optional"`
     }
 
     WxResp {

+ 3 - 0
internal/logic/dashboard/get_wxs_logic.go

@@ -79,6 +79,9 @@ func (l *GetWxsLogic) GetWxs(req *types.WxReq) (resp *types.WxResp, err error) {
 	if organizationId != 0 {
 		predicates = append(predicates, wx.OrganizationID(organizationId))
 	}
+	if req.Wxid != nil {
+		predicates = append(predicates, wx.Wxid(*req.Wxid))
+	}
 	wxs, err := l.svcCtx.DB.Wx.Query().Where(predicates...).All(l.ctx)
 
 	if err != nil {

+ 1 - 0
internal/types/types.go

@@ -2988,6 +2988,7 @@ type WxReq struct {
 	EndDate *string `json:"end_date"`
 	// 租户id
 	OrganizationId *uint64 `json:"organizationId,optional"`
+	Wxid           *string `json:"wxid,optional"`
 }
 
 // swagger:model WxResp