This commit is contained in:
parent
0f45a3916c
commit
747a0cb171
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 为空,非法请求")
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue