Selaa lähdekoodia

fix:isdel字段添加

duxin 3 vuotta sitten
vanhempi
commit
2a4a3cfa29

+ 1 - 1
rpc/manager/internal/logic/infodetaillogic.go

@@ -94,9 +94,9 @@ func (l *InfoDetailLogic) InfoDetail(in *manager.InfoDetailReq) (*manager.InfoDe
 
 	infoData.Detail = common.InterfaceToStr(data["detail"])
 	infoData.Attach = common.InterfaceToStr(data["attach"])
-
 	infoData.PublishStatus = common.Int64All(data["published"])
 	infoData.Phone = common.InterfaceToStr(data["phone"])
+	infoData.IsDel = common.Int64All(data["is_del"])
 
 	applyInfo.UserId = common.InterfaceToStr(data["user_id"]) //用户id加密
 	applyInfo.Time = common.InterfaceToStr(data["create_time"])

+ 4 - 5
rpc/manager/internal/logic/infolistlogic.go

@@ -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