|
@@ -527,7 +527,7 @@ func (s LocalLifeService) GetLocalLifeDetail(localId string) (*vo.ReLocalDetail,
|
|
// 关联主体
|
|
// 关联主体
|
|
var reStore vo.ReStorePreview
|
|
var reStore vo.ReStorePreview
|
|
store, err := dao.StoreDao{}.GetStoreByID(localLife.StoreID)
|
|
store, err := dao.StoreDao{}.GetStoreByID(localLife.StoreID)
|
|
- if err == nil {
|
|
|
|
|
|
+ if err == nil && store != nil {
|
|
photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByStoreID(store.StoreID)
|
|
photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByStoreID(store.StoreID)
|
|
if e != nil {
|
|
if e != nil {
|
|
photoUrl = ""
|
|
photoUrl = ""
|
|
@@ -546,7 +546,7 @@ func (s LocalLifeService) GetLocalLifeDetail(localId string) (*vo.ReLocalDetail,
|
|
reLocalDetail.StoreInfo = &reStore
|
|
reLocalDetail.StoreInfo = &reStore
|
|
var reTeamBuying vo.ReTeamBuyingPreview
|
|
var reTeamBuying vo.ReTeamBuyingPreview
|
|
teamBuying, err := dao.TeamBuyingDao{}.GetTeamBuyingByID(localLife.TeamBuyingId)
|
|
teamBuying, err := dao.TeamBuyingDao{}.GetTeamBuyingByID(localLife.TeamBuyingId)
|
|
- if err == nil {
|
|
|
|
|
|
+ if err == nil && teamBuying != nil {
|
|
photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByTeamBuyingID(teamBuying.TeamBuyingID)
|
|
photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByTeamBuyingID(teamBuying.TeamBuyingID)
|
|
if e != nil {
|
|
if e != nil {
|
|
photoUrl = ""
|
|
photoUrl = ""
|