| | |
| | | package com.example.jz.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.example.jz.dao.PublicityDao; |
| | | import com.example.jz.modle.PageParam; |
| | | import com.example.jz.modle.dto.PublicityDto; |
| | | import com.example.jz.modle.entity.Publicity; |
| | | import com.example.jz.service.PublicityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 公共宣传表(Publicity)表服务实现类 |
| | |
| | | @Service("publicityService") |
| | | public class PublicityServiceImpl extends ServiceImpl<PublicityDao, Publicity> implements PublicityService { |
| | | |
| | | } |
| | | @Resource |
| | | private PublicityDao publicityDao; |
| | | |
| | | @Override |
| | | public Boolean undercarriage(Serializable id) { |
| | | Publicity publicity = publicityDao.selectById(id); |
| | | publicity.setStatus(2); |
| | | if (publicityDao.updateById(publicity) == 1) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean grounding(Serializable id) { |
| | | Publicity publicity = publicityDao.selectById(id); |
| | | publicity.setStatus(1); |
| | | publicity.setReleaseTime(new Date()); |
| | | if (publicityDao.updateById(publicity) == 1) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PublicityDto> findByPage(PageParam<PublicityDto> page, QueryWrapper<PublicityDto> publicityDtoQueryWrapper) { |
| | | return publicityDao.findByPage(page, publicityDtoQueryWrapper); |
| | | } |
| | | } |