|
@@ -4,6 +4,7 @@ import (
|
|
|
"context"
|
|
|
"github.com/suyuan32/simple-admin-common/msg/errormsg"
|
|
|
"github.com/suyuan32/simple-admin-common/utils/pointy"
|
|
|
+ "wechat-api/ent/label"
|
|
|
"wechat-api/ent/labeltagging"
|
|
|
"wechat-api/ent/predicate"
|
|
|
"wechat-api/internal/utils/dberrorhandler"
|
|
@@ -42,6 +43,11 @@ func (l *GetLabelTaggingListLogic) GetLabelTaggingList(req *types.LabelTaggingLi
|
|
|
resp.Data.Total = data.PageDetails.Total
|
|
|
|
|
|
for _, v := range data.List {
|
|
|
+ var labelAddInfo []string
|
|
|
+ labels, _ := l.svcCtx.DB.Label.Query().Where(label.IDIn(v.ActionLabelAdd...)).All(l.ctx)
|
|
|
+ for _, l := range labels {
|
|
|
+ labelAddInfo = append(labelAddInfo, l.Name)
|
|
|
+ }
|
|
|
resp.Data.Data = append(resp.Data.Data,
|
|
|
types.LabelTaggingInfo{
|
|
|
BaseIDInfo: types.BaseIDInfo{
|
|
@@ -54,6 +60,7 @@ func (l *GetLabelTaggingListLogic) GetLabelTaggingList(req *types.LabelTaggingLi
|
|
|
Type: &v.Type,
|
|
|
Conditions: v.Conditions,
|
|
|
ActionLabelAdd: v.ActionLabelAdd,
|
|
|
+ LabelAddInfo: labelAddInfo,
|
|
|
ActionLabelDel: v.ActionLabelDel,
|
|
|
})
|
|
|
}
|