|
@@ -770,19 +770,28 @@ func (s LocalLifeService) LocalLifeToReview(localUpdateParam *vo.LocalUpdatePara
|
|
}
|
|
}
|
|
storeName := store.StoreName // 门店名称
|
|
storeName := store.StoreName // 门店名称
|
|
storeDetail := store.StoreDetail // 门店特点
|
|
storeDetail := store.StoreDetail // 门店特点
|
|
- storeMainPhoto, err1 := dao.ProductPhotoDAO{}.GetMainPhotoByStoreID(store.StoreID)
|
|
|
|
|
|
+ storeMainPhoto, err1 := dao.ProductPhotoDAO{}.GetMainPhotoByStoreID(local.StoreID)
|
|
if err1 != nil {
|
|
if err1 != nil {
|
|
return nil, err1
|
|
return nil, err1
|
|
}
|
|
}
|
|
|
|
+ var teamBuyingName, teamBuyingDetail, teamBuyingMainPhoto string
|
|
|
|
+ var teamBuyingPhotos []entity.ProductPhoto
|
|
teamBuying, err2 := dao.TeamBuyingDao{}.GetTeamBuyingByID(local.TeamBuyingId)
|
|
teamBuying, err2 := dao.TeamBuyingDao{}.GetTeamBuyingByID(local.TeamBuyingId)
|
|
if err2 != nil {
|
|
if err2 != nil {
|
|
return nil, err2
|
|
return nil, err2
|
|
}
|
|
}
|
|
- teamBuyingName := teamBuying.TeamBuyingName // 团购标题
|
|
|
|
- teamBuyingDetail := teamBuying.TeamBuyingDetail // 团购详情
|
|
|
|
- teamBuyingMainPhoto, err3 := dao.ProductPhotoDAO{}.GetMainPhotoByTeamBuyingID(teamBuying.TeamBuyingID)
|
|
|
|
- if err3 != nil {
|
|
|
|
- return nil, err3
|
|
|
|
|
|
+ var err3, err5 error
|
|
|
|
+ if teamBuying != nil {
|
|
|
|
+ teamBuyingName = teamBuying.TeamBuyingName // 团购标题
|
|
|
|
+ teamBuyingDetail = teamBuying.TeamBuyingDetail // 团购详情
|
|
|
|
+ teamBuyingMainPhoto, err3 = dao.ProductPhotoDAO{}.GetMainPhotoByTeamBuyingID(local.TeamBuyingId)
|
|
|
|
+ if err3 != nil {
|
|
|
|
+ return nil, err3
|
|
|
|
+ }
|
|
|
|
+ teamBuyingPhotos, err5 = dao.ProductPhotoDAO{}.GetProductPhotoByTeamBuyingID(local.TeamBuyingId)
|
|
|
|
+ if err5 != nil {
|
|
|
|
+ return nil, err5
|
|
|
|
+ }
|
|
}
|
|
}
|
|
var images []string
|
|
var images []string
|
|
var videos []string
|
|
var videos []string
|
|
@@ -816,10 +825,7 @@ func (s LocalLifeService) LocalLifeToReview(localUpdateParam *vo.LocalUpdatePara
|
|
videoJobIds = append(videoJobIds, *videoJobId)
|
|
videoJobIds = append(videoJobIds, *videoJobId)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- teamBuyingPhotos, err5 := dao.ProductPhotoDAO{}.GetProductPhotoByTeamBuyingID(local.TeamBuyingId)
|
|
|
|
- if err5 != nil {
|
|
|
|
- return nil, err5
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
for _, teamBuyingPhoto := range teamBuyingPhotos {
|
|
for _, teamBuyingPhoto := range teamBuyingPhotos {
|
|
if teamBuyingPhoto.Symbol == 2 || teamBuyingPhoto.Symbol == 4 {
|
|
if teamBuyingPhoto.Symbol == 2 || teamBuyingPhoto.Symbol == 4 {
|
|
images = append(images, teamBuyingPhoto.PhotoUrl)
|
|
images = append(images, teamBuyingPhoto.PhotoUrl)
|