فهرست منبع

feat:未登录 字段调整

wangshan 2 سال پیش
والد
کامیت
c7f4b9129f
3فایلهای تغییر یافته به همراه9 افزوده شده و 11 حذف شده
  1. 2 2
      jyBXCore/api/etc/bxcore-api.yaml
  2. 1 7
      jyBXCore/api/internal/config/config.go
  3. 6 2
      jyBXCore/api/internal/logic/searchListLogic.go

+ 2 - 2
jyBXCore/api/etc/bxcore-api.yaml

@@ -17,10 +17,10 @@ Core:
 AppId: 10000
 MgoLogsName: jybxcore_logs
 MgoLogsCount: 500
-DetailMosaicTxt: 
+DetailMosaicTxt: 免费注册即可查看
 SearchMosaic:
   budget: true
   bidAmount: true
   buyer: true
   winner: true
-  bidOpenTime: true
+  bidOpenTime: true

+ 1 - 7
jyBXCore/api/internal/config/config.go

@@ -17,13 +17,7 @@ type Config struct {
 	MgoLogsName     string
 	MgoLogsCount    int
 	DetailMosaicTxt string
-	SearchMosaic    struct {
-		Budget      bool `json:"budget"`
-		BidAmount   bool `json:"bidAmount"`
-		Buyer       bool `json:"buyer"`
-		Winner      bool `json:"winner"`
-		BidOpenTime bool `json:"bidOpenTime"`
-	}
+	SearchMosaic    map[string]bool
 }
 
 type Db struct {

+ 6 - 2
jyBXCore/api/internal/logic/searchListLogic.go

@@ -93,9 +93,13 @@ func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonRe
 			d := common.StructToMapMore(v)
 			for name, t1 := range sm {
 				ts, _ := t1.(bool)
-				if v1, ok := d[name]; ok && v1 != "" && v1 != 0 && ts {
-					d[name] = detailMosaicTxt
+				if !ts {
+					continue
 				}
+				d[name] = detailMosaicTxt
+				//if v1, ok := d[name]; ok && v1 != "" && v1 != 0 && ts {
+				//	d[name] = detailMosaicTxt
+				//}
 			}
 			data = append(data, d)
 		}