From 3ee2822a410e6499a71f36c69621add068d54617 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 14:55:16 +0800 Subject: [PATCH 01/33] =?UTF-8?q?validatorUtils=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/validator/ValidatorUtils.java | 5 ++++- .../com/epmet/openapi/scan/controller/ScanController.java | 3 +++ .../epmet/openapi/scan/service/impl/ScanServiceImpl.java | 1 + .../com/epmet/openapi/scan/support/param/ImgScanParam.java | 4 ++++ .../java/com/epmet/openapi/scan/support/param/ImgTask.java | 3 +++ .../com/epmet/openapi/scan/support/param/TextScanParam.java | 4 ++++ epmet-openapi/epmet-openapi-scan/src/main/resources/readme | 6 ++++-- 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java index c5ae8767a2..e98cc09fe7 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/ValidatorUtils.java @@ -50,7 +50,10 @@ public class ValidatorUtils { List> customerShowGroups = new ArrayList<>(); List> internalGroups = new ArrayList<>(); - + if (groups == null || groups.length ==0){ + validate(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR ,object,groups); + return; + } Arrays.asList(groups).forEach(g -> { if (CustomerClientShowGroup.class.isAssignableFrom(g)) { //如果派生自客户端显示分组,那么会优先校验,并且将错误提示给客户端,返回客户端可见的错误码 diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java index 96848bfc84..efaae3ddd5 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/ScanController.java @@ -1,6 +1,7 @@ package com.epmet.openapi.scan.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.openapi.scan.service.impl.ScanService; import com.epmet.openapi.scan.support.param.ImgScanParam; import com.epmet.openapi.scan.support.param.TextScanParam; @@ -32,6 +33,7 @@ public class ScanController { */ @RequestMapping("imgSyncScan") public Result ImgSyncScan(@RequestBody ImgScanParam param) { + ValidatorUtils.validateEntity(param); Result scanResultResult = scanService.sendSyncImgScan(param); return scanResultResult; } @@ -44,6 +46,7 @@ public class ScanController { */ @RequestMapping("textSyncScan") public Result textSyncScan(@RequestBody TextScanParam param) { + ValidatorUtils.validateEntity(param); Result scanResultResult = scanService.sendTextScan(param); return scanResultResult; } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java index f69824ca14..6848de234f 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java @@ -12,6 +12,7 @@ import com.aliyuncs.green.model.v20180509.TextScanRequest; import com.aliyuncs.http.FormatType; import com.aliyuncs.http.HttpResponse; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.openapi.scan.common.constant.SysConstant; import com.epmet.openapi.scan.common.enu.ImgSceneEnum; import com.epmet.openapi.scan.common.enu.SuggestionEnum; diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgScanParam.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgScanParam.java index 16e38eaa04..82036797e3 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgScanParam.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgScanParam.java @@ -2,6 +2,8 @@ package com.epmet.openapi.scan.support.param; import lombok.Data; +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.util.List; @@ -30,6 +32,8 @@ public class ImgScanParam implements Serializable { * 要检测的内容列表,必填 * remark:一组任务列表中的taskId不能相同 */ + @Valid + @NotEmpty(message = "任务列表不能为空") private List tasks; /** diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgTask.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgTask.java index e06204415f..2ec15a9593 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgTask.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/ImgTask.java @@ -2,6 +2,7 @@ package com.epmet.openapi.scan.support.param; import lombok.Data; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -19,10 +20,12 @@ public class ImgTask implements Serializable { * 要检测的数据id 非必填 * * */ + @NotNull(message = "dataId不能为空") private String dataId; /** * 图片url 必填 */ + @NotNull(message = "图片URL不能为空") private String url; } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/TextScanParam.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/TextScanParam.java index 8a49fd5d2a..16ad063428 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/TextScanParam.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/TextScanParam.java @@ -2,6 +2,8 @@ package com.epmet.openapi.scan.support.param; import lombok.Data; +import javax.validation.Valid; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.util.List; @@ -24,6 +26,8 @@ public class TextScanParam implements Serializable { * * @see com.epmet.openapi.scan.common.enu.ImgSceneEnum; */ + @Valid + @NotEmpty(message = "任务列表不能为空") private List scenes; /** diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/readme b/epmet-openapi/epmet-openapi-scan/src/main/resources/readme index 5b2e138e3e..7cb6399fe1 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/readme +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/readme @@ -1,2 +1,4 @@ -#添加白名单 -sadd epmet:openapi:scan:whitelist "客户端ip地址" \ No newline at end of file +#访问openApi 需要向redis中 添加白名单 +sadd epmet:openapi:scan:whitelist "客户端ip地址" +#eg: +sadd epmet:openapi:scan:whitelist "\"192.168.1.1\"" \ No newline at end of file From 7e7b472f1543999ab8fbe2ae4f751af403e90d9d Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 14:56:00 +0800 Subject: [PATCH 02/33] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java index 5df7bbb79e..6ce851a45e 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/interceptor/ScanApiAuthInterceptor.java @@ -31,7 +31,6 @@ public class ScanApiAuthInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { String ip = IpUtils.getIpAddr(request); - log.info("preHandle requestUrl",request.getRequestURL()); SetOperations setOperations = redisTemplate.opsForSet(); if (!setOperations.isMember(RedisKeys.getWhiteList(), ip)) { log.warn("preHandle ip:{} is not in whitelist", ip); From 98875552af14ceb2bf4886045e20f33aa01a3ff6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 12 Jun 2020 17:29:32 +0800 Subject: [PATCH 03/33] =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ArticleServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index fd2b02e4e5..590ff82d6f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -620,7 +620,11 @@ public class ArticleServiceImpl extends BaseServiceImpl gridList = new HashSet<>(); + if (null != userInfo.getGridIdList()) { + gridList = userInfo.getGridIdList(); + } + resultList = baseDao.selectArticleListForGrid(tokenDto.getCustomerId(), formDTO.getTagIdList(), gridList); } resultList.forEach(result -> { String tags = result.getTags(); From e572285a15afcefe30ed1fcf9f375813b1c9ffed Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 23:12:45 +0800 Subject: [PATCH 04/33] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/StrConstant.java | 5 + .../tools/exception/EpmetErrorCode.java | 2 + .../com/epmet/dto/form/DraftAttrFromDTO.java | 6 +- .../epmet/dto/form/DraftContentFromDTO.java | 4 +- .../service/impl/ArticleServiceImpl.java | 93 ++++++++----------- .../java/com/epmet/utils/ModuleConstant.java | 35 ++++++- 6 files changed, 84 insertions(+), 61 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 83801407f0..b4a81ce53a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -43,4 +43,9 @@ public interface StrConstant { * 冒号 */ String COLON = ":"; + + /** + * 中文顿号 + */ + String COMMA_ZH = "、"; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 0df23a82f1..04aabbf38f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -67,6 +67,8 @@ public enum EpmetErrorCode { OPER_UPLOAD_FILE_OVER_SIZE(8707, "文件体积过大"), OPER_UPLOAD_FILE_TYPE_ERROR(8708, "文件类型错误"), + // 党建声音 前端提示 88段 + DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), ARTICLE_PUBLISH_ERROR(8801, "发布文章失败,请刷新重试"), CUSTOMER_VALIDATE_ERROR(8999, "内部数据校验异常"); diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.java index 1a81faee29..6d4b81cc2a 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.java @@ -20,6 +20,7 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.List; @@ -34,7 +35,6 @@ import java.util.List; @Data public class DraftAttrFromDTO implements Serializable { - private static final long serialVersionUID = 6463906402283515172L; /** * 草稿ID @@ -61,11 +61,13 @@ public class DraftAttrFromDTO implements Serializable { /** * 网格Id数组 */ + @NotEmpty(message = "发布范围不能为空") private List gridIdList; /** * 发布单位Id 类型不同 id含义不同 */ + @NotBlank(message = "发布单位不能为空") private String publisher; /** @@ -76,7 +78,7 @@ public class DraftAttrFromDTO implements Serializable { /** * 发布日期 */ - @NotBlank(message = "发布日期不能为空") + @NotBlank(message = "发布时间不能为空") private String publishDate; /** diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java index c1f615a4b0..2c82e28b06 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java @@ -44,13 +44,13 @@ public class DraftContentFromDTO implements Serializable { /** * 文章标题 */ - @NotBlank(message = "文章标题不能为空") + @NotBlank(message = "请输入标题") private String title; /** * 内容列表 */ - @NotEmpty(message = "文章内容不能为空") + @NotEmpty(message = "至少添加一个段落") private List contentList; @Data diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 590ff82d6f..e6132615c1 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -56,6 +56,7 @@ import com.epmet.service.*; import com.epmet.utils.ModuleConstant; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.sun.javafx.binding.StringConstant; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jsoup.helper.StringUtil; @@ -67,6 +68,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import javax.swing.text.StringContent; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; @@ -173,12 +175,6 @@ public class ArticleServiceImpl extends BaseServiceImpl loginUserDetails = epmetUserOpenFeignClient.getLoginUserDetails(detailsFormDTO); if (loginUserDetails == null || loginUserDetails.getData() == null) { log.warn("saveOrUpdateContent getloginUserDetails return null"); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), ModuleConstant.GET_USER_DETAIL_ERROR); } draftEntity = new DraftEntity(); draftEntity.setTitle(fromDTO.getTitle()); @@ -287,23 +283,18 @@ public class ArticleServiceImpl extends BaseServiceImpl 1 || fromDTO.getIsTop() < 0) { + throw new RenException(ModuleConstant.DRAFT_IS_TOP_ERROR); } - if (StringUtils.isBlank(fromDTO.getPublishDate())) { - log.warn("saveOrUpdateAttr publishDate is blank"); - throw new RenException("发布时间不能为空"); + if ( fromDTO.getPublisherType() != DraftConstant.AGENCY && fromDTO.getPublisherType() != DraftConstant.DEPARTMENT + &&fromDTO.getPublisherType() != DraftConstant.GRID) { + throw new RenException(ModuleConstant.DRAFT_PUBLISHER_TYPE_ERROR); } return saveDraftAttr(tokenDto, fromDTO); } @@ -361,7 +350,7 @@ public class ArticleServiceImpl extends BaseServiceImpl { if (gridIdList.contains(grid.getGridId())) { - String agencyGridName = articleGridResultDTO.getAgencyName().concat("-").concat(grid.getGridName()); + String agencyGridName = articleGridResultDTO.getAgencyName().concat(StrConstant.HYPHEN).concat(grid.getGridName()); agencyGridNameList.add(agencyGridName); DraftPublishRangeEntity draftPublishRangeEntity = new DraftPublishRangeEntity(); draftPublishRangeEntity.setCustomerId(tokenDto.getCustomerId()); @@ -471,19 +460,17 @@ public class ArticleServiceImpl extends BaseServiceImpl newContentList = new ArrayList<>(); - for (int i = 0; i < contentList.size(); i++) { + for (int i = NumConstant.ZERO; i < contentList.size(); i++) { DraftContentFromDTO.DraftContentDTO content = contentList.get(i); DraftContentEntity entity = ConvertUtils.sourceToTarget(content, DraftContentEntity.class); entity.setId(content.getDraftContentId()); entity.setCustomerId(tokenDto.getCustomerId()); entity.setDraftId(fromDTO.getDraftId()); - entity.setOrderNum(i + 1); - //默认通过 + entity.setOrderNum(i + NumConstant.ONE); + //默认为空 entity.setAuditStatus(""); newContentList.add(entity); } - - return newContentList; } @@ -543,16 +530,16 @@ public class ArticleServiceImpl extends BaseServiceImpl { - publishRangeDesc.append(publishRangeDesc.length() > NumConstant.ZERO ? "、" : ""); + publishRangeDesc.append(publishRangeDesc.length() > NumConstant.ZERO ? StrConstant.COMMA_ZH : ""); publishRangeDesc.append(range.getAgencyGridName()); }); } else { publishedList.forEach(pub -> { - publishRangeDesc.append(publishRangeDesc.length() > NumConstant.ZERO ? "、" : ""); + publishRangeDesc.append(publishRangeDesc.length() > NumConstant.ZERO ? StrConstant.COMMA_ZH : ""); publishRangeDesc.append(pub.getAgencyGridName()); }); } @@ -566,7 +553,7 @@ public class ArticleServiceImpl extends BaseServiceImpl { - offLineRangeDesc.append(offLineRangeDesc.length() > NumConstant.ZERO ? "、" : ""); + offLineRangeDesc.append(offLineRangeDesc.length() > NumConstant.ZERO ? StrConstant.COMMA_ZH : ""); offLineRangeDesc.append(off.getAgencyGridName()); }); content = String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle(), offLineRangeDesc); @@ -721,9 +708,9 @@ public class ArticleServiceImpl extends BaseServiceImpl= NumConstant.ZERO; i--) { //遍历到当前人员所属组织的上一级组织时停止遍历 @@ -742,7 +729,7 @@ public class ArticleServiceImpl extends BaseServiceImpl gridList = new ArrayList<>(); AgencyGridListResultDTO gridDto = new AgencyGridListResultDTO(); gridDto.setGridId(range.getGridId()); - gridDto.setGridName(range.getAgencyGridName().substring(range.getAgencyGridName().lastIndexOf("-") + NumConstant.ONE)); + gridDto.setGridName(range.getAgencyGridName().substring(range.getAgencyGridName().lastIndexOf(StrConstant.HYPHEN) + NumConstant.ONE)); gridList.add(gridDto); dto.setGridList(gridList); } @@ -753,7 +740,7 @@ public class ArticleServiceImpl extends BaseServiceImpl gridList = dto1.getGridList(); AgencyGridListResultDTO gridDto = new AgencyGridListResultDTO(); gridDto.setGridId(range.getGridId()); - gridDto.setGridName(range.getAgencyGridName().substring(range.getAgencyGridName().lastIndexOf("-") + NumConstant.ONE)); + gridDto.setGridName(range.getAgencyGridName().substring(range.getAgencyGridName().lastIndexOf(StrConstant.HYPHEN) + NumConstant.ONE)); gridList.add(gridDto); dto1.setGridList(gridList); map.put(pids[i], dto1); @@ -1099,11 +1086,11 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Fri, 12 Jun 2020 23:19:20 +0800 Subject: [PATCH 05/33] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=92=8C=E5=86=85=E5=AE=B9=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/DraftContentFromDTO.java | 10 +++++----- .../src/test/java/com/epmet/ArticleServiceTest.java | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java index 2c82e28b06..7df78525c0 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java @@ -18,7 +18,9 @@ package com.epmet.dto.form; import lombok.Data; +import org.hibernate.validator.constraints.Length; +import javax.validation.Valid; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import java.io.Serializable; @@ -45,12 +47,14 @@ public class DraftContentFromDTO implements Serializable { * 文章标题 */ @NotBlank(message = "请输入标题") + @Length(max = 50, message = "标题最长为50个字") private String title; /** * 内容列表 */ @NotEmpty(message = "至少添加一个段落") + @Valid private List contentList; @Data @@ -65,16 +69,12 @@ public class DraftContentFromDTO implements Serializable { /** * 内容 */ + @Length(max = 1000, message = "每段文字最长为1000个字") private String content; /** * 内容类型 图片:img;文字:text */ private String contentType; - - /** - * 内容顺序 从1开始 - */ - private Integer orderNum; } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/test/java/com/epmet/ArticleServiceTest.java b/epmet-module/gov-voice/gov-voice-server/src/test/java/com/epmet/ArticleServiceTest.java index 9b184a2f7a..a0d19d9423 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/test/java/com/epmet/ArticleServiceTest.java +++ b/epmet-module/gov-voice/gov-voice-server/src/test/java/com/epmet/ArticleServiceTest.java @@ -38,7 +38,6 @@ public class ArticleServiceTest { contentDTO.setDraftContentId(""); contentDTO.setContent("内容"+i); contentDTO.setContentType("text"); - contentDTO.setOrderNum(1+i); list.add(contentDTO); } draftContentFromDTO.setContentList(list); From 12fe519d578f846f46877895f0670b35784f790d Mon Sep 17 00:00:00 2001 From: = Date: Sun, 14 Jun 2020 11:24:47 +0800 Subject: [PATCH 06/33] =?UTF-8?q?=E5=88=A0=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ArticleContentController.java | 94 ------------------- .../controller/ArticleCoverController.java | 94 ------------------- .../ArticleOperateRecordController.java | 94 ------------------- .../ArticlePublishRangeController.java | 94 ------------------- .../controller/ArticleTagsController.java | 94 ------------------- .../ArticleVisitRecordController.java | 94 ------------------- .../controller/DraftContentController.java | 94 ------------------- .../com/epmet/controller/DraftController.java | 57 +---------- .../controller/DraftCoverController.java | 94 ------------------- .../DraftPublishRangeController.java | 94 ------------------- .../controller/TagCustomerController.java | 94 ------------------- .../controller/TagDefaultController.java | 94 ------------------- .../epmet/controller/TagGridController.java | 94 ------------------- 13 files changed, 4 insertions(+), 1181 deletions(-) delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleContentController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleCoverController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleOperateRecordController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticlePublishRangeController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleTagsController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleVisitRecordController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftCoverController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftPublishRangeController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagCustomerController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagDefaultController.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagGridController.java diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleContentController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleContentController.java deleted file mode 100644 index 4edca1a60d..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleContentController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticleContentDTO; -import com.epmet.excel.ArticleContentExcel; -import com.epmet.service.ArticleContentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章内容表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articlecontent") -public class ArticleContentController { - - @Autowired - private ArticleContentService articleContentService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articleContentService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticleContentDTO data = articleContentService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticleContentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articleContentService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticleContentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articleContentService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articleContentService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articleContentService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticleContentExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleCoverController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleCoverController.java deleted file mode 100644 index 5f84494bab..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleCoverController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticleCoverDTO; -import com.epmet.excel.ArticleCoverExcel; -import com.epmet.service.ArticleCoverService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章封面表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articlecover") -public class ArticleCoverController { - - @Autowired - private ArticleCoverService articleCoverService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articleCoverService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticleCoverDTO data = articleCoverService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticleCoverDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articleCoverService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticleCoverDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articleCoverService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articleCoverService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articleCoverService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticleCoverExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleOperateRecordController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleOperateRecordController.java deleted file mode 100644 index 3fd7dbfeeb..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleOperateRecordController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticleOperateRecordDTO; -import com.epmet.excel.ArticleOperateRecordExcel; -import com.epmet.service.ArticleOperateRecordService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章操作记录表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articleoperaterecord") -public class ArticleOperateRecordController { - - @Autowired - private ArticleOperateRecordService articleOperateRecordService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articleOperateRecordService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticleOperateRecordDTO data = articleOperateRecordService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticleOperateRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articleOperateRecordService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticleOperateRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articleOperateRecordService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articleOperateRecordService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articleOperateRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticleOperateRecordExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticlePublishRangeController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticlePublishRangeController.java deleted file mode 100644 index e075ec871a..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticlePublishRangeController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticlePublishRangeDTO; -import com.epmet.excel.ArticlePublishRangeExcel; -import com.epmet.service.ArticlePublishRangeService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章发布范围表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articlepublishrange") -public class ArticlePublishRangeController { - - @Autowired - private ArticlePublishRangeService articlePublishRangeService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articlePublishRangeService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticlePublishRangeDTO data = articlePublishRangeService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticlePublishRangeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articlePublishRangeService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticlePublishRangeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articlePublishRangeService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articlePublishRangeService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articlePublishRangeService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticlePublishRangeExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleTagsController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleTagsController.java deleted file mode 100644 index deccf70345..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleTagsController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticleTagsDTO; -import com.epmet.excel.ArticleTagsExcel; -import com.epmet.service.ArticleTagsService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articletags") -public class ArticleTagsController { - - @Autowired - private ArticleTagsService articleTagsService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articleTagsService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticleTagsDTO data = articleTagsService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticleTagsDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articleTagsService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticleTagsDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articleTagsService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articleTagsService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articleTagsService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticleTagsExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleVisitRecordController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleVisitRecordController.java deleted file mode 100644 index 8d3bfa3859..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleVisitRecordController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.ArticleVisitRecordDTO; -import com.epmet.excel.ArticleVisitRecordExcel; -import com.epmet.service.ArticleVisitRecordService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 文章访问记录表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("articlevisitrecord") -public class ArticleVisitRecordController { - - @Autowired - private ArticleVisitRecordService articleVisitRecordService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = articleVisitRecordService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - ArticleVisitRecordDTO data = articleVisitRecordService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody ArticleVisitRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - articleVisitRecordService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody ArticleVisitRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - articleVisitRecordService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - articleVisitRecordService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = articleVisitRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ArticleVisitRecordExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java deleted file mode 100644 index 82243e0e48..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.DraftContentDTO; -import com.epmet.excel.DraftContentExcel; -import com.epmet.service.DraftContentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 草稿内容表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("draftcontent") -public class DraftContentController { - - @Autowired - private DraftContentService draftContentService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = draftContentService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - DraftContentDTO data = draftContentService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody DraftContentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - draftContentService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody DraftContentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - draftContentService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - draftContentService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = draftContentService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, DraftContentExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java index 89acd7d3d2..2a9837723f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java @@ -20,27 +20,20 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.enums.RequirePermissionEnum; -import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.DraftDTO; import com.epmet.dto.form.DeleteDraftFormDTO; import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.DraftListResultDTO; -import com.epmet.excel.DraftExcel; import com.epmet.service.DraftService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** @@ -56,48 +49,6 @@ public class DraftController { @Autowired private DraftService draftService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = draftService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - DraftDTO data = draftService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody DraftDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - draftService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody DraftDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - draftService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - draftService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = draftService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, DraftExcel.class); - } - /** * @param formDTO * @return com.epmet.commons.tools.utils.Result diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftCoverController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftCoverController.java deleted file mode 100644 index e4606661bb..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftCoverController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.DraftCoverDTO; -import com.epmet.excel.DraftCoverExcel; -import com.epmet.service.DraftCoverService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 草稿封面表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("draftcover") -public class DraftCoverController { - - @Autowired - private DraftCoverService draftCoverService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = draftCoverService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - DraftCoverDTO data = draftCoverService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody DraftCoverDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - draftCoverService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody DraftCoverDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - draftCoverService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - draftCoverService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = draftCoverService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, DraftCoverExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftPublishRangeController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftPublishRangeController.java deleted file mode 100644 index a17d349e66..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftPublishRangeController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.DraftPublishRangeDTO; -import com.epmet.excel.DraftPublishRangeExcel; -import com.epmet.service.DraftPublishRangeService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 草稿发布范围表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("draftpublishrange") -public class DraftPublishRangeController { - - @Autowired - private DraftPublishRangeService draftPublishRangeService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = draftPublishRangeService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - DraftPublishRangeDTO data = draftPublishRangeService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody DraftPublishRangeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - draftPublishRangeService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody DraftPublishRangeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - draftPublishRangeService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - draftPublishRangeService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = draftPublishRangeService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, DraftPublishRangeExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagCustomerController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagCustomerController.java deleted file mode 100644 index 9e358543c1..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagCustomerController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.TagCustomerDTO; -import com.epmet.excel.TagCustomerExcel; -import com.epmet.service.TagCustomerService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 客户标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("tagcustomer") -public class TagCustomerController { - - @Autowired - private TagCustomerService tagCustomerService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = tagCustomerService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - TagCustomerDTO data = tagCustomerService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody TagCustomerDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - tagCustomerService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody TagCustomerDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - tagCustomerService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - tagCustomerService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = tagCustomerService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, TagCustomerExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagDefaultController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagDefaultController.java deleted file mode 100644 index 4983388eea..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagDefaultController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.TagDefaultDTO; -import com.epmet.excel.TagDefaultExcel; -import com.epmet.service.TagDefaultService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 默认标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("tagdefault") -public class TagDefaultController { - - @Autowired - private TagDefaultService tagDefaultService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = tagDefaultService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - TagDefaultDTO data = tagDefaultService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody TagDefaultDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - tagDefaultService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody TagDefaultDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - tagDefaultService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - tagDefaultService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = tagDefaultService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, TagDefaultExcel.class); - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagGridController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagGridController.java deleted file mode 100644 index eb51f03d87..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagGridController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.controller; - -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.TagGridDTO; -import com.epmet.excel.TagGridExcel; -import com.epmet.service.TagGridService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - - -/** - * 网格标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@RestController -@RequestMapping("taggrid") -public class TagGridController { - - @Autowired - private TagGridService tagGridService; - - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = tagGridService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - TagGridDTO data = tagGridService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody TagGridDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - tagGridService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody TagGridDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - tagGridService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - tagGridService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = tagGridService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, TagGridExcel.class); - } - -} \ No newline at end of file From 0b07c26c3dd8d1bb255552c70063f56a9b85c75b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 15 Jun 2020 09:04:43 +0800 Subject: [PATCH 07/33] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-voice/gov-voice-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index b21cefd377..edf28f3cd9 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.41 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.42 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 5de52c225b..272df9acb0 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.41 + 0.3.42 gov-voice com.epmet From 99edea7a2b3605a3feecb73e61a094faf5abee9a Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 15 Jun 2020 09:31:54 +0800 Subject: [PATCH 08/33] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ArticleServiceImpl.java | 388 +++++++++--------- 1 file changed, 195 insertions(+), 193 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index e6132615c1..2b2005512f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -56,7 +56,6 @@ import com.epmet.service.*; import com.epmet.utils.ModuleConstant; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.sun.javafx.binding.StringConstant; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jsoup.helper.StringUtil; @@ -68,7 +67,6 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.swing.text.StringContent; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; @@ -136,8 +134,8 @@ public class ArticleServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getAgencyGridList(tokenDTO.getUserId()); - if(!result.success()){ + if (!result.success()) { throw new RenException(result.getInternalMsg()); } return result.getData(); } - /** - * @param tokenDTO - * @return - * @Author sun - * @Description 党建声音-政府端-可选发布单位 - **/ - @Override - public PublishAgencyListResultDTO publishAgencyList(TokenDto tokenDTO) { - Result result = govOrgOpenFeignClient.getPublishAgencyList(tokenDTO.getUserId()); - if(!result.success()){ + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布单位 + **/ + @Override + public PublishAgencyListResultDTO publishAgencyList(TokenDto tokenDTO) { + Result result = govOrgOpenFeignClient.getPublishAgencyList(tokenDTO.getUserId()); + if (!result.success()) { throw new RenException(result.getInternalMsg()); } - return result.getData(); - } + return result.getData(); + } @Override @Transactional(rollbackFor = Exception.class) @@ -222,10 +220,10 @@ public class ArticleServiceImpl extends BaseServiceImpl articleContentList = baseDao.queryGovArticleContent(articleId); - if(null!=articleContentList&&articleContentList.size()>0){ + if (null != articleContentList && articleContentList.size() > 0) { articleDetail.setArticleContentList(articleContentList); - }else{ + } else { articleDetail.setArticleContentList(new ArrayList<>()); } - if (StringUtils.isNoneBlank(articleDetail.getTags())) { - String[] tagNames = articleDetail.getTags().split("\\|"); - articleDetail.setTagNameList(tagNames); - }else{ + if (StringUtils.isNoneBlank(articleDetail.getTags())) { + String[] tagNames = articleDetail.getTags().split("\\|"); + articleDetail.setTagNameList(tagNames); + } else { articleDetail.setTagNameList(new String[0]); } - ArticleEntity articleEntity=this.baseDao.selectById(articleId); + ArticleEntity articleEntity = this.baseDao.selectById(articleId); log.info(String.format("当前文章id%s,发布人id%s,当前用户id%s", articleId, articleEntity.getCreatedBy(), loginUserUtil.getLoginUserId())); - if(articleEntity.getCreatedBy().equals(loginUserUtil.getLoginUserId())){ + if (articleEntity.getCreatedBy().equals(loginUserUtil.getLoginUserId())) { articleDetail.setIsMePublished(true); - }else{ + } else { articleDetail.setIsMePublished(false); } } @@ -268,7 +266,7 @@ public class ArticleServiceImpl extends BaseServiceImpl publishRangeEntityList = buildDraftPublishRange(draftEntity,tokenDto, fromDTO); + List publishRangeEntityList = buildDraftPublishRange(draftEntity, tokenDto, fromDTO); executeSaveDraftAttr(draftEntity, coverEntity, publishRangeEntityList); @@ -309,16 +307,16 @@ public class ArticleServiceImpl extends BaseServiceImpl publishRangeEntityList) { - Map draftIdMap = new HashMap<>(); + Map draftIdMap = new HashMap<>(); //物理删除 draftCoverDao.deleteByDraftId(draftEntity.getId()); - if (coverEntity != null){ + if (coverEntity != null) { draftCoverDao.insert(coverEntity); } //物理删除 draftPublishRangeDao.deleteByDraftId(draftEntity.getId()); - if (!CollectionUtils.isEmpty(publishRangeEntityList)){ - publishRangeEntityList.forEach(publishRange->draftPublishRangeDao.insert(publishRange)); + if (!CollectionUtils.isEmpty(publishRangeEntityList)) { + publishRangeEntityList.forEach(publishRange -> draftPublishRangeDao.insert(publishRange)); } draftDao.updateById(draftEntity); } private List buildDraftPublishRange(DraftEntity draftEntity, TokenDto tokenDto, DraftAttrFromDTO fromDTO) { - if (CollectionUtils.isEmpty(fromDTO.getGridIdList())){ - return null; - } + if (CollectionUtils.isEmpty(fromDTO.getGridIdList())) { + return null; + } List publishRangeEntityList = new ArrayList<>(); List agencyGridNameList = new ArrayList<>(); @@ -386,15 +384,15 @@ public class ArticleServiceImpl extends BaseServiceImpl agencyGridNameList, List publishRangeEntityList, DraftAttrFromDTO fromDTO, ArticleGridResultDTO articleGridResultDTO) { articleGridResultDTO.getSubAgencyGridList().forEach(subAgencyGrid -> { - buildName(tokenDto,agencyGridNameList, publishRangeEntityList,fromDTO, subAgencyGrid); + buildName(tokenDto, agencyGridNameList, publishRangeEntityList, fromDTO, subAgencyGrid); }); if (!CollectionUtils.isEmpty(articleGridResultDTO.getSubAgencyGridList())) { articleGridResultDTO.getSubAgencyGridList().forEach(subAgencyGrid -> { @@ -422,7 +420,7 @@ public class ArticleServiceImpl extends BaseServiceImpl agencyGridNameList, List publishRangeEntityList, DraftAttrFromDTO fromDTO, ArticleGridResultDTO articleGridResultDTO) { List gridIdList = fromDTO.getGridIdList(); List gridList = articleGridResultDTO.getGridList(); - if (!CollectionUtils.isEmpty(gridList)&&!CollectionUtils.isEmpty(gridIdList)) { + if (!CollectionUtils.isEmpty(gridList) && !CollectionUtils.isEmpty(gridIdList)) { gridList.forEach(grid -> { if (gridIdList.contains(grid.getGridId())) { String agencyGridName = articleGridResultDTO.getAgencyName().concat(StrConstant.HYPHEN).concat(grid.getGridName()); @@ -483,14 +481,14 @@ public class ArticleServiceImpl extends BaseServiceImpl { - offLineRangeDesc.append(offLineRangeDesc.length() > NumConstant.ZERO ? StrConstant.COMMA_ZH : ""); - offLineRangeDesc.append(off.getAgencyGridName()); - }); - content = String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle(), offLineRangeDesc); - } - recordEntity.setContent(content); + //下线文案,分为全部下线和部分下线 + String content = ""; + if (null == publishedList || publishedList.size() < NumConstant.ONE) { + content = String.format(ArticleConstant.OFF_LINE_ALL_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle()); + } else { + StringBuffer offLineRangeDesc = new StringBuffer(); + offLineList.forEach(off -> { + offLineRangeDesc.append(offLineRangeDesc.length() > NumConstant.ZERO ? StrConstant.COMMA_ZH : ""); + offLineRangeDesc.append(off.getAgencyGridName()); + }); + content = String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle(), offLineRangeDesc); + } + recordEntity.setContent(content); recordEntity.setOpType(ArticleConstant.OFFLINE); recordEntity.setOpTime(date); articleOperateRecordService.insert(recordEntity); @@ -582,7 +580,7 @@ public class ArticleServiceImpl extends BaseServiceImpl resultList; List roles = epmetUserOpenFeignClient.getStaffRoles(tokenDto.getUserId()).getData(); LoginUserDetailsFormDTO loginUserDetailsFormDTO = new LoginUserDetailsFormDTO(); @@ -616,7 +614,7 @@ public class ArticleServiceImpl extends BaseServiceImpl { String tags = result.getTags(); List tagList = new ArrayList<>(); - tagList= Arrays.asList(tags.split("[|]")); + tagList = Arrays.asList(tags.split("[|]")); result.setTagNameList(tagList); }); PageInfo pageInfo = new PageInfo<>(resultList); @@ -625,7 +623,7 @@ public class ArticleServiceImpl extends BaseServiceImpl(resultList, pageInfo.getTotal()); } - /** - * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 - * @param commonArticleListFormDTO :: getGridId :: getNum - * @return List - * @author wangc - * @date 2020.06.02 16:13 - **/ - @Override - public List getTopArticleList(CommonArticleListFormDTO commonArticleListFormDTO) { - return baseDao.selectTopArticleMsg(commonArticleListFormDTO.getGridId(), - null == commonArticleListFormDTO.getNum() || commonArticleListFormDTO.getNum() <= NumConstant.ZERO ? - NumConstant.THREE : commonArticleListFormDTO.getNum()); - } - - /** - * @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 - * @param commonArticleListFormDTO :: getGridId :: getNum - * @return List - * @author wangc - * @date 2020.06.03 09:53 - **/ - @Override - public List getLatestArticleList(CommonArticleListFormDTO commonArticleListFormDTO) { - return baseDao.selectLatestArticleMsg(commonArticleListFormDTO.getGridId(), - null == commonArticleListFormDTO.getNum() || commonArticleListFormDTO.getNum() <= NumConstant.ZERO ? - NumConstant.FIVE : commonArticleListFormDTO.getNum()); - } - - /** - * @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 - * @param articlePageFormDTO - * @return List - * @author wangc - * @date 2020.06.03 14:19 - **/ - @Override - public List getArticleList(ArticlePageFormDTO articlePageFormDTO) { - PageHelper.startPage(articlePageFormDTO.getPageNo(),articlePageFormDTO.getPageSize()); - return baseDao.selectArticleList(articlePageFormDTO.getGridId(),articlePageFormDTO.getTagIdList()); - } + /** + * @param commonArticleListFormDTO :: getGridId :: getNum + * @return List + * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 + * @author wangc + * @date 2020.06.02 16:13 + **/ + @Override + public List getTopArticleList(CommonArticleListFormDTO commonArticleListFormDTO) { + return baseDao.selectTopArticleMsg(commonArticleListFormDTO.getGridId(), + null == commonArticleListFormDTO.getNum() || commonArticleListFormDTO.getNum() <= NumConstant.ZERO ? + NumConstant.THREE : commonArticleListFormDTO.getNum()); + } + + /** + * @param commonArticleListFormDTO :: getGridId :: getNum + * @return List + * @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 + * @author wangc + * @date 2020.06.03 09:53 + **/ + @Override + public List getLatestArticleList(CommonArticleListFormDTO commonArticleListFormDTO) { + return baseDao.selectLatestArticleMsg(commonArticleListFormDTO.getGridId(), + null == commonArticleListFormDTO.getNum() || commonArticleListFormDTO.getNum() <= NumConstant.ZERO ? + NumConstant.FIVE : commonArticleListFormDTO.getNum()); + } + + /** + * @param articlePageFormDTO + * @return List + * @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 + * @author wangc + * @date 2020.06.03 14:19 + **/ + @Override + public List getArticleList(ArticlePageFormDTO articlePageFormDTO) { + PageHelper.startPage(articlePageFormDTO.getPageNo(), articlePageFormDTO.getPageSize()); + return baseDao.selectArticleList(articlePageFormDTO.getGridId(), articlePageFormDTO.getTagIdList()); + } /** * @param formDTO @@ -700,7 +698,7 @@ public class ArticleServiceImpl extends BaseServiceImpl resultDTOResult = epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO); - String agencyId = resultDTOResult.getData().getOrgIdPath().substring(resultDTOResult.getData().getOrgIdPath().lastIndexOf(":")+NumConstant.ONE); + String agencyId = resultDTOResult.getData().getOrgIdPath().substring(resultDTOResult.getData().getOrgIdPath().lastIndexOf(":") + NumConstant.ONE); //存放树的每一个节点对象,用于将同一节点下的网格列表合并(主键:agencyId 值:节点对象) Map map = new HashMap<>(); //3:循环可下线网格列表,根据pids组织每一个树节点对象信息 @@ -753,6 +751,7 @@ public class ArticleServiceImpl extends BaseServiceImpl list = agencyGridListToTree(resultDTOList); return list.get(NumConstant.ZERO); } + /** * @Author sun * @Description 可下线网格列表-将list转为Tree结构 @@ -790,6 +789,7 @@ public class ArticleServiceImpl extends BaseServiceImpl params = new HashMap<>(); - params.put(ModuleConstant.FIELD_GRID_ID_CAMEL,articleDetailFormDTO.getGridId()); - params.put(ModuleConstant.FIELD_USER_ID_CAMEL,articleDetailFormDTO.getUserId()); - params.put(ModuleConstant.FIELD_ARTICLE_ID_CAMEL,articleDetailFormDTO.getArticleId()); - params.put(ModuleConstant.FIELD_CUSTOMER_ID_CAMEL,articleInfo.getCustomerId()); - params.put(FieldConstant.DEL_FLAG_HUMP,NumConstant.ZERO_STR); + Map params = new HashMap<>(); + params.put(ModuleConstant.FIELD_GRID_ID_CAMEL, articleDetailFormDTO.getGridId()); + params.put(ModuleConstant.FIELD_USER_ID_CAMEL, articleDetailFormDTO.getUserId()); + params.put(ModuleConstant.FIELD_ARTICLE_ID_CAMEL, articleDetailFormDTO.getArticleId()); + params.put(ModuleConstant.FIELD_CUSTOMER_ID_CAMEL, articleInfo.getCustomerId()); + params.put(FieldConstant.DEL_FLAG_HUMP, NumConstant.ZERO_STR); List existedVisitRecord = articleVisitRecordService.list(params); //3.没有则插入 - if(null == existedVisitRecord || existedVisitRecord.size() < NumConstant.ONE){ + if (null == existedVisitRecord || existedVisitRecord.size() < NumConstant.ONE) { ArticleVisitRecordEntity recordToInsert = new ArticleVisitRecordEntity(); recordToInsert.setArticleId(articleDetailFormDTO.getArticleId()); recordToInsert.setGridId(articleDetailFormDTO.getGridId()); @@ -856,9 +856,9 @@ public class ArticleServiceImpl extends BaseServiceImpl draftContents = draftContentDao.selectByDraftId(draftId,null); - DraftCoverEntity draftCover = draftCoverDao.selectByDraftId(draftId,null); + List draftContents = draftContentDao.selectByDraftId(draftId, null); + DraftCoverEntity draftCover = draftCoverDao.selectByDraftId(draftId, null); List draftPublishRange = draftPublishRangeDao.selectByDraftId(draftId); //3.生成文章以及相关记录 - ArticleEntity article = ConvertUtils.sourceToTarget(draft,ArticleEntity.class); + ArticleEntity article = ConvertUtils.sourceToTarget(draft, ArticleEntity.class); article.setId(null); article.setDraftId(draftId); article.setStatusFlag(DraftConstant.PUBLISHED); baseDao.insert(article); - if(null != draftContents && draftContents.size() > NumConstant.ZERO){ + if (null != draftContents && draftContents.size() > NumConstant.ZERO) { draftContents.forEach(content -> { content.setOrderNum(content.getOrderNum()); - ArticleContentEntity contentToInsert = ConvertUtils.sourceToTarget(content,ArticleContentEntity.class); + ArticleContentEntity contentToInsert = ConvertUtils.sourceToTarget(content, ArticleContentEntity.class); contentToInsert.setArticleId(article.getId()); contentToInsert.setId(null); articleContentDao.insert(contentToInsert); }); } - if(null != draftPublishRange && draftPublishRange.size() > NumConstant.ZERO){ + if (null != draftPublishRange && draftPublishRange.size() > NumConstant.ZERO) { draftPublishRange.forEach(range -> { range.setPublishStatus(DraftConstant.PUBLISHED); - ArticlePublishRangeEntity rangeToInsert = ConvertUtils.sourceToTarget(range,ArticlePublishRangeEntity.class); + ArticlePublishRangeEntity rangeToInsert = ConvertUtils.sourceToTarget(range, ArticlePublishRangeEntity.class); rangeToInsert.setArticleId(article.getId()); rangeToInsert.setId(null); articlePublishRangeDao.insert(rangeToInsert); draftPublishRangeDao.updateById(range); }); - if(null != draftCover){ - ArticleCoverEntity coverToInsert = ConvertUtils.sourceToTarget(draftCover,ArticleCoverEntity.class); + if (null != draftCover) { + ArticleCoverEntity coverToInsert = ConvertUtils.sourceToTarget(draftCover, ArticleCoverEntity.class); coverToInsert.setArticleId(article.getId()); coverToInsert.setId(null); articleCoverDao.insert(coverToInsert); @@ -920,7 +920,7 @@ public class ArticleServiceImpl extends BaseServiceImpl imgSyncScanResult = null; Result textSyncScanResult = null; - if(!CollectionUtils.isEmpty(imgScanParamDTO.getTasks())){ - log.info("scanContent imgScanParamDTO:{}", JSON.toJSONString(imgScanParamDTO)); + if (!CollectionUtils.isEmpty(imgScanParamDTO.getTasks())) { + log.info("scanContent imgScanParamDTO:{}", JSON.toJSONString(imgScanParamDTO)); imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); log.info("scanContent imgSyncScanResult:{}", JSON.toJSONString(imgSyncScanResult)); } - if(!CollectionUtils.isEmpty(textScanParamDTO.getTasks())){ - log.info("scanContent textScanParamDTO:{}", JSON.toJSONString(textScanParamDTO)); + if (!CollectionUtils.isEmpty(textScanParamDTO.getTasks())) { + log.info("scanContent textScanParamDTO:{}", JSON.toJSONString(textScanParamDTO)); textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); log.info("scanContent textSyncScanResult:{}", JSON.toJSONString(textSyncScanResult)); } result = new SyncScanResult(); - if (imgSyncScanResult != null){ + if (imgSyncScanResult != null) { SyncScanResult imgSyncScanResultData = imgSyncScanResult.getData(); if (imgSyncScanResult.success()) { result.setAllPass(imgSyncScanResultData.isAllPass()); @@ -1008,15 +1008,16 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); @@ -1044,31 +1045,31 @@ public class ArticleServiceImpl extends BaseServiceImpl failDataIds = syncScanResult.getFailDataIds(); - for(String id:failDataIds) { + for (String id : failDataIds) { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { - draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE),""), ModuleConstant.AUDIT_STATUS_FAIL); + draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_FAIL); coverFail = true; } else { draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_FAIL); @@ -1078,21 +1079,22 @@ public class ArticleServiceImpl extends BaseServiceImpl successDataIds = syncScanResult.getSuccessDataIds(); successDataIds.forEach(id -> { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { - draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE),""), ModuleConstant.AUDIT_STATUS_PASS); + draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_PASS); } else { draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_PASS); } }); - if (coverFail || contentFail){ + if (coverFail || contentFail) { String auditMsg = ""; - if (coverFail&&contentFail){ + if (coverFail && contentFail) { auditMsg = ModuleConstant.DRAFT_CONTENT_AND_COVER; - }else if (contentFail){ + } else if (contentFail) { auditMsg = ModuleConstant.DRAFT_CONTENT; - }else if (coverFail){ - auditMsg = ModuleConstant.DRAFT_COVER;; + } else if (coverFail) { + auditMsg = ModuleConstant.DRAFT_COVER; + ; } - this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(),auditMsg)); + this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg)); } } catch (Exception e) { log.error("scanAllPassPublishArticle update db exception", e); @@ -1107,37 +1109,37 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsList = Arrays.asList(tags.split("\\|")); List tagsInfo = new ArrayList<>(); @@ -1155,37 +1157,37 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsInfo = formDto.getTagsInfo(); String customerId = formDto.getCustomerId(); //更新缓存标签使用数量 tagsInfo.forEach(resultDTO -> { - String customerKey = TagConstant.GOV_TAG_KEY+customerId; - tagRedis.updateTagUseCounts(customerKey,resultDTO); + String customerKey = TagConstant.GOV_TAG_KEY + customerId; + tagRedis.updateTagUseCounts(customerKey, resultDTO); }); //政府端更新redis的级联标签(set) List tagsInfoCopy = new ArrayList<>(); for (int i = 0; i < tagsInfo.size(); i++) { tagsInfoCopy.addAll(tagsInfo); - String key = TagConstant.GOV_RETAG_KEY+customerId+TagConstant.COLON+tagsInfo.get(i).getTagId(); + String key = TagConstant.GOV_RETAG_KEY + customerId + TagConstant.COLON + tagsInfo.get(i).getTagId(); tagsInfoCopy.remove(tagsInfo.get(i)); Set setTag = new HashSet<>(tagsInfoCopy); - tagRedis.updateMoreTag(key,setTag); + tagRedis.updateMoreTag(key, setTag); tagsInfoCopy.clear(); } } /** - * @Description 更新数据库 网格下的标签使用数量 居民端 * @param draftId * @param formDto + * @Description 更新数据库 网格下的标签使用数量 居民端 * @author zxc */ - public List updateGridTag(TokenDto tokenDto,String draftId,UpdateCustomerTagCacheDTO formDto){ + public List updateGridTag(TokenDto tokenDto, String draftId, UpdateCustomerTagCacheDTO formDto) { //获取草稿基本信息 DraftDTO draft = draftService.get(draftId); String customerId = draft.getCustomerId(); @@ -1193,7 +1195,7 @@ public class ArticleServiceImpl extends BaseServiceImpl gridIds = draftPublishRangeDao.selectGridIdByDraftId(draftId); - if (gridIds.size() == NumConstant.ZERO){ + if (gridIds.size() == NumConstant.ZERO) { throw new RenException(TagConstant.SELECT_GRIDIDLIST_FAILURE); } List gridTags = new ArrayList<>(); @@ -1205,7 +1207,7 @@ public class ArticleServiceImpl extends BaseServiceImpl { UpdateGridTagsFormDTO tag = new UpdateGridTagsFormDTO(); - BeanUtils.copyProperties(resultDTO,tag); + BeanUtils.copyProperties(resultDTO, tag); tag.setCreatedBy(userId); tag.setUpdatedBy(userId); tag.setCustomerId(customerId); @@ -1213,43 +1215,43 @@ public class ArticleServiceImpl extends BaseServiceImpl gridTagCache){ + public void updateCacheGridTag(List gridTagCache) { //更新 网格下 标签使用数量 List gridTagCacheCopy = new ArrayList<>(); gridTagCache.forEach(cacheDTO -> { String gridId = cacheDTO.getGridId(); - String key = TagConstant.GRID_TAG_KEY+gridId; + String key = TagConstant.GRID_TAG_KEY + gridId; List tagsInfo = cacheDTO.getTagsInfo(); tagsInfo.forEach(resultDTO -> { - tagRedis.updateTagUseCounts(key,resultDTO); + tagRedis.updateTagUseCounts(key, resultDTO); }); //级联 for (int i = 0; i < tagsInfo.size(); i++) { gridTagCacheCopy.addAll(tagsInfo); - String moreKey = TagConstant.GRID_RETAG_KEY+gridId+TagConstant.COLON+tagsInfo.get(i).getTagId(); + String moreKey = TagConstant.GRID_RETAG_KEY + gridId + TagConstant.COLON + tagsInfo.get(i).getTagId(); gridTagCacheCopy.remove(tagsInfo.get(i)); Set setTag = new HashSet<>(gridTagCacheCopy); - tagRedis.updateMoreTag(moreKey,setTag); + tagRedis.updateMoreTag(moreKey, setTag); gridTagCacheCopy.clear(); } }); } /** - * @Description 给文章挂标签 article_tags * @param formDto + * @Description 给文章挂标签 article_tags * @author zxc */ - public void addArticleTags(UpdateCustomerTagCacheDTO formDto,String draftId,TokenDto tokenDto){ + public void addArticleTags(UpdateCustomerTagCacheDTO formDto, String draftId, TokenDto tokenDto) { List addArticleTags = new ArrayList<>(); List tagsInfo = formDto.getTagsInfo(); DraftDTO draft = draftService.get(draftId); @@ -1262,7 +1264,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 15 Jun 2020 09:52:39 +0800 Subject: [PATCH 09/33] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8Redis?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/redis/ArticleContentRedis.java | 47 ------------------- .../com/epmet/redis/ArticleCoverRedis.java | 47 ------------------- .../redis/ArticleOperateRecordRedis.java | 47 ------------------- .../epmet/redis/ArticlePublishRangeRedis.java | 47 ------------------- .../java/com/epmet/redis/ArticleRedis.java | 47 ------------------- .../com/epmet/redis/ArticleTagsRedis.java | 47 ------------------- .../epmet/redis/ArticleVisitRecordRedis.java | 47 ------------------- .../com/epmet/redis/DraftContentRedis.java | 47 ------------------- .../java/com/epmet/redis/DraftCoverRedis.java | 47 ------------------- .../epmet/redis/DraftPublishRangeRedis.java | 47 ------------------- .../main/java/com/epmet/redis/DraftRedis.java | 47 ------------------- .../com/epmet/redis/TagCustomerRedis.java | 47 ------------------- .../java/com/epmet/redis/TagDefaultRedis.java | 47 ------------------- .../java/com/epmet/redis/TagGridRedis.java | 47 ------------------- .../impl/ArticleContentServiceImpl.java | 7 +-- .../service/impl/ArticleCoverServiceImpl.java | 7 +-- .../impl/ArticleOperateRecordServiceImpl.java | 5 -- .../impl/ArticlePublishRangeServiceImpl.java | 7 +-- .../service/impl/ArticleServiceImpl.java | 3 -- .../service/impl/ArticleTagsServiceImpl.java | 7 +-- .../impl/ArticleVisitRecordServiceImpl.java | 8 +--- .../service/impl/DraftContentServiceImpl.java | 7 +-- .../service/impl/DraftCoverServiceImpl.java | 8 +--- .../impl/DraftPublishRangeServiceImpl.java | 7 +-- .../epmet/service/impl/DraftServiceImpl.java | 4 -- .../service/impl/TagCustomerServiceImpl.java | 7 +-- .../service/impl/TagDefaultServiceImpl.java | 7 +-- .../service/impl/TagGridServiceImpl.java | 7 +-- 28 files changed, 11 insertions(+), 738 deletions(-) delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleContentRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleCoverRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleOperateRecordRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticlePublishRangeRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleTagsRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleVisitRecordRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftContentRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftCoverRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftPublishRangeRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagCustomerRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagDefaultRedis.java delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagGridRedis.java diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleContentRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleContentRedis.java deleted file mode 100644 index 46e5931a9f..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleContentRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章内容表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleContentRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleCoverRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleCoverRedis.java deleted file mode 100644 index a07e70e34f..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleCoverRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章封面表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleCoverRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleOperateRecordRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleOperateRecordRedis.java deleted file mode 100644 index a9f0b87082..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleOperateRecordRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章操作记录表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleOperateRecordRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticlePublishRangeRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticlePublishRangeRedis.java deleted file mode 100644 index 2d6973a237..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticlePublishRangeRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章发布范围表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticlePublishRangeRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleRedis.java deleted file mode 100644 index f3b51ce245..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleTagsRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleTagsRedis.java deleted file mode 100644 index c4df800cac..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleTagsRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleTagsRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleVisitRecordRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleVisitRecordRedis.java deleted file mode 100644 index 5143fb466c..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/ArticleVisitRecordRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 文章访问记录表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class ArticleVisitRecordRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftContentRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftContentRedis.java deleted file mode 100644 index 8defdcfa5d..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftContentRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 草稿内容表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class DraftContentRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftCoverRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftCoverRedis.java deleted file mode 100644 index 43ad67a79c..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftCoverRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 草稿封面表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class DraftCoverRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftPublishRangeRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftPublishRangeRedis.java deleted file mode 100644 index 7de60b82e2..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftPublishRangeRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 草稿发布范围表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class DraftPublishRangeRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftRedis.java deleted file mode 100644 index efbd69581c..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/DraftRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 草稿表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class DraftRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagCustomerRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagCustomerRedis.java deleted file mode 100644 index 08faa58c43..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagCustomerRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 客户标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class TagCustomerRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagDefaultRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagDefaultRedis.java deleted file mode 100644 index 2889f6208c..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagDefaultRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 默认标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class TagDefaultRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagGridRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagGridRedis.java deleted file mode 100644 index 86527b7153..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagGridRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.redis; - -import com.epmet.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 网格标签表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-06-02 - */ -@Component -public class TagGridRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleContentServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleContentServiceImpl.java index a7b59c26c4..d09b4f9aee 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleContentServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleContentServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.ArticleContentDao; import com.epmet.dto.ArticleContentDTO; import com.epmet.entity.ArticleContentEntity; -import com.epmet.redis.ArticleContentRedis; import com.epmet.service.ArticleContentService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class ArticleContentServiceImpl extends BaseServiceImpl implements ArticleContentService { - @Autowired - private ArticleContentRedis articleContentRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleCoverServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleCoverServiceImpl.java index 79da94dd42..d7eb79d76c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleCoverServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleCoverServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.ArticleCoverDao; import com.epmet.dto.ArticleCoverDTO; import com.epmet.entity.ArticleCoverEntity; -import com.epmet.redis.ArticleCoverRedis; import com.epmet.service.ArticleCoverService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class ArticleCoverServiceImpl extends BaseServiceImpl implements ArticleCoverService { - @Autowired - private ArticleCoverRedis articleCoverRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleOperateRecordServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleOperateRecordServiceImpl.java index a237638d2b..18f57d5bea 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleOperateRecordServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleOperateRecordServiceImpl.java @@ -27,10 +27,8 @@ import com.epmet.dao.ArticleOperateRecordDao; import com.epmet.dto.ArticleOperateRecordDTO; import com.epmet.dto.result.ArticleOperationResultDTO; import com.epmet.entity.ArticleOperateRecordEntity; -import com.epmet.redis.ArticleOperateRecordRedis; import com.epmet.service.ArticleOperateRecordService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,9 +46,6 @@ import java.util.Map; @Service public class ArticleOperateRecordServiceImpl extends BaseServiceImpl implements ArticleOperateRecordService { - @Autowired - private ArticleOperateRecordRedis articleOperateRecordRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticlePublishRangeServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticlePublishRangeServiceImpl.java index db2e800930..173e80ce7f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticlePublishRangeServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticlePublishRangeServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.ArticlePublishRangeDao; import com.epmet.dto.ArticlePublishRangeDTO; import com.epmet.entity.ArticlePublishRangeEntity; -import com.epmet.redis.ArticlePublishRangeRedis; import com.epmet.service.ArticlePublishRangeService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class ArticlePublishRangeServiceImpl extends BaseServiceImpl implements ArticlePublishRangeService { - @Autowired - private ArticlePublishRangeRedis articlePublishRangeRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 2b2005512f..04275f0152 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -50,7 +50,6 @@ import com.epmet.entity.*; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.redis.ArticleRedis; import com.epmet.redis.TagRedis; import com.epmet.service.*; import com.epmet.utils.ModuleConstant; @@ -80,8 +79,6 @@ import java.util.stream.Collectors; @Slf4j @Service public class ArticleServiceImpl extends BaseServiceImpl implements ArticleService { - @Autowired - private ArticleRedis articleRedis; @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; @Autowired diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleTagsServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleTagsServiceImpl.java index 7d0eac9bf6..7b4935e1f8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleTagsServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleTagsServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.ArticleTagsDao; import com.epmet.dto.ArticleTagsDTO; import com.epmet.entity.ArticleTagsEntity; -import com.epmet.redis.ArticleTagsRedis; import com.epmet.service.ArticleTagsService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class ArticleTagsServiceImpl extends BaseServiceImpl implements ArticleTagsService { - @Autowired - private ArticleTagsRedis articleTagsRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleVisitRecordServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleVisitRecordServiceImpl.java index 9e42ddaccf..8b4ce81966 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleVisitRecordServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleVisitRecordServiceImpl.java @@ -20,21 +20,18 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.ArticleVisitRecordDao; import com.epmet.dto.ArticleVisitRecordDTO; import com.epmet.entity.ArticleVisitRecordEntity; -import com.epmet.redis.ArticleVisitRecordRedis; import com.epmet.service.ArticleVisitRecordService; import com.epmet.utils.ModuleConstant; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import java.util.Arrays; import java.util.List; import java.util.Map; @@ -48,9 +45,6 @@ import java.util.Map; @Service public class ArticleVisitRecordServiceImpl extends BaseServiceImpl implements ArticleVisitRecordService { - @Autowired - private ArticleVisitRecordRedis articleVisitRecordRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftContentServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftContentServiceImpl.java index 2bf0807e44..34a7c2ef33 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftContentServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftContentServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.DraftContentDao; import com.epmet.dto.DraftContentDTO; import com.epmet.entity.DraftContentEntity; -import com.epmet.redis.DraftContentRedis; import com.epmet.service.DraftContentService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class DraftContentServiceImpl extends BaseServiceImpl implements DraftContentService { - @Autowired - private DraftContentRedis draftContentRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftCoverServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftCoverServiceImpl.java index 722ef35742..b8915a5070 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftCoverServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftCoverServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.DraftCoverDao; import com.epmet.dto.DraftCoverDTO; import com.epmet.entity.DraftCoverEntity; -import com.epmet.redis.DraftCoverRedis; import com.epmet.service.DraftCoverService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,10 +43,6 @@ import java.util.Map; */ @Service public class DraftCoverServiceImpl extends BaseServiceImpl implements DraftCoverService { - - @Autowired - private DraftCoverRedis draftCoverRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftPublishRangeServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftPublishRangeServiceImpl.java index 9e5554e0c0..6bcd541903 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftPublishRangeServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftPublishRangeServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.DraftPublishRangeDao; import com.epmet.dto.DraftPublishRangeDTO; import com.epmet.entity.DraftPublishRangeEntity; -import com.epmet.redis.DraftPublishRangeRedis; import com.epmet.service.DraftPublishRangeService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class DraftPublishRangeServiceImpl extends BaseServiceImpl implements DraftPublishRangeService { - @Autowired - private DraftPublishRangeRedis draftPublishRangeRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index 1fc0c0fa53..319a1e4506 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -33,14 +33,12 @@ import com.epmet.dto.form.DraftDetailFormDTO; import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.DraftEntity; -import com.epmet.redis.DraftRedis; import com.epmet.service.DraftService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -58,8 +56,6 @@ import java.util.Map; @Service public class DraftServiceImpl extends BaseServiceImpl implements DraftService { private Logger logger = LoggerFactory.getLogger(getClass()); - @Autowired - private DraftRedis draftRedis; @Override public PageData page(Map params) { diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java index a887fc636e..58ece05108 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java @@ -20,18 +20,16 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.TagCustomerDao; import com.epmet.dto.TagCustomerDTO; import com.epmet.dto.form.UpdateTagFormDTO; import com.epmet.dto.result.UpdateTagUseCountsResultDTO; import com.epmet.entity.TagCustomerEntity; -import com.epmet.redis.TagCustomerRedis; import com.epmet.service.TagCustomerService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,9 +46,6 @@ import java.util.Map; @Service public class TagCustomerServiceImpl extends BaseServiceImpl implements TagCustomerService { - @Autowired - private TagCustomerRedis tagCustomerRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagDefaultServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagDefaultServiceImpl.java index b89506b691..aff0c83817 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagDefaultServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagDefaultServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.TagDefaultDao; import com.epmet.dto.TagDefaultDTO; import com.epmet.entity.TagDefaultEntity; -import com.epmet.redis.TagDefaultRedis; import com.epmet.service.TagDefaultService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class TagDefaultServiceImpl extends BaseServiceImpl implements TagDefaultService { - @Autowired - private TagDefaultRedis tagDefaultRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagGridServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagGridServiceImpl.java index 6593a5c0e4..e47f01392f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagGridServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagGridServiceImpl.java @@ -20,16 +20,14 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.TagGridDao; import com.epmet.dto.TagGridDTO; import com.epmet.entity.TagGridEntity; -import com.epmet.redis.TagGridRedis; import com.epmet.service.TagGridService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,9 +44,6 @@ import java.util.Map; @Service public class TagGridServiceImpl extends BaseServiceImpl implements TagGridService { - @Autowired - private TagGridRedis tagGridRedis; - @Override public PageData page(Map params) { IPage page = baseDao.selectPage( From 41db1514531c7d880a88219e82e49ef1265a119c Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 15 Jun 2020 10:05:57 +0800 Subject: [PATCH 10/33] =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 04275f0152..1cbe06fb96 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -334,8 +334,8 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 15 Jun 2020 10:07:22 +0800 Subject: [PATCH 11/33] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-voice/gov-voice-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index edf28f3cd9..a669bc6c03 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.42 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.43 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 272df9acb0..a27a14e69e 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.42 + 0.3.43 gov-voice com.epmet From 2a08c0fcc058614f8cfcb3922f73b6cb6e8385ae Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 15 Jun 2020 10:14:25 +0800 Subject: [PATCH 12/33] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=89=8D=20install?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 1cbe06fb96..c7a8b7ef2c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -334,8 +334,8 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 15 Jun 2020 10:47:10 +0800 Subject: [PATCH 13/33] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index c7a8b7ef2c..8f53e4e147 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -321,6 +321,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 15 Jun 2020 10:49:03 +0800 Subject: [PATCH 14/33] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-voice/gov-voice-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index a669bc6c03..be20e9d276 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.43 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.44 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index a27a14e69e..bc67dd1e6a 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.43 + 0.3.44 gov-voice com.epmet From cf41ce3299379dfe86464fe25b5d012f6a166992 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 15 Jun 2020 10:58:58 +0800 Subject: [PATCH 15/33] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index ed35c5facb..e97eb759b1 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -147,6 +147,7 @@ WHERE DEL_FLAG = '0' AND (STATUS_FLAG = 'unpublish' OR STATUS_FLAG = 'auditfail') AND CREATED_BY = #{userId} + ORDER BY CREATED_TIME DESC