| package com.dsh.other.service.impl; | 
|   | 
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
| import com.dsh.other.entity.SiteType; | 
| import com.dsh.other.mapper.SiteMapper; | 
| import com.dsh.other.mapper.SiteTypeMapper; | 
| import com.dsh.other.model.BaseVo; | 
| import com.dsh.other.model.dto.siteDto.TSiteDTO; | 
| import com.dsh.other.model.vo.siteVo.ExpireSiteSearchVO; | 
| import com.dsh.other.model.vo.siteVo.SiteSearchVO; | 
| import com.dsh.other.service.ISiteTypeService; | 
| import org.springframework.beans.BeanUtils; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import javax.annotation.Resource; | 
| import java.util.ArrayList; | 
| import java.util.List; | 
|   | 
| /** | 
|  * @author zhibing.pu | 
|  * @date 2023/7/17 10:59 | 
|  */ | 
| @Service | 
| public class SiteTypeServiceImpl extends ServiceImpl<SiteTypeMapper, SiteType> implements ISiteTypeService { | 
|   | 
|     @Resource | 
|     private SiteMapper siteMapper; | 
|   | 
|     /** | 
|      * 获取场地分类 | 
|      * | 
|      * @return | 
|      * @throws Exception | 
|      */ | 
|     @Override | 
|     public List<BaseVo> querySiteType() throws Exception { | 
|         List<SiteType> siteTypes = this.list(new QueryWrapper<SiteType>().eq("state", 1)); | 
|         List<BaseVo> list = new ArrayList<>(); | 
|         for (SiteType siteType : siteTypes) { | 
|             BaseVo baseVo = new BaseVo(); | 
|             BeanUtils.copyProperties(siteType, baseVo); | 
|             list.add(baseVo); | 
|         } | 
|         return list; | 
|     } | 
|   | 
|     @Override | 
|     public List<TSiteDTO> listAll(SiteSearchVO vo) { | 
|         return siteMapper.listAll(vo); | 
|     } | 
|   | 
|     @Override | 
|     public List<TSiteDTO> listExipre(ExpireSiteSearchVO vo) { | 
|   | 
|   | 
|         return siteMapper.listExipre(vo); | 
|     } | 
| } |