|
@@ -37,15 +37,13 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
private AppInstructorMapper appInstructorMapper;
|
|
|
@Resource
|
|
|
private AppOrderMapper appOrderMapper;
|
|
|
+ @Resource
|
|
|
+ private AppSitePlaceMapper appSitePlaceMapper;
|
|
|
|
|
|
@Override
|
|
|
public PlaceInfoVO getPlaceInfo(String id) {
|
|
|
AppSite appSite = appSiteMapper.selectById(id);
|
|
|
PlaceInfoVO placeInfo = appSiteMapper.getPlaceInfo(id);
|
|
|
- AppSitePriceRules appSitePriceRules = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
- .eq(AppSitePriceRules::getSitePlaceId, id)
|
|
|
- .eq(AppSitePriceRules::getStatus, 0)
|
|
|
- .last("limit 1"));
|
|
|
List<PlaceInfoVO.InstructorVO> instructorVOList = new ArrayList<>();
|
|
|
List<AppInstructor> appInstructors = appInstructorMapper.selectList(Wrappers.<AppInstructor>lambdaQuery()
|
|
|
.eq(AppInstructor::getOrgCode, appSite.getOrgCode()));
|
|
@@ -58,19 +56,24 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
}
|
|
|
placeInfo.setInstructorVOList(instructorVOList);
|
|
|
if(appSite.getType() == 0){
|
|
|
- PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
|
|
|
- placeInfoMsgVO.setName(appSite.getName())
|
|
|
- .setSales(getPlaceSales(id))
|
|
|
- .setOriginalPrice(appSitePriceRules.getOriginalPrice())
|
|
|
- .setSellingPrice(appSitePriceRules.getSellingPrice());
|
|
|
- placeInfo.setPlaceInfoMsgVO(placeInfoMsgVO);
|
|
|
+ List<PlaceInfoVO.PlaceInfoMsgVO> placeInfoMsgVOS = new ArrayList<>();
|
|
|
+ appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, id)).forEach(appSitePlace -> {
|
|
|
+ appSitePriceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
+ .eq(AppSitePriceRules::getSitePlaceId, id)
|
|
|
+ .eq(AppSitePriceRules::getStatus, 0)
|
|
|
+ .eq(AppSitePriceRules::getType,0)).forEach(appSitePriceRules -> {
|
|
|
+ PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
|
|
|
+ placeInfoMsgVO.setName(appSite.getName())
|
|
|
+ .setSales(getPlaceSales(id))
|
|
|
+ .setOriginalPrice(appSitePriceRules.getOriginalPrice())
|
|
|
+ .setSellingPrice(appSitePriceRules.getSellingPrice());
|
|
|
+ placeInfoMsgVOS.add(placeInfoMsgVO);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ placeInfo.setPlaceInfoMsgVO(placeInfoMsgVOS);
|
|
|
return placeInfo;
|
|
|
}else if(appSite.getType() == 1){
|
|
|
- PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
|
|
|
- placeInfoMsgVO.setName(appSite.getName())
|
|
|
- .setSales(getPlaceSales(id))
|
|
|
- .setOriginalPrice(appSitePriceRules.getOriginalPrice())
|
|
|
- .setSellingPrice(appSitePriceRules.getSellingPrice());
|
|
|
+ List<PlaceInfoVO.PlaceInfoGymMsgVO> placeInfoMsgVO = appSitePlaceMapper.getPlaceInfoNoFixation(appSite.getId());
|
|
|
placeInfo.setPlaceInfoMsgVO(placeInfoMsgVO);
|
|
|
return placeInfo;
|
|
|
}else {
|