This commit is contained in:
parent
c6f243ba82
commit
0f45a3916c
|
|
@ -898,17 +898,22 @@ func (m *BizCore) TagDelete(ctx *itypes.Context, req *proto.TagDeleteReq) (resp
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *BizCore) NewsAsync(ctx *itypes.Context, req *proto.NewsAsyncReq, needExtra bool) (resp *proto.NewsAsyncResp, total int64, code itypes.BizCode) {
|
func (m *BizCore) NewsAsync(ctx *itypes.Context, req *proto.NewsAsyncReq, needExtra bool) (resp *proto.NewsAsyncResp, total int64, code itypes.BizCode) {
|
||||||
var err error
|
dos, total, err := m.newsDAO.QueryAsync(&dao.NewsAsyncCondition{
|
||||||
var dos []*models.NewsDO
|
|
||||||
dos, total, err = m.newsDAO.QueryAsync(&dao.NewsAsyncCondition{
|
|
||||||
Org_Id: req.Org_Id,
|
Org_Id: req.Org_Id,
|
||||||
Digest: req.Digest,
|
Digest: req.Digest,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,7 @@ 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