소스 검색

代码优化

Zhaops 6 년 전
부모
커밋
10953690ed
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      icssman-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

+ 3 - 3
icssman-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -66,7 +66,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         IntroduceInfo introduceInfo = new IntroduceInfo();
         IntroduceInfo introduceInfo = new IntroduceInfo();
         Date now = DateUtil.now();
         Date now = DateUtil.now();
         String userId = UserUtils.getCurrentPrincipleID();
         String userId = UserUtils.getCurrentPrincipleID();
-        if (!(introduceVO.getId() == null || introduceVO.getId().equals(0))) {
+        if (!(introduceVO.getId() == null || introduceVO.getId().equals(0L))) {
             introduceInfo = this.getById(introduceVO.getId());
             introduceInfo = this.getById(introduceVO.getId());
             if (introduceInfo == null) {
             if (introduceInfo == null) {
                 throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息不存在");
                 throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息不存在");
@@ -294,7 +294,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         //未关联的标签
         //未关联的标签
         QueryWrapper<QuestionInfo> unRelatedQuestionWrapper = new QueryWrapper<>();
         QueryWrapper<QuestionInfo> unRelatedQuestionWrapper = new QueryWrapper<>();
         unRelatedQuestionWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
         unRelatedQuestionWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("sub_type",0)
+                .eq("sub_type", 0)
                 .notIn("id", questionIds);
                 .notIn("id", questionIds);
         List<QuestionInfo> unRelatedQuestionList = questionFacade.list(unRelatedQuestionWrapper);
         List<QuestionInfo> unRelatedQuestionList = questionFacade.list(unRelatedQuestionWrapper);
         List<QuestionShortDTO> unRelatedQuestionDTOList = Lists.newLinkedList();
         List<QuestionShortDTO> unRelatedQuestionDTOList = Lists.newLinkedList();
@@ -316,7 +316,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
     public List<QuestionShortDTO> getAllQuestionList() {
     public List<QuestionShortDTO> getAllQuestionList() {
         QueryWrapper<QuestionInfo> unRelatedQuestionWrapper = new QueryWrapper<>();
         QueryWrapper<QuestionInfo> unRelatedQuestionWrapper = new QueryWrapper<>();
         unRelatedQuestionWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
         unRelatedQuestionWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("sub_type",0);
+                .eq("sub_type", 0);
         List<QuestionInfo> unRelatedQuestionList = questionFacade.list(unRelatedQuestionWrapper);
         List<QuestionInfo> unRelatedQuestionList = questionFacade.list(unRelatedQuestionWrapper);
         List<QuestionShortDTO> unRelatedQuestionDTOList = Lists.newLinkedList();
         List<QuestionShortDTO> unRelatedQuestionDTOList = Lists.newLinkedList();
         for (QuestionInfo questionInfo : unRelatedQuestionList) {
         for (QuestionInfo questionInfo : unRelatedQuestionList) {