|
|
@@ -1223,9 +1223,9 @@ type QueryNewTitlesRsp struct {
|
|
|
func GetNewTitles(req QueryNewTitlesReq) (rsp []QueryNewTitlesRsp, total int64, err error) {
|
|
|
engine := db.GetEngine()
|
|
|
|
|
|
- session := engine.Table("SITE_COLUMNDETAIL")
|
|
|
+ session := engine.Table("SITE_COLUMNDETAIL").Where("ISSHOW = 1")
|
|
|
if req.COLUMNID != 0 {
|
|
|
- session = session.Where("COLUMNID = ?", req.COLUMNID)
|
|
|
+ session = session.And("COLUMNID = ?", req.COLUMNID)
|
|
|
}
|
|
|
total, err = session.Count(new(QueryNewTitlesRsp))
|
|
|
if err != nil {
|
|
|
@@ -1233,9 +1233,9 @@ func GetNewTitles(req QueryNewTitlesReq) (rsp []QueryNewTitlesRsp, total int64,
|
|
|
}
|
|
|
|
|
|
rsp = make([]QueryNewTitlesRsp, 0)
|
|
|
- session = engine.Table("SITE_COLUMNDETAIL")
|
|
|
+ session = engine.Table("SITE_COLUMNDETAIL").Where("ISSHOW = 1")
|
|
|
if req.COLUMNID != 0 {
|
|
|
- session = session.Where("COLUMNID = ?", req.COLUMNID)
|
|
|
+ session = session.And("COLUMNID = ?", req.COLUMNID)
|
|
|
}
|
|
|
session = session.Desc("ISTOP", "PUBLISHDATE")
|
|
|
page := req.Page - 1
|
|
|
@@ -1285,7 +1285,7 @@ func GetNewContents(ids []string) (rsp []QueryNewContentsRsp, error error) {
|
|
|
GM.MEMBERNAME,
|
|
|
GM.MEMBERTAGS,
|
|
|
GM.IMAGEURL
|
|
|
- `).Join("LEFT", "GZ_MEMBERINFO GM", "GM.MEMBERID = T.SRCID")
|
|
|
+ `).Join("LEFT", "GZ_MEMBERINFO GM", "GM.MEMBERID = T.SRCID").Where("T.ISSHOW = 1")
|
|
|
if len(ids) != 0 {
|
|
|
session = session.In("T.ID", ids)
|
|
|
}
|