소스 검색

feat:A25131 publicapply 兑换列表调整

fuwencai 3 달 전
부모
커밋
8b4756dd49
2개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 4
      src/jfw/modules/publicapply/src/activityday/dao/exchange.go
  2. 1 0
      src/jfw/modules/publicapply/src/activityday/entity/exchange.go

+ 8 - 4
src/jfw/modules/publicapply/src/activityday/dao/exchange.go

@@ -232,9 +232,10 @@ func (e *Ex) GetRecords() (ex *entity.ExchangeData) {
 		}
 		for _, rv := range *records {
 			urlMap := common.ObjToMap(rv["url"])
-			if ex.Address == "" && urlMap != nil && len(*urlMap) > 0 {
+			var address string
+			if urlMap != nil && len(*urlMap) > 0 {
 				if urlMap != nil {
-					ex.Address = common.InterfaceToStr((*urlMap)[e.Platform])
+					address = common.InterfaceToStr((*urlMap)[e.Platform])
 				}
 			}
 			productId := encrypt.SE.EncodeString(common.InterfaceToStr(rv["product_info_id"]))
@@ -264,6 +265,7 @@ func (e *Ex) GetRecords() (ex *entity.ExchangeData) {
 					ExCode:     exCode,
 					PartyName:  partyName,
 					EXDate:     exDate,
+					Address:    address,
 				})
 			} else { //未兑换
 				//判断是否已经过期
@@ -320,9 +322,10 @@ WHERE lua.position_id  =  ? AND pbi.attribute > 0 AND  lua.active_id  != 6 ORDER
 		}
 		for _, rv := range *records {
 			urlMap := common.ObjToMap(rv["url"])
-			if ex.Address == "" && urlMap != nil && len(*urlMap) > 0 {
+			var address string
+			if urlMap != nil && len(*urlMap) > 0 {
 				if urlMap != nil {
-					ex.Address = common.InterfaceToStr((*urlMap)[e.Platform])
+					address = common.InterfaceToStr((*urlMap)[e.Platform])
 				}
 			}
 			activeId := encrypt.SE.EncodeString(common.InterfaceToStr(rv["active_id"]))
@@ -341,6 +344,7 @@ WHERE lua.position_id  =  ? AND pbi.attribute > 0 AND  lua.active_id  != 6 ORDER
 					ExCode:     exCode,
 					PartyName:  partyName,
 					EXDate:     exDate,
+					Address:    address,
 				})
 			} else { //未兑换
 				//判断是否已经过期

+ 1 - 0
src/jfw/modules/publicapply/src/activityday/entity/exchange.go

@@ -12,6 +12,7 @@ type ExchangeList struct {
 	EXDate     string `json:"ex_date"` //兑换时间
 	ActiveId   string `json:"active_id"`
 	PrizeId    string `json:"prize_id"` //
+	Address    string `json:"address"`  //
 }
 
 // 兑换列表返回结构体