| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesDO; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComMngVaccinesServiceImpl extends ServiceImpl<ComMngVaccinesDAO, ComMngVaccinesDO> implements ComMngVaccinesService { |
| | | public class ComMngVaccinesServiceImpl extends ServiceImpl<ComMngVaccinesDAO, ComMngVaccinesDO> |
| | | implements ComMngVaccinesService { |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesListByApp(){ |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper.selectList(new QueryWrapper<ComMngVaccinesDO>().lambda().eq(ComMngVaccinesDO::getStatus,ComMngVaccinesDO.status.yes)); |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper.selectList( |
| | | new QueryWrapper<ComMngVaccinesDO>().lambda().eq(ComMngVaccinesDO::getStatus, ComMngVaccinesDO.status.yes)); |
| | | List<VaccinesByAppVO> vaccinesList = new ArrayList<>(); |
| | | if(!vaccinesDOList.isEmpty()){ |
| | | vaccinesDOList.forEach(vaccines ->{ |
| | |
| | | |
| | | /** |
| | | * 后台管理-查询疫苗分类列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * |
| | | * @param vaccinesByAdminDTO |
| | | * 请求参数 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesListByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO){ |
| | | return R.ok(this.baseMapper.getVaccinesByName(new Page<ComMngVaccinesDO>(vaccinesByAdminDTO.getPageNum(),vaccinesByAdminDTO.getPageSize()),vaccinesByAdminDTO)); |
| | | return R.ok(this.baseMapper.getVaccinesByName( |
| | | new Page<ComMngVaccinesDO>(vaccinesByAdminDTO.getPageNum(), vaccinesByAdminDTO.getPageSize()), |
| | | vaccinesByAdminDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 修改疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * |
| | | * @param vaccinesByAdminDTO |
| | | * 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 新增疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * |
| | | * @param vaccinesByAdminDTO |
| | | * 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * |
| | | * @param id |
| | | * 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 疫苗分类列表 |
| | | * |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | public R getEnrollTypeListByAdmin(){ |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper.selectList(new QueryWrapper<ComMngVaccinesDO>() |
| | | .lambda().eq(ComMngVaccinesDO::getStatus,1)); |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper |
| | | .selectList(new QueryWrapper<ComMngVaccinesDO>().lambda().eq(ComMngVaccinesDO::getStatus, 1)); |
| | | return R.ok(vaccinesDOList); |
| | | } |
| | | |