|
@@ -9,6 +9,8 @@ import org.jeecg.modules.app.vo.CourseInfoVO;
|
|
import org.jeecg.modules.app.vo.PlaceInfoVO;
|
|
import org.jeecg.modules.app.vo.PlaceInfoVO;
|
|
import org.jeecg.modules.system.app.entity.*;
|
|
import org.jeecg.modules.system.app.entity.*;
|
|
import org.jeecg.modules.system.app.mapper.*;
|
|
import org.jeecg.modules.system.app.mapper.*;
|
|
|
|
+import org.jeecg.modules.system.entity.SysUser;
|
|
|
|
+import org.jeecg.modules.system.mapper.SysUserMapper;
|
|
import org.jeecg.modules.system.util.PositionUtil;
|
|
import org.jeecg.modules.system.util.PositionUtil;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -18,8 +20,10 @@ import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.ZoneId;
|
|
import java.time.ZoneId;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+
|
|
@Service
|
|
@Service
|
|
@Log4j2
|
|
@Log4j2
|
|
public class DetailServiceImpl implements IDetailService {
|
|
public class DetailServiceImpl implements IDetailService {
|
|
@@ -39,6 +43,10 @@ public class DetailServiceImpl implements IDetailService {
|
|
private AppOrderMapper appOrderMapper;
|
|
private AppOrderMapper appOrderMapper;
|
|
@Resource
|
|
@Resource
|
|
private AppSitePlaceMapper appSitePlaceMapper;
|
|
private AppSitePlaceMapper appSitePlaceMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private AppCategoryMapper appCategoryMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private SysUserMapper sysUserMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PlaceInfoVO getPlaceInfo(String id) {
|
|
public PlaceInfoVO getPlaceInfo(String id) {
|
|
@@ -50,14 +58,17 @@ public class DetailServiceImpl implements IDetailService {
|
|
if (appInstructors != null) {
|
|
if (appInstructors != null) {
|
|
for (AppInstructor instructor : appInstructors) {
|
|
for (AppInstructor instructor : appInstructors) {
|
|
PlaceInfoVO.InstructorVO vo = new PlaceInfoVO.InstructorVO();
|
|
PlaceInfoVO.InstructorVO vo = new PlaceInfoVO.InstructorVO();
|
|
- BeanUtils.copyProperties(vo, instructor); // 注意参数顺序
|
|
|
|
|
|
+ BeanUtils.copyProperties(instructor,vo); // 注意参数顺序
|
|
|
|
+ SysUser sysUser = sysUserMapper.selectById(instructor.getUserId());
|
|
|
|
+ vo.setName(sysUser.getUsername()).setAvatar(sysUser.getAvatar());
|
|
instructorVOList.add(vo);
|
|
instructorVOList.add(vo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
placeInfo.setInstructorVOList(instructorVOList);
|
|
placeInfo.setInstructorVOList(instructorVOList);
|
|
if(appSite.getType() == 0){
|
|
if(appSite.getType() == 0){
|
|
List<PlaceInfoVO.PlaceInfoMsgVO> placeInfoMsgVOS = new ArrayList<>();
|
|
List<PlaceInfoVO.PlaceInfoMsgVO> placeInfoMsgVOS = new ArrayList<>();
|
|
- appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, id)).forEach(appSitePlace -> {
|
|
|
|
|
|
+ appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, id)
|
|
|
|
+ .eq(AppSitePlace::getType,0)).forEach(appSitePlace -> {
|
|
appSitePriceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
appSitePriceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
.eq(AppSitePriceRules::getSitePlaceId, id)
|
|
.eq(AppSitePriceRules::getSitePlaceId, id)
|
|
.eq(AppSitePriceRules::getStatus, 0)
|
|
.eq(AppSitePriceRules::getStatus, 0)
|
|
@@ -117,6 +128,21 @@ public class DetailServiceImpl implements IDetailService {
|
|
return courseInfoVOList;
|
|
return courseInfoVOList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public PlaceInfoVO.theGymnasiumIsCharteredVO getPlaceInfoNoFixation(String id, String categoryId) {
|
|
|
|
+ AppSitePlace appSitePlace = appSitePlaceMapper.selectOne(Wrappers.<AppSitePlace>lambdaQuery()
|
|
|
|
+ .eq(AppSitePlace::getSiteId, id)
|
|
|
|
+ .eq(AppSitePlace::getStatus, 0)
|
|
|
|
+ .eq(AppSitePlace::getDelFlag, 0)
|
|
|
|
+ .last("LIMIT 1"));
|
|
|
|
+ List<PlaceInfoVO.theGymnasiumIsCharteredInfoVO> collect = appSitePriceRulesMapper.theGymnasiumIsCharteredInfo(appSitePlace.getOrgCode(), categoryId);
|
|
|
|
+ return new PlaceInfoVO.theGymnasiumIsCharteredVO()
|
|
|
|
+ .setCategory(getCategoryName(categoryId))
|
|
|
|
+ .setEarlyRefundTime(appSitePlace.getEarlyRefundTime())
|
|
|
|
+ .setVr(appSiteMapper.selectById(id).getVr())
|
|
|
|
+ .setTimeSlot(collect);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @return
|
|
* @return
|
|
* @Author SheepHy
|
|
* @Author SheepHy
|
|
@@ -190,4 +216,22 @@ public class DetailServiceImpl implements IDetailService {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @Author SheepHy
|
|
|
|
+ * @Description 根据类目ID获取完整的类目名称
|
|
|
|
+ * @Date 13:31 2025/7/7
|
|
|
|
+ * @Param categoryId 类目ID
|
|
|
|
+ * @return List<String>
|
|
|
|
+ **/
|
|
|
|
+ private List<String> getCategoryName(String categoryId) {
|
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
|
+ if(null != categoryId){
|
|
|
|
+ String[] split = categoryId.split(",");
|
|
|
|
+ Arrays.stream(split).forEach(id -> {
|
|
|
|
+ list.add(appCategoryMapper.selectById(id).getName());
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
}
|
|
}
|