This commit is contained in:
hailin 2025-06-20 00:07:40 +08:00
parent 0f45a3916c
commit 747a0cb171
3 changed files with 3 additions and 10 deletions

View File

@ -906,14 +906,8 @@ func (m *BizCore) NewsAsync(ctx *itypes.Context, req *proto.NewsAsyncReq, needEx
return nil, 0, itypes.NewBizCodeDatabaseError(err.Error())
}
var extra map[string]interface{}
if needExtra && len(dos) > 0 && dos[0].ExtraData != nil {
extra = dos[0].ExtraData
}
return &proto.NewsAsyncResp{
List: dos,
ExtraData: extra, // ✅ 添加 extra_data 返回
List: dos,
}, total, itypes.BizOK
}

View File

@ -301,7 +301,7 @@ func (dao *NewsDAO) QueryList(cond *NewsCondition) (dos []*models.NewsDO, total
// }
func (dao *NewsDAO) QueryAsync(cond *NewsAsyncCondition) (dos []*models.NewsDO, total int64, err error) {
log.Infof("[QueryAsync] >>> 调用开始org_id=%d, digest='%s'", cond.Org_Id, cond.Digest)
//log.Infof("[QueryAsync] >>> 调用开始org_id=%d, digest='%s'", cond.Org_Id, cond.Digest)
if cond.Org_Id == 0 {
log.Warnf("[QueryAsync] org_id 为空,非法请求")

View File

@ -286,8 +286,7 @@ type NewsAsyncReq struct {
}
type NewsAsyncResp struct {
List []*models.NewsDO `json:"list"`
ExtraData map[string]interface{} `json:"extra_data"` // ✅ 添加字段
List []*models.NewsDO `json:"list"`
}
type NewsPullNewReq struct {