|
@@ -10,7 +10,6 @@ import (
|
|
|
"jyBXBuyer/rpc/internal/svc"
|
|
|
"jyBXBuyer/rpc/model"
|
|
|
"jyBXBuyer/rpc/type/bxbuyer"
|
|
|
- "time"
|
|
|
)
|
|
|
|
|
|
type BuyerListLogic struct {
|
|
@@ -29,7 +28,6 @@ func NewBuyerListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyerLi
|
|
|
|
|
|
// 采购单位搜索
|
|
|
func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerListResp, error) {
|
|
|
- start2 := time.Now()
|
|
|
logx.Info("----:", model.CheckEmpty(in))
|
|
|
resp := &bxbuyer.BuyerListResp{}
|
|
|
// 采购单位搜索过来的 最多查100条
|
|
@@ -66,7 +64,7 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
|
|
|
query, CountQuery = model.BuyerListRedisCacheQuery(in.PageNum, in.PageSize)
|
|
|
buyerNames, resp = model.GetBuyerList(query, CountQuery, true)
|
|
|
if len(resp.Data.List) > 0 {
|
|
|
- model.SupplyBuyerListData(buyerNames, resp)
|
|
|
+ //model.SupplyBuyerListData(buyerNames, resp)
|
|
|
b, err := json.Marshal(resp.Data)
|
|
|
if err == nil {
|
|
|
redis.PutBytes("other", fmt.Sprintf(model.P_redis_key, in.PageNum, in.PageSize), &b, model.P_redis_time)
|
|
@@ -79,9 +77,9 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
|
|
|
query, CountQuery = model.BuyerListQuery(in)
|
|
|
logx.Info("query:", query)
|
|
|
buyerNames, resp = model.GetBuyerList(query, CountQuery, false) // 查询数据
|
|
|
- if len(resp.Data.List) > 0 {
|
|
|
- model.SupplyBuyerListData(buyerNames, resp)
|
|
|
- }
|
|
|
+ //if len(resp.Data.List) > 0 {
|
|
|
+ // model.SupplyBuyerListData(buyerNames, resp)
|
|
|
+ //}
|
|
|
}
|
|
|
if len(resp.Data.List) > 0 && (in.UserId != "" || in.EntUserId != "") {
|
|
|
model.SupplyFollowInfo(in, buyerNames, resp)
|
|
@@ -89,7 +87,6 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
|
|
|
if resp.Data.Count > IC.C.BuyerSearchLimit {
|
|
|
resp.Data.Count = IC.C.BuyerSearchLimit
|
|
|
}
|
|
|
- logx.Info("SupplyBuyerListData耗时:", time.Since(start2))
|
|
|
|
|
|
return resp, nil
|
|
|
}
|