|
@@ -7,6 +7,7 @@ import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
|
)
|
|
|
|
|
|
func (c *ControllerV1) BiddingList(ctx context.Context, req *v1.BiddingListReq) (res *v1.BiddingListRes, err error) {
|
|
@@ -15,7 +16,15 @@ func (c *ControllerV1) BiddingList(ctx context.Context, req *v1.BiddingListReq)
|
|
|
if session.PositionId <= 0 {
|
|
|
return nil, fmt.Errorf("请登录")
|
|
|
}
|
|
|
- err = g.Model("ai_search_bidding").Where("chat_id = ? and position_id=?", req.ChatId, session.PositionId).OrderDesc("create_time").Scan(&hTmp)
|
|
|
+ chatId := gconv.Int64(encrypt.SE.Decode4HexByCheck(req.ChatId))
|
|
|
+ if chatId == 0 {
|
|
|
+ return &v1.BiddingListRes{
|
|
|
+ ErrorCode: 0,
|
|
|
+ ErrorMsg: "",
|
|
|
+ Data: hTmp,
|
|
|
+ }, nil
|
|
|
+ }
|
|
|
+ err = g.Model("ai_search_bidding").Where("chat_id = ? and position_id=?", chatId, session.PositionId).OrderDesc("create_time").Scan(&hTmp)
|
|
|
if hTmp != nil && len(hTmp) > 0 {
|
|
|
for i := len(hTmp) - 1; i >= 0; i-- {
|
|
|
data := hTmp[i]
|
|
@@ -31,16 +40,17 @@ func (c *ControllerV1) BiddingList(ctx context.Context, req *v1.BiddingListReq)
|
|
|
}
|
|
|
|
|
|
type ResBidding struct {
|
|
|
- InfoId string `json:"infoId" dc:"内容"`
|
|
|
- Id string `json:"id" dc:"信息加密id"`
|
|
|
- Title string `json:"title" dc:"内容"`
|
|
|
- Area string `json:"area" dc:"内容"`
|
|
|
- Subtype string `json:"subtype" dc:"内容"`
|
|
|
- Annex string `json:"annex" dc:"内容"`
|
|
|
- Subscopeclass string `json:"subscopeclass" dc:"内容"`
|
|
|
- Buyerclass string `json:"buyerclass" dc:"内容"`
|
|
|
- Budget float64 `json:"budget" dc:"内容"`
|
|
|
- Bidanount float64 `json:"bidanount" dc:"内容"`
|
|
|
- Publishtime string `json:"publishtime" dc:"内容"`
|
|
|
- Create_time string `json:"create_time" dc:"内容"`
|
|
|
+ InfoId string `json:"infoId" dc:"内容"`
|
|
|
+ Id string `json:"id" dc:""`
|
|
|
+ Title string `json:"title" dc:"标题"`
|
|
|
+ Area string `json:"area" dc:"地区"`
|
|
|
+ Subtype string `json:"subtype" dc:"信息类型"`
|
|
|
+ Annex string `json:"annex" dc:"是否有附件;0:否 1:是"`
|
|
|
+ Subscopeclass string `json:"subscopeclass" dc:"信息行业"`
|
|
|
+ Buyerclass string `json:"buyerclass" dc:"采购单位行业"`
|
|
|
+ Budget float64 `json:"budget" dc:"预算"`
|
|
|
+ Bidanount float64 `json:"bidanount" dc:"中标金额"`
|
|
|
+ Publishtime int64 `json:"publishtime" dc:"发布时间"`
|
|
|
+ Create_time string `json:"create_time" dc:"创建时间"`
|
|
|
+ PublishtimeStr string `json:"publishtimeStr" dc:"发布时间"`
|
|
|
}
|