|
@@ -136,20 +136,30 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
List<PlaceInfoVO.PlaceInfoMsgVO> placeInfoMsgVOS = new ArrayList<>();
|
|
|
appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, id)
|
|
|
.eq(AppSitePlace::getType,0)).forEach(appSitePlace -> {
|
|
|
+ AppSitePriceRules appSitePriceRules = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
+ .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
|
|
|
+ .last("limit 1").orderByDesc(AppSitePriceRules::getOriginalPrice));
|
|
|
+ AppSitePriceRules appSitePriceRules1 = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
+ .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
|
|
|
+ .last("limit 1").orderByDesc(AppSitePriceRules::getSellingPrice));
|
|
|
PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
|
|
|
placeInfoMsgVO.setName(appSitePlace.getName())
|
|
|
.setSales(0)
|
|
|
.setId(appSitePlace.getId())
|
|
|
- .setOriginalPrice(appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
- .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
|
|
|
- .last("limit 1").orderByDesc(AppSitePriceRules::getOriginalPrice)).getOriginalPrice())
|
|
|
- .setSellingPrice(appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
- .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
|
|
|
- .last("limit 1").orderByDesc(AppSitePriceRules::getSellingPrice)).getSellingPrice())
|
|
|
.setCategory(getCategoryName(appSitePlace.getCategoryId()))
|
|
|
.setCover(appSitePlace.getCover().split(",")[0])
|
|
|
.setReminder(appSitePlace.getReminder())
|
|
|
.setRefundType(appSitePlace.getRefundType());
|
|
|
+ if(appSitePriceRules!=null){
|
|
|
+ placeInfoMsgVO.setOriginalPrice(appSitePriceRules.getOriginalPrice());
|
|
|
+ }else {
|
|
|
+ placeInfoMsgVO.setOriginalPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(appSitePriceRules1!=null){
|
|
|
+ placeInfoMsgVO.setSellingPrice(appSitePriceRules1.getSellingPrice());
|
|
|
+ }else {
|
|
|
+ placeInfoMsgVO.setSellingPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
placeInfoMsgVOS.add(placeInfoMsgVO);
|
|
|
});
|
|
|
placeInfo.setPlaceInfoMsgVO(placeInfoMsgVOS);
|