| | |
| | | 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; |
| | |
| | | articleEntity.setIsTop(isTop); |
| | | Integer releaseStatus = adminAddArticleDto.getReleaseStatus(); |
| | | articleEntity.setReleaseStatus(releaseStatus); |
| | | if(ArticleEntity.RELEASE_STATUS_YES == releaseStatus){ |
| | | articleEntity.setReleaseTime(new Date()); |
| | | } |
| | | String articleDetails = adminAddArticleDto.getArticleDetails(); |
| | | articleEntity.setArticleDetails(articleDetails); |
| | | String uploadFile = adminAddArticleDto.getUploadFile(); |
| | |
| | | } |
| | | Integer releaseStatus = adminUpdateArticleDto.getReleaseStatus(); |
| | | articleEntity.setReleaseStatus(releaseStatus); |
| | | if(ArticleEntity.RELEASE_STATUS_YES == releaseStatus){ |
| | | articleEntity.setReleaseTime(new Date()); |
| | | } |
| | | String articleDetails = adminUpdateArticleDto.getArticleDetails(); |
| | | articleEntity.setArticleDetails(articleDetails); |
| | | String uploadFile = adminUpdateArticleDto.getUploadFile(); |
| | |
| | | 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); |
| | | } |
| | |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_YES); |
| | | articleEntity.setReleaseTime(new Date()); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |
| | | releaseService.releaseArticle(articleEntity.getId()); |
| | |
| | | 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(); |
| | | } |