| | |
| | | package com.xcong.farmer.cms.modules.system.service.Impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringPool; |
| | |
| | | long companyId = userlogin.getCompanyId() == null ? UserEntity.USER_BELONG_TOP : userlogin.getCompanyId(); |
| | | Page<AdminArticleVo> page = new Page<>(adminArticleDto.getPageNum(), adminArticleDto.getPageSize()); |
| | | ArticleEntity articleEntity = new ArticleEntity(); |
| | | String columnIdStr = adminArticleDto.getColumnIdStr(); |
| | | if(StrUtil.isNotEmpty(columnIdStr)){ |
| | | long[] columnIdLongs = StrUtil.splitToLong(columnIdStr, StrUtil.COMMA); |
| | | String columnIdStrs = adminArticleDto.getColumnIdStr(); |
| | | if(StrUtil.isNotEmpty(columnIdStrs)){ |
| | | String[] columnIdStr = columnIdStrs.split(StringPool.COMMA); |
| | | List<Long> columnList = new ArrayList<>(); |
| | | for(long columnIdLong : columnIdLongs){ |
| | | columnList.add(columnIdLong); |
| | | for(String columnIdString : columnIdStr){ |
| | | columnList.add(Long.valueOf(columnIdString)); |
| | | } |
| | | articleEntity.setColumnList(columnList); |
| | | } |
| | |
| | | if(UserEntity.USER_BELONG_TOP != companyId){ |
| | | articleEntity.setCompanyId(companyId); |
| | | } |
| | | String timeType = webArticleInPageDto.getTimeType(); |
| | | if(StrUtil.isNotEmpty(timeType)){ |
| | | articleEntity.setTimeType(timeType); |
| | | } |
| | | IPage<WebArticleVo> list = this.baseMapper.selectWebArticleInPage(page,articleEntity); |
| | | return Result.ok(list); |
| | | } |
| | |
| | | Long companyId = 0L; |
| | | if(CollUtil.isNotEmpty(companyEntities)){ |
| | | for(CompanyEntity companyEntity : companyEntities){ |
| | | boolean contains = StrUtil.contains(website, companyEntity.getWebAddress()); |
| | | boolean contains = StrUtil.contains(companyEntity.getWebAddress(), website); |
| | | if(contains){ |
| | | companyId = companyEntity.getId(); |
| | | } |