| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.vos.community.screen.event.EventListVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ExcelSelectListUtil; |
| | | import com.panzhihua.common.utlis.LngLatUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_grid.dao.*; |
| | |
| | | private EventGridMemberRelationMapper eventGridMemberRelationMapper; |
| | | @Resource |
| | | private EventGridDataService eventGridDataService; |
| | | @Resource |
| | | private EventResourceMapper eventResourceMapper; |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | |
| | | } |
| | | IPage<EventListVO> eventPageList = this.baseMapper.getScreenEventList(new Page(eventListDTO.getPageNum(),eventListDTO.getPageSize()),eventListDTO); |
| | | return R.ok(eventPageList); |
| | | |
| | | @Override |
| | | public List<EventDetailsVO> getUnUploadEvent() { |
| | | List<EventDetailsVO> eventDetailsVOList =new ArrayList<>(); |
| | | List<EventDO> unEventList = baseMapper.selectList( |
| | | new QueryWrapper<EventDO>() |
| | | .eq("upload", false) |
| | | ); |
| | | unEventList.forEach(eventDO -> { |
| | | eventDetailsVOList.add(eventDetails(eventDO.getId()).getData()); |
| | | }); |
| | | return eventDetailsVOList; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateLcUploadFlag(Long id) { |
| | | EventDO event = baseMapper.selectById(id); |
| | | event.setUpload(true); |
| | | baseMapper.updateById(event); |
| | | EventResourceDO eventResourceDO =new EventResourceDO(); |
| | | eventResourceDO.setUpload(true); |
| | | int flag = eventResourceMapper.update(eventResourceDO, new QueryWrapper<EventResourceDO>() |
| | | .eq("ref_id", id)); |
| | | if(flag>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | } |