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())
|
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{
|
return &proto.NewsAsyncResp{
|
||||||
List: dos,
|
List: dos,
|
||||||
ExtraData: extra, // ✅ 添加 extra_data 返回
|
|
||||||
}, total, itypes.BizOK
|
}, 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) {
|
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 {
|
if cond.Org_Id == 0 {
|
||||||
log.Warnf("[QueryAsync] org_id 为空,非法请求")
|
log.Warnf("[QueryAsync] org_id 为空,非法请求")
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,6 @@ type NewsAsyncReq struct {
|
||||||
|
|
||||||
type NewsAsyncResp struct {
|
type NewsAsyncResp struct {
|
||||||
List []*models.NewsDO `json:"list"`
|
List []*models.NewsDO `json:"list"`
|
||||||
ExtraData map[string]interface{} `json:"extra_data"` // ✅ 添加字段
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NewsPullNewReq struct {
|
type NewsPullNewReq struct {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue