作者 tangxvhui

调整接口

... ... @@ -7,6 +7,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/logic/comment"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result"
)
... ... @@ -18,7 +19,8 @@ func SystemEditAticleCommentLoveHandler(svcCtx *svc.ServiceContext) http.Handler
result.HttpResult(r, w, nil, err)
return
}
token := contextdata.GetUserTokenFromCtx(r.Context())
req.CompanyId = token.CompanyId
l := comment.NewSystemEditAticleCommentLoveLogic(r.Context(), svcCtx)
resp, err := l.SystemEditAticleCommentLove(&req)
result.HttpResult(r, w, resp, err)
... ...
... ... @@ -49,6 +49,9 @@ func (l *SystemEditAticleCommentLoveLogic) SystemEditAticleCommentLove(req *type
}
resp = &types.SystemEditCommentLoveResponse{}
for _, val := range commetList {
if val.CompanyId != req.CompanyId {
return nil, xerr.NewErrMsg("没有操作权限")
}
if u, ok := paramMap[val.Id]; ok {
val.CountAdminLove = u
resp.ParamList = append(resp.ParamList, types.SystemEditLove{
... ...