|
@@ -80,9 +80,9 @@ func (l *InfoListLogic) InfoList(in *manager.InfoListReq) (*manager.InfoListResp
|
|
|
in.PageSize = 10
|
|
|
}
|
|
|
if in.PageIndex == 1 {
|
|
|
- count = model.Mysql.CountBySql(`SELECT count(1) from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time from information ` + queryInfo + `
|
|
|
+ count = model.Mysql.CountBySql(`SELECT count(1) from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published from information ` + queryInfo + `
|
|
|
union all
|
|
|
- SELECT id,type,status,phone,contact_person,contact_phone,title,create_time from supply_info ` + queryInfo + ` ) a`)
|
|
|
+ SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published from supply_info ` + queryInfo + ` ) a`)
|
|
|
}
|
|
|
var offset int
|
|
|
if in.PageIndex <= 1 {
|
|
@@ -90,9 +90,9 @@ func (l *InfoListLogic) InfoList(in *manager.InfoListReq) (*manager.InfoListResp
|
|
|
} else {
|
|
|
offset = common.IntAll((in.PageIndex - 1) * in.PageSize)
|
|
|
}
|
|
|
- allData := model.Mysql.SelectBySql(`SELECT * from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del from information `+queryInfo+`
|
|
|
+ allData := model.Mysql.SelectBySql(`SELECT * from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published from information `+queryInfo+`
|
|
|
union all
|
|
|
- SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del from supply_info `+queryInfo+` ) a order by a.create_time limit ?,? `, offset, in.PageSize)
|
|
|
+ SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published from supply_info `+queryInfo+` ) a order by a.create_time limit ?,? `, offset, in.PageSize)
|
|
|
if allData != nil && len(*allData) > 0 {
|
|
|
for _, v := range *allData {
|
|
|
res := manager.InfoList{}
|
|
@@ -116,7 +116,6 @@ func (l *InfoListLogic) InfoList(in *manager.InfoListReq) (*manager.InfoListResp
|
|
|
results = append(results, &res)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
data := manager.Data{}
|
|
|
data.Count = count
|
|
|
data.List = results
|