Преглед изворни кода

Merge remote-tracking branch 'origin/v1.9'

# Conflicts:
#	application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourGroupController.java
пре 2 недеља
родитељ
комит
67dfc98d14
100 измењених фајлова са 6638 додато и 222 уклоњено
  1. 0 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/BasicToWebController.java
  2. 79 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourGroupController.java
  3. 439 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourWebTravelNotesTopicController.java
  4. 6 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismUserController.java
  5. 307 28
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TravelNotesCommentController.java
  6. 63 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebSiteTourismProjectSearchRecordsController.java
  7. 210 157
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebSiteTourismTravelNotesPublishController.java
  8. 62 4
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteTourismProjectTravelNotesController.java
  9. 30 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourFourceEachFriendsDto.java
  10. 30 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTakePartImGroupDto.java
  11. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTourismProjectSearchRecordsDto.java
  12. 30 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTravelNotesTopicByNameDto.java
  13. 45 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTravelNotesTopicListByNameDto.java
  14. 35 2
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismProjectTravelNotesWriteToWebDto.java
  15. 9 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismTravelNotesWriteDto.java
  16. 14 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TravelNotesByStateDto.java
  17. 11 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TravelToTopDto.java
  18. 2 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/WebsiteTourUserDto.java
  19. 43 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/model/TourShortImGroup.java
  20. 29 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/model/TourShortUser.java
  21. 21 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/TourTravelNotesPublishService.java
  22. 36 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/TourismProjectSearchRecordsService.java
  23. 226 19
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/BasicToWebServiceImpl.java
  24. 1 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourMemberImpl.java
  25. 398 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourTravelNotesPublishServiceImpl.java
  26. 151 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourismProjectSearchRecordsServiceImpl.java
  27. 25 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/CollectCommentsVo.java
  28. 53 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/HomePageDetailsVo.java
  29. 9 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/NotesNameVo.java
  30. 9 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/NotesViewsVo.java
  31. 27 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/SpecialCollectionVo.java
  32. 40 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourShortImGroupVo.java
  33. 37 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourShortUserVo.java
  34. 65 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourTravelNotesTopicNotesSearchVo.java
  35. 56 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourTravelNotesTopicSearchVo.java
  36. 16 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourismProjectSearchRecordsVo.java
  37. 5 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourismProjectTravelNotesWriteCovertVo.java
  38. 52 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesByStateVo.java
  39. 30 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesCommentVo.java
  40. 49 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesVo.java
  41. 23 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/UserGroupVo.java
  42. 10 0
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/UserNameVo.java
  43. 189 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectSearchRecordsController.java
  44. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectTravelNotesWriteContentController.java
  45. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesCommentMentionUserController.java
  46. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesImgController.java
  47. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesMentionUserController.java
  48. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesTopicController.java
  49. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesTopicRelationController.java
  50. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserCommentCollectRelationController.java
  51. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserCommentLikeRelationController.java
  52. 179 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserLikeTopicController.java
  53. 52 1
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourismProjectTravelNotesWriteController.java
  54. 11 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourFansMapper.java
  55. 12 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourImGroupMapper.java
  56. 32 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTourismProjectSearchRecordsMapper.java
  57. 34 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTourismProjectTravelNotesWriteContentMapper.java
  58. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesCommentMentionUserMapper.java
  59. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesImgMapper.java
  60. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesMentionUserMapper.java
  61. 70 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesTopicMapper.java
  62. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesTopicRelationMapper.java
  63. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserCommentCollectRelationMapper.java
  64. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserCommentLikeRelationMapper.java
  65. 36 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserLikeTopicMapper.java
  66. 3 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourismProjectTravelNotesWriteMapper.java
  67. 2 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourismTravelNotesContentWriteMapper.java
  68. 18 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourFansMapper.xml
  69. 18 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourImGroupMapper.xml
  70. 88 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTourismProjectSearchRecordsMapper.xml
  71. 63 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTourismProjectTravelNotesWriteContentMapper.xml
  72. 8 2
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesCommentMapper.xml
  73. 58 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesCommentMentionUserMapper.xml
  74. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesImgMapper.xml
  75. 57 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesMentionUserMapper.xml
  76. 171 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesTopicMapper.xml
  77. 57 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesTopicRelationMapper.xml
  78. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserCommentCollectRelationMapper.xml
  79. 48 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserCommentLikeRelationMapper.xml
  80. 70 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserLikeTopicMapper.xml
  81. 31 4
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourismProjectTravelNotesWriteMapper.xml
  82. 5 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourismTravelNotesContentWriteMapper.xml
  83. 45 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTourismProjectTravelNotesWriteContentDto.java
  84. 80 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTourismSearchRecordsDto.java
  85. 18 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesCommentDto.java
  86. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesCommentMentionUserDto.java
  87. 39 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesImgDto.java
  88. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesMentionUserDto.java
  89. 64 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesTopicDto.java
  90. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesTopicRelationDto.java
  91. 35 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserCommentCollectRelationDto.java
  92. 35 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserCommentLikeRelationDto.java
  93. 47 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserLikeTopicDto.java
  94. 18 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourismProjectTravelNotesWriteDto.java
  95. 81 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTourismProjectSearchRecords.java
  96. 43 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTourismProjectTravelNotesWriteContent.java
  97. 29 1
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesComment.java
  98. 39 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesCommentMentionUser.java
  99. 33 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesImg.java
  100. 39 0
      application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesMentionUser.java

+ 0 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/BasicToWebController.java

@@ -6,7 +6,6 @@ import com.tourism.common.core.object.MyPageData;
 import com.tourism.common.core.object.ResponseResult;
 import com.tourism.common.core.util.MyCommonUtil;
 import com.tourism.common.core.util.MyPageUtil;
-import com.tourism.common.core.validator.AddGroup;
 import com.tourism.common.core.validator.UpdateGroup;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;

+ 79 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourGroupController.java

@@ -1,14 +1,19 @@
 package com.tourism.webadmin.app.website.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.qrcode.QrCodeUtil;
 import cn.hutool.extra.qrcode.QrConfig;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
+import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.page.PageMethod;
 import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.tourism.common.additional.utils.StringUtils;
@@ -32,6 +37,8 @@ import com.tourism.webadmin.app.website.service.TourGroupService;
 import com.tourism.webadmin.app.website.service.TourMemberService;
 import com.tourism.webadmin.app.website.vo.OwnGroupVo;
 import com.tourism.webadmin.app.website.vo.TourGroupInvitationVo;
+import com.tourism.webadmin.app.website.vo.UserGroupVo;
+import com.tourism.webadmin.app.website.vo.UserNameVo;
 import com.tourism.webadmin.back.model.*;
 import com.tourism.webadmin.back.model.constant.IsTrue;
 import com.tourism.webadmin.back.model.constant.NoticeType;
@@ -45,6 +52,7 @@ import jakarta.servlet.http.HttpServletResponse;
 import jakarta.xml.bind.DatatypeConverter;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -674,4 +682,75 @@ public class TourGroupController {
     public ResponseResult<List<OwnGroupVo> > getOwnGroup() {
         return ResponseResult.success(tourGroupService.getOwnGroup());
      }
+    /**
+     *  查询用户为群主的群聊
+     */
+    @GetMapping("/getUserGroup")
+    public ResponseResult<MyPageData<UserGroupVo>> getUserGroup(String userId,Integer pageNum,Integer pageSize) {
+        String myId=TokenData.takeFromRequest().getUserId().toString();
+        if(userId==null){
+            userId=myId;
+        }
+        PageMethod.startPage(pageNum==null? 1:pageNum, pageSize==null? 10:pageSize);
+        List<TourImGroup> list = tourGroupService.lambdaQuery().eq(TourImGroup::getLeaderId, userId)
+                .eq(TourImGroup::getNoticeType, 2)
+                .eq(TourImGroup::getIsPublic,1)
+                .eq(TourImGroup::getDataState, 1).list();
+        long count=0;
+        if(!ObjectUtil.isEmpty(list)){
+            count = ((Page<TourImGroup>) list).getTotal();
+        }
+        if(count==0){
+            return ResponseResult.success(MyPageUtil.makeResponseData(new ArrayList<>(),count));
+        }
+        List<UserGroupVo> userGroupVo = BeanUtil.copyToList(list, UserGroupVo.class);
+        //群聊ids
+        Set<String> groupIds = userGroupVo.stream().map(UserGroupVo::getId).collect(Collectors.toSet());
+        List<TourImMember> list1 = tourMemberService.lambdaQuery().in(TourImMember::getGroupId, groupIds)
+                .eq(TourImMember::getDataState, 1).list();
+        //用户Ids
+        Set<Long> collect1 = list1.stream().map(TourImMember::getUserId).collect(Collectors.toSet());
+        List<TourUser> inList = tourUserService.getInList(collect1);
+
+        LambdaQueryWrapper<TourImGroupInvitation> query = Wrappers.<TourImGroupInvitation>lambdaQuery().in(TourImGroupInvitation::getGroupId, groupIds)
+                .eq(TourImGroupInvitation::getStatus, 1);
+        //申请集合
+        List<TourImGroupInvitation> listInvent = tourImGroupInvitationService.list(query);
+
+        for (UserGroupVo groupVo : userGroupVo) {
+            //填充人数
+            //当前群聊中的用户ids
+            Set<String> collect = list1.stream().filter(o -> o.getGroupId().toString().equals(groupVo.getId())).map(o->o.getUserId().toString()).collect(Collectors.toSet());
+            groupVo.setCount(collect.size());
+            //填充头像
+            List<String> collect2 = inList.stream().filter(o -> collect.contains(o.getUserId().toString())).map(o -> o.getHeadImageUrl()).collect(Collectors.toList());
+            groupVo.setMemberHeadImg(collect2);
+
+            List<TourImGroupInvitation> collect3 = listInvent.stream().filter(o -> o.getGroupId().toString().equals(groupVo.getId()) && o.getInvitee().toString().equals(myId)).collect(Collectors.toList());
+            //填充状态
+            if(collect.contains(myId)){
+                groupVo.setStatus("1");
+            }else if(!collect.contains(myId)&& !collect3.isEmpty()){
+                groupVo.setStatus("2");
+            }else {
+                groupVo.setStatus("0");
+            }
+        }
+        if(myId.equals(userId)){
+            //群聊是自己的
+            userGroupVo.forEach(o->o.setStatus("1"));
+        }
+        return ResponseResult.success(MyPageUtil.makeResponseData(userGroupVo,count));
+    }
+
+    @PostMapping("/getUserByIds")
+    public ResponseResult<List<UserNameVo>> getUserByIds(@RequestBody Set<String> ids){
+        if(ids.isEmpty()){
+            return ResponseResult.success(new ArrayList<>());
+        }
+        Set<Long> collect = ids.stream().map(Long::valueOf).collect(Collectors.toSet());
+        List<TourUser> inList = tourUserService.getInList(collect);
+        List<UserNameVo> userNameVos = BeanUtil.copyToList(inList, UserNameVo.class);
+        return ResponseResult.success(userNameVos);
+    }
 }

+ 439 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourWebTravelNotesTopicController.java

@@ -0,0 +1,439 @@
+package com.tourism.webadmin.app.website.controller;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.common.additional.config.ApplicationConfig;
+import com.tourism.common.additional.utils.UrlConvertUtils;
+import com.tourism.common.core.annotation.DisableDataFilter;
+import com.tourism.common.core.object.MyPageData;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.core.object.TokenData;
+import com.tourism.common.core.util.MyCommonUtil;
+import com.tourism.common.core.util.MyModelUtil;
+import com.tourism.common.core.util.MyPageUtil;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.tourism.webadmin.app.website.dto.TourismTravelNotesWriteDto;
+import com.tourism.webadmin.app.website.dto.TravelNotesByStateDto;
+import com.tourism.webadmin.app.website.dto.TravelToTopDto;
+import com.tourism.webadmin.app.website.vo.*;
+import com.tourism.webadmin.app.website.dto.TourTravelNotesTopicListByNameDto;
+import com.tourism.webadmin.back.dao.TourUserLikeTopicMapper;
+import com.tourism.webadmin.back.dao.TourismProjectTravelNotesWriteMapper;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.webadmin.back.vo.TourUserVo;
+import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author 陈
+ * @date 2024年1月24日 9:00:00
+ */
+@Tag(name = "游记话题")
+@Slf4j
+@RestController
+@RequestMapping("/website/tourism/travelNotesTopic")
+@DisableDataFilter
+public class TourWebTravelNotesTopicController {
+
+
+    @Autowired
+    private TourUserLikeTopicService tourUserLikeTopicService;
+    @Autowired
+    private TourUserLikeTopicMapper tourUserLikeTopicMapper;
+    @Autowired
+    private TourTravelNotesTopicService tourTravelNotesTopicService;
+    @Autowired
+    private TourUserService tourUserService;
+    @Autowired
+    private TourWebFansController tourWebFansController;
+    @Autowired
+    private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
+    @Autowired
+    private TourUserLikeTravelNotesService tourUserLikeTravelNotesService;
+    @Autowired
+    private TourFansService tourFansService;
+    @Autowired
+    private TourismProjectTravelNotesWriteMapper tourismProjectTravelNotesWriteMapper;
+    @Autowired
+    private ApplicationConfig applicationConfig;
+    @Autowired
+    private TourTourismProjectSearchRecordsService tourTourismSearchRecordsService;
+
+
+    /**
+     * 分页条件查询游记话题,默认根据最热进行排序
+     * @param tourTravelNotesTopicListByNameDto
+     * @return
+     */
+    @GetMapping("/list")
+    public ResponseResult<TourTravelNotesTopicSearchVo> listPage(@Validated TourTravelNotesTopicListByNameDto tourTravelNotesTopicListByNameDto) {
+
+        TourTravelNotesTopicSearchVo tourTravelNotesTopicSearchVo = new TourTravelNotesTopicSearchVo();
+
+        //根据话题名称查询本人是否收藏
+        TourUserLikeTopic tourUserLikeTopic = new TourUserLikeTopic();
+        tourUserLikeTopic.setTourTravelNotesTopicName(tourTravelNotesTopicListByNameDto.getTopicName());
+        tourUserLikeTopic.setTourUserId(TokenData.takeFromRequest().getUserId());
+        List<TourTravelNotesTopic> tourUserLikeTopicList = tourTravelNotesTopicService.lambdaQuery().eq(TourTravelNotesTopic::getName, tourTravelNotesTopicListByNameDto.getTopicName()).list();
+        if(CollectionUtils.isEmpty(tourUserLikeTopicList)){
+            return ResponseResult.success(null);
+        }
+        //根据名称查询专题
+        tourTravelNotesTopicSearchVo = BeanUtil.toBean(tourUserLikeTopicList.get(0), TourTravelNotesTopicSearchVo.class);
+        if(tourUserLikeTopicService.existByFilter(tourUserLikeTopic)){
+            tourTravelNotesTopicSearchVo.setIsCollect(1);
+        }else {
+            tourTravelNotesTopicSearchVo.setIsCollect(0);
+        }
+        //根据话题名称查询浏览量
+        Integer viewCountTopicByName = tourTravelNotesTopicService.getViewCountTopicByName(tourTravelNotesTopicListByNameDto.getTopicName(),tourTravelNotesTopicListByNameDto.getTitleName());
+        tourTravelNotesTopicSearchVo.setViewCount(viewCountTopicByName);
+        //根据话题名称查询讨论量
+        Integer commentCountTopicByName = tourTravelNotesTopicService.getCommentCountTopicByName(tourTravelNotesTopicListByNameDto.getTopicName(),tourTravelNotesTopicListByNameDto.getTitleName());
+        tourTravelNotesTopicSearchVo.setCommentCount(commentCountTopicByName);
+        //根据话题名称查询帖子数量
+        Integer countTravelNotesByName = tourTravelNotesTopicService.getCountTravelNotesByName(tourTravelNotesTopicListByNameDto.getTopicName(),tourTravelNotesTopicListByNameDto.getTitleName());
+        tourTravelNotesTopicSearchVo.setTravelNotesCount(countTravelNotesByName);
+        //根据话题名称查询游记列表
+
+        PageMethod.startPage(tourTravelNotesTopicListByNameDto.getPageNum(), tourTravelNotesTopicListByNameDto.getPageSize(), true);
+        List<TourismProjectTravelNotesWrite> travelNotesByTopicName =
+                tourTravelNotesTopicService.getTravelNotesByTopicName(tourTravelNotesTopicListByNameDto.getTopicName(),tourTravelNotesTopicListByNameDto.getOrderBy());
+
+        if(CollectionUtils.isNotEmpty(travelNotesByTopicName)) {
+            List<TourTravelNotesTopicNotesSearchVo> tourTravelNotesTopicNotesSearchVoList =
+                    MyModelUtil.copyCollectionTo(travelNotesByTopicName, TourTravelNotesTopicNotesSearchVo.class);
+
+            //赋值每个游记的创作者昵称和创作者头像
+            List<String> userIdList =
+                    tourTravelNotesTopicNotesSearchVoList.stream().map(TourTravelNotesTopicNotesSearchVo::getCreateUserId).collect(Collectors.toList());
+
+            List<TourUser> tourUserList = tourUserService.getInList("userId", new HashSet<>(userIdList));
+
+            List<TourUserVo> tourUserVoList = MyModelUtil.copyCollectionTo(tourUserList, TourUserVo.class);
+            // 按照 userId 分组
+            Map<String, List<TourUserVo>> userIdGroupedMap = tourUserVoList.stream().collect(Collectors.groupingBy(TourUserVo::getUserId));
+
+            tourTravelNotesTopicNotesSearchVoList.stream().forEach(item->{
+                List<TourUserVo> tourUsers = userIdGroupedMap.get(item.getCreateUserId());
+                item.setCreatedShowName(tourUsers.get(0).getShowName());
+                item.setCreatedHeadImageUrl(tourUsers.get(0).getHeadImageUrl());
+            });
+            tourTravelNotesTopicSearchVo.setTourTravelNotesTopicNotesSearchVoList(tourTravelNotesTopicNotesSearchVoList);
+        }
+        //
+        return ResponseResult.success(tourTravelNotesTopicSearchVo);
+    }
+
+    /**
+     *  查询登录用户收藏的游记话题
+     */
+    @GetMapping("/getSpecialCollection")
+    public ResponseResult<List<SpecialCollectionVo>> getSpecialCollection(){
+        Long userId = TokenData.takeFromRequest().getUserId();
+        List<SpecialCollectionVo> list=tourUserLikeTopicMapper.getSpecialCollection(userId);
+        if(list.isEmpty()) return ResponseResult.success(new ArrayList<>());
+        //话题Ids
+        Set<String> collect = list.stream().map(intem->intem.getId().toString()).collect(Collectors.toSet());
+        ArrayList<Long> longs = new ArrayList<>();
+        for (String s : collect) {
+            longs.add(Long.valueOf(s));
+        }
+        Map<Long, Integer> viewCountListTopicByName = tourTravelNotesTopicService.getViewCountListTopicByName(longs);
+        //放入浏览量的数值
+        if(!ObjectUtil.isEmpty(viewCountListTopicByName)){
+            list.stream().forEach(item->{
+                item.setViewCount(viewCountListTopicByName.get(Long.valueOf(item.getId())));
+            });
+        }else {
+            list.stream().forEach(item->{
+                item.setViewCount(0);
+            });
+        }
+        return ResponseResult.success(list);
+    }
+
+    /**
+     * 收藏专题
+     * */
+    @PostMapping("/Collection")
+    public ResponseResult<Void> Collection(@RequestBody Map<String,Object> map){
+        Long id = Long.valueOf(map.get("id").toString());
+        TourTravelNotesTopic byId = tourTravelNotesTopicService.getById(id);
+        if(byId==null){
+            return ResponseResult.error("500","专题不存在");
+        }
+        Long userId = TokenData.takeFromRequest().getUserId();
+        TourUserLikeTopic tourUserLikeTopic = new TourUserLikeTopic();
+        tourUserLikeTopic.setTourUserId(userId);
+        tourUserLikeTopic.setTourTravelNotesTopicId(byId.getId());
+        tourUserLikeTopic.setTourTravelNotesTopicName(byId.getName());
+        tourUserLikeTopicMapper.insert(tourUserLikeTopic);
+        return ResponseResult.success();
+    }
+
+    /**
+     * 取消搜藏
+     * */
+    @PostMapping("/cancelCollection")
+    public ResponseResult<Void> cancelCollection(@RequestBody Map<String,Object> map){
+        Long id = Long.valueOf(map.get("id").toString());
+        TourTravelNotesTopic byId = tourTravelNotesTopicService.getById(id);
+        if(byId==null){
+            return ResponseResult.error("500","专题不存在");
+        }
+        Long userId = TokenData.takeFromRequest().getUserId();
+        LambdaQueryWrapper<TourUserLikeTopic> query =
+                Wrappers.<TourUserLikeTopic>lambdaQuery().eq(TourUserLikeTopic::getTourUserId, userId)
+                        .eq(TourUserLikeTopic::getTourTravelNotesTopicId, byId.getId());
+        tourUserLikeTopicMapper.delete(query);
+        return ResponseResult.success();
+    }
+
+    /**
+     *  他人主页
+     */
+    @GetMapping("/homePageDetailsDto")
+    public ResponseResult<HomePageDetailsVo> homePageDetails(Long userId){
+        TourUser byId = tourUserService.getById(userId);
+        if(byId==null){
+            return ResponseResult.error("500","用户不存在");
+        }
+        HomePageDetailsVo bean = BeanUtil.toBean(byId, HomePageDetailsVo.class);
+
+        //获取用户粉丝数量
+        ResponseResult<String> myFansCount = tourWebFansController.getMyFansCount(byId.getUserId().toString());
+        bean.setNumberOfFollowers(myFansCount.getData());
+        //获取用户关注数量
+        ResponseResult<String> myConcern = tourWebFansController.getMyConcern(byId.getUserId().toString());
+        bean.setNumberOfConcern(myConcern.getData());
+        //获取用户获赞数量
+        Set<Long> collect = this.getUserTravelNotesIds(userId);
+        Long likeCount=0L;
+        if(!ObjectUtil.isEmpty(collect)){
+            likeCount=tourismProjectTravelNotesWriteMapper.getLikeCount(collect);
+        }
+        bean.setPraiseNum(likeCount);
+
+        //获取用户和登录用户的关注状态
+        Long me = TokenData.takeFromRequest().getUserId();
+        //对方是否关注了我
+        Long count1 = tourFansService.lambdaQuery().eq(TourFans::getAttentionId, me)
+                .eq(TourFans::getCreateUserId, userId)
+                .eq(TourFans::getDeleteFlag, 1).count();
+        //我是否关注对方
+        Long count2 = tourFansService.lambdaQuery().eq(TourFans::getAttentionId, userId)
+                .eq(TourFans::getCreateUserId, me)
+                .eq(TourFans::getDeleteFlag, 1).count();
+        if(count1>0&&count2>0){
+            //互关
+            bean.setState("2");
+        }else if(count1<=0&&count2<=0){
+            //关注
+            bean.setState("0");
+        } else if(count1>0){
+            //回关
+            bean.setState("4");
+        }else{
+            //已关注
+            bean.setState("1");
+        }
+        return ResponseResult.success(bean);
+    }
+
+    /**
+     *  分页查询用户游记
+     */
+    @GetMapping("/getTravelNotes")
+    public ResponseResult<MyPageData<TravelNotesVo>> getTravelNotes(Integer pageSize, Integer pageNum,String userId){
+        if(userId==null){
+            userId = TokenData.takeFromRequest().getUserId().toString();
+        }
+        LambdaQueryWrapper<TourismProjectTravelNotesWrite> query=
+                Wrappers.<TourismProjectTravelNotesWrite>lambdaQuery()
+                .eq(TourismProjectTravelNotesWrite::getCreateUserId, userId)
+                .eq(TourismProjectTravelNotesWrite::getState, 3)
+                .eq(TourismProjectTravelNotesWrite::getVisibleRange, 0)
+                .eq(TourismProjectTravelNotesWrite::getDataState, 1)
+                .orderByDesc(TourismProjectTravelNotesWrite::getIsTop,TourismProjectTravelNotesWrite::getCreateTime);
+
+        PageMethod.startPage(pageNum==null?1:pageNum,pageSize==null?10:pageSize);
+        List<TourismProjectTravelNotesWrite> list = tourismProjectTravelNotesWriteService.list(query);
+        List<TravelNotesVo> bean = BeanUtil.copyToList(list, TravelNotesVo.class);
+        long totalCount = 0L;
+        if (list instanceof Page) {
+            totalCount = ((Page<TourismProjectTravelNotesWrite>) list).getTotal();
+        }
+        if(ObjectUtil.isEmpty(bean)){
+            return ResponseResult.success(MyPageUtil.makeResponseData(bean,totalCount));
+        }
+        if(CollectionUtils.isNotEmpty(bean)){
+            bean.stream().forEach(item->{
+                item.setImageUrl(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+            });
+        }
+        TourUser byId = tourUserService.getById(userId);
+        bean.forEach(b->{
+            b.setImage(byId.getHeadImageUrl());
+            b.setName(byId.getShowName());
+        });
+        return ResponseResult.success(MyPageUtil.makeResponseData(bean,totalCount));
+    }
+
+
+    /**
+     *  查看用户发布的游记ids
+     */
+    public Set<Long> getUserTravelNotesIds(Long userId){
+        LambdaQueryWrapper<TourismProjectTravelNotesWrite> query=
+                Wrappers.<TourismProjectTravelNotesWrite>lambdaQuery()
+                        .eq(TourismProjectTravelNotesWrite::getCreateUserId, userId)
+                        .eq(TourismProjectTravelNotesWrite::getState, 3)
+                        .eq(TourismProjectTravelNotesWrite::getVisibleRange, 0)
+                        .eq(TourismProjectTravelNotesWrite::getDataState, 1)
+                        .orderByDesc(TourismProjectTravelNotesWrite::getIsTop,TourismProjectTravelNotesWrite::getCreateTime);
+        List<TourismProjectTravelNotesWrite> list = tourismProjectTravelNotesWriteService.list(query);
+        Set<Long> collect = list.stream().map(TourismProjectTravelNotesWrite::getId).collect(Collectors.toSet());
+        return collect;
+    }
+
+
+    /**
+     *  状态查询我的游记
+     */
+    @GetMapping("/getTravelNotesByState")
+    public ResponseResult<MyPageData<TravelNotesByStateVo>> getTravelNotesByState(TravelNotesByStateDto param){
+        Long userId = TokenData.takeFromRequest().getUserId();
+        LambdaQueryWrapper<TourismProjectTravelNotesWrite> query = Wrappers.<TourismProjectTravelNotesWrite>lambdaQuery()
+                .eq(TourismProjectTravelNotesWrite::getCreateUserId, userId)
+                .eq(TourismProjectTravelNotesWrite::getState, param.getState())
+                .orderByDesc(TourismProjectTravelNotesWrite::getIsTop,TourismProjectTravelNotesWrite::getCreateTime);
+        PageMethod.startPage(param.getPageNum()==null?1:param.getPageNum(),
+                param.getPageSize()==null?10:param.getPageSize());
+
+        List<TourismProjectTravelNotesWrite> list = tourismProjectTravelNotesWriteService.list(query);
+        long totalCount = 0L;
+        if (list instanceof Page) {
+            totalCount = ((Page<TourismProjectTravelNotesWrite>) list).getTotal();
+        }
+
+        List<TravelNotesByStateVo> vo = BeanUtil.copyToList(list, TravelNotesByStateVo.class);
+
+        List<String> collect = vo.stream().map(TravelNotesByStateVo::getId).collect(Collectors.toList());
+
+        //查询收藏的游记
+        LambdaQueryWrapper<TourUserLikeTravelNotes> query1 = Wrappers.<TourUserLikeTravelNotes>lambdaQuery();
+        query1.eq(TourUserLikeTravelNotes::getUserId,userId)
+                .eq(TourUserLikeTravelNotes::getDataState, 1);
+        List<TourUserLikeTravelNotes> list1 = tourUserLikeTravelNotesService.list(query1);
+
+        //收藏的游记ids
+        Set<String> collect1 = list1.stream().map(item->item.getTravelNotesId().toString()).collect(Collectors.toSet());
+        //交集
+        Collection<String> intersection = CollectionUtils.intersection(collect, collect1);
+        for (TravelNotesByStateVo bean : vo) {
+            if (intersection.contains(bean.getId())) {
+                bean.setIsCollect("1");
+            }else {
+                bean.setIsCollect("0");
+            }
+        }
+        if(CollectionUtils.isNotEmpty(vo)){
+            vo.stream().forEach(item->{
+                item.setImageUrl(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
+            });
+        }
+
+        return ResponseResult.success(MyPageUtil.makeResponseData(vo,totalCount));
+    }
+
+    /**
+     *  游记置顶
+     */
+    @PostMapping("/toTop")
+    public ResponseResult<Void> toTop(@RequestBody TravelToTopDto params){
+        Long userId = TokenData.takeFromRequest().getUserId();
+
+        LambdaQueryWrapper<TourismProjectTravelNotesWrite> query = Wrappers.<TourismProjectTravelNotesWrite>lambdaQuery().eq(TourismProjectTravelNotesWrite::getId, params.getId())
+                .eq(TourismProjectTravelNotesWrite::getCreateUserId, userId);
+        List<TourismProjectTravelNotesWrite> list = tourismProjectTravelNotesWriteService.list(query);
+
+        if(ObjectUtil.isEmpty(list)){
+            return ResponseResult.error("500","游记不存在");
+        }
+        TourismProjectTravelNotesWrite write = new TourismProjectTravelNotesWrite();
+        write.setIsTop(params.getIsTop());
+        tourismProjectTravelNotesWriteService.update(write,query);
+        return ResponseResult.success();
+    }
+
+    /**
+     * 模糊搜索游记话题,默认根据最热进行排序
+     * @param tourismTravelNotesWriteDto 入参(titleName:标题名称。模糊查询)
+     * @return 结果
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/travelNotesPageListBySearch")
+    public ResponseResult<TourTravelNotesTopicSearchVo> travelsTopicListByTitleName(TourTravelNotesTopicListByNameDto tourismTravelNotesWriteDto) {
+
+        Long userId = TokenData.takeFromRequest().getUserId();
+        String searchString = tourismTravelNotesWriteDto.getTitleName();
+        //搜索内容不为空时记录
+        if (MyCommonUtil.isNotBlankOrNull(searchString)){
+            //查询用户搜索记录
+            TourTourismProjectSearchRecords rawTourTourismSearchRecords = tourTourismSearchRecordsService
+                    .getOne(new LambdaQueryWrapper<TourTourismProjectSearchRecords>()
+                            .eq(TourTourismProjectSearchRecords::getSearchKeyword, searchString)
+                            .eq(TourTourismProjectSearchRecords::getSearchType,1)   //0游记列表1话题列表
+                            .eq(TourTourismProjectSearchRecords::getCreateUserId, userId));
+            //已存搜索记录在数量进行自增1
+            if (Objects.nonNull(rawTourTourismSearchRecords)){
+                rawTourTourismSearchRecords.setSearchResultCount(rawTourTourismSearchRecords.getSearchResultCount()+1);
+                rawTourTourismSearchRecords.setSearchTime(new Date());
+                rawTourTourismSearchRecords.setUpdateTime(new Date());
+                tourTourismSearchRecordsService.updateById(rawTourTourismSearchRecords);
+            }else{  //不存在搜索记录则进行插入
+                TourTourismProjectSearchRecords tourTourismSearchRecords = new TourTourismProjectSearchRecords();
+                tourTourismSearchRecords.setSearchKeyword(searchString);
+                //搜索次数初始为1
+                tourTourismSearchRecords.setSearchResultCount(1);
+                //0游记列表1话题列表
+                tourTourismSearchRecords.setSearchType(1);
+                tourTourismSearchRecords.setSearchTime(new Date());
+                tourTourismSearchRecordsService.saveNew(tourTourismSearchRecords);
+            }
+        }
+        return listPage(tourismTravelNotesWriteDto);
+    }
+
+    /**
+     * @param id 游记ID
+     * @return {@link ResponseResult }<{@link String }>
+     */
+    @GetMapping("/getWriteLikeCount")
+    public ResponseResult<String> getWriteLikeCount(String id){
+        if(id!=null){
+            TourismProjectTravelNotesWrite byId = tourismProjectTravelNotesWriteService.getById(id);
+            if(byId!=null){
+                return ResponseResult.success(byId.getLikeCount()+"");
+            }
+        }
+        return ResponseResult.error("500","游记不存在");
+    }
+
+
+}

+ 6 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismUserController.java

@@ -132,4 +132,10 @@ public class TourismUserController {
 //        tourUserService.changeHeadImage(TokenData.takeFromRequest().getUserId(), responseInfo.getFileUrl());
         ResponseResult.output(ResponseResult.success(responseInfo));
     }
+
+
+
+
+
+
 }

+ 307 - 28
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TravelNotesCommentController.java

@@ -1,7 +1,16 @@
 package com.tourism.webadmin.app.website.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.page.PageMethod;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.tourism.common.additional.utils.UrlConvertUtils;
@@ -17,18 +26,21 @@ import com.tourism.common.core.util.MyPageUtil;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.tourism.webadmin.app.website.dto.TravelNotesCommentToWebDto;
+import com.tourism.webadmin.app.website.vo.CollectCommentsVo;
+import com.tourism.webadmin.app.website.vo.TravelNotesCommentVo;
 import com.tourism.webadmin.back.dto.TourTravelNotesCommentDto;
-import com.tourism.webadmin.back.model.TourTravelNotesComment;
-import com.tourism.webadmin.back.service.TourTravelNotesCommentService;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
 import com.tourism.webadmin.back.vo.TourTravelNotesCommentVo;
 import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -47,6 +59,14 @@ public class TravelNotesCommentController {
     private TourTravelNotesCommentService tourTravelNotesCommentService;
     @Autowired
     private ApplicationConfig applicationConfig;
+    @Autowired
+    private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
+    @Autowired
+    private TourUserCommentCollectRelationService tourUserCommentCollectRelationService;
+    @Autowired
+    private TourUserCommentLikeRelationService tourUserCommentLikeRelationService;
+    @Autowired
+    private TourUserService tourUserService;
 
     /**
      * 新增游记评论数据。
@@ -91,7 +111,9 @@ public class TravelNotesCommentController {
      */
     @SaIgnore
     @GetMapping("/list")
-    public ResponseResult<List<TourTravelNotesCommentVo>> list(TravelNotesCommentToWebDto dto) {
+    public ResponseResult<TravelNotesCommentVo> list(TravelNotesCommentToWebDto dto) {
+
+        TravelNotesCommentVo travelNotesCommentVo = new TravelNotesCommentVo();
 //        if (dto != null) {
 //            PageMethod.startPage(dto.getPageNum(), dto.getPageSize(), dto.getCount());
 //        }
@@ -101,34 +123,97 @@ public class TravelNotesCommentController {
         MyOrderParam myOrderParam = new MyOrderParam();
         myOrderParam.add(new MyOrderParam.OrderInfo("createTime",true,null));
         String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourTravelNotesComment.class);
+        //该游记的全部评论
         List<TourTravelNotesComment> commentList =
                 tourTravelNotesCommentService.getTourTravelNotesCommentListWithRelation(tourTravelNotesCommentFilter, orderBy);
-        // commentList转为TourTravelNotesCommentVo类型list
-        List<TourTravelNotesCommentVo> commentVoList = MyModelUtil.copyCollectionTo(commentList, TourTravelNotesCommentVo.class);
-
-        TokenData tokenData = TokenData.takeFromRequest();
-        if(TokenData.takeFromRequest() != null) {
-            // 评论是否为当前用户
-            List<TourTravelNotesCommentVo> commentVos = commentVoList.stream().filter(e -> e.getCreateUserId().equals(tokenData.getUserId())).toList();
-            commentVos.forEach(e -> {
-                e.setSelf(true);
-            });
-        }
+        //游记下的全部评论ids
+        List<String> collect1 = commentList.stream().map(TourTravelNotesComment::getId).collect(Collectors.toList());
+
+        if(CollectionUtils.isNotEmpty(commentList)) {
+            // commentList转为TourTravelNotesCommentVo类型list
+            List<TourTravelNotesCommentVo> commentVoList = MyModelUtil.copyCollectionTo(commentList, TourTravelNotesCommentVo.class);
+
+            TokenData tokenData = TokenData.takeFromRequest();
+            if (tokenData != null) {
+                Long userId = tokenData.getUserId();
+                // 评论是否为当前用户
+                List<TourTravelNotesCommentVo> commentVos = commentVoList.stream().filter(e -> e.getCreateUserId().equals(userId)).toList();
+                commentVos.forEach(e -> {
+                    e.setSelf(true);
+                });
+                //全部评论
+                List<TourUserCommentCollectRelation> list = tourUserCommentCollectRelationService.lambdaQuery().in(TourUserCommentCollectRelation::getCommentId, collect1).list();
+                QueryWrapper<TourUserCommentCollectRelation> query = new QueryWrapper<>();
+
+                query.select(" count(user_id) as count ,comment_id as commentId")
+                        .groupBy("comment_id");
+                List<Map<String, Object>> maps = tourUserCommentCollectRelationService.getBaseMapper().selectMaps(query);
+                //评论id->收藏数量
+                HashMap<String, Integer> count = new HashMap<>();
+
+                for (Map<String, Object> map : maps) {
+                    String id =map.get("commentId").toString();
+                    Integer num =Integer.valueOf(map.get("count").toString());
+                    count.put(id,num);
+                }
+                for (TourTravelNotesCommentVo tourTravelNotesCommentVo : commentVoList) {
+                    Integer i = count.get(tourTravelNotesCommentVo.getId());
+                    if(i!=null){
+                        tourTravelNotesCommentVo.setCollectNum(i);
+                    }
+                }
+                //查看自己是否收藏该评论
+                //获取所有评论的id
+                //获取自己收藏的评论
+                TourUserCommentCollectRelation tourUserCommentCollectRelation = new TourUserCommentCollectRelation();
+                tourUserCommentCollectRelation.setUserId(userId);
+                List<TourUserCommentCollectRelation> tourUserCommentCollectRelationList
+                        = tourUserCommentCollectRelationService.getTourUserCommentCollectRelationList(tourUserCommentCollectRelation, "");
+                //收藏的评论ids
+                List<Long> collectCommentIdList = tourUserCommentCollectRelationList.stream().map(TourUserCommentCollectRelation::getCommentId).collect(Collectors.toList());
+
+                //查看自己是否对该评论进行点赞了
+                //获取自己点赞的所有评论id
+                TourUserCommentLikeRelation tourUserCommentLikeRelation = new TourUserCommentLikeRelation();
+                tourUserCommentLikeRelation.setUserId(userId);
+                List<TourUserCommentLikeRelation> tourUserCommentLikeRelationList =
+                        tourUserCommentLikeRelationService.getTourUserCommentLikeRelationList(tourUserCommentLikeRelation, "");
+                //用户点赞的评论id
+                List<Long> likeCommentIdList = tourUserCommentLikeRelationList.stream().map(TourUserCommentLikeRelation::getCommentId).collect(Collectors.toList());
+                commentVoList.stream().forEach(item -> {
+                    //遍历所有的评论,筛选出哪些是用户已经收藏的评论
+                    if (collectCommentIdList.contains(Long.valueOf(item.getId()))) {
+                        item.setIsCollect(1);
+                    }else {
+                        item.setIsCollect(0);
+                    }
+                    //遍历所有的点赞评论,筛选出哪些是用户已经点赞的评论
+                    if (likeCommentIdList.contains(Long.valueOf(item.getId()))) {
+                        item.setIsLike(1);
+                    }else {
+                        item.setIsLike(0);
+                    }
+                });
 
-        // 一级评论和二级评论分开
-        List<TourTravelNotesCommentVo> firstCommentList = commentVoList.stream().filter(e->e.getParentId() == null).toList();
-        List<TourTravelNotesCommentVo> secondCommentList = commentVoList.stream().filter(e->e.getParentId() != null).toList();
-        // 二级评论做map数据
-        Map<String, List<TourTravelNotesCommentVo>> collect = secondCommentList.stream().collect(Collectors.groupingBy(e -> e.getParentId()));
-        // 作为子评论追加到一级评论
-        firstCommentList.forEach(e->{
-            List<TourTravelNotesCommentVo> childList = collect.get(e.getId());
-            if(childList != null && childList.size() > 0){
-                e.setChildrenList(childList);
             }
-        });
 
-        return ResponseResult.success(firstCommentList);
+
+            // 一级评论和二级评论分开
+            List<TourTravelNotesCommentVo> firstCommentList = commentVoList.stream().filter(e -> e.getParentId() == null).toList();
+            List<TourTravelNotesCommentVo> secondCommentList = commentVoList.stream().filter(e -> e.getParentId() != null).toList();
+            // 二级评论做map数据
+            Map<String, List<TourTravelNotesCommentVo>> collect = secondCommentList.stream().collect(Collectors.groupingBy(e -> e.getParentId()));
+            // 作为子评论追加到一级评论
+            firstCommentList.forEach(e -> {
+                List<TourTravelNotesCommentVo> childList = collect.get(e.getId());
+                if (childList != null && childList.size() > 0) {
+                    e.setChildrenList(childList);
+                }
+            });
+            travelNotesCommentVo.setCommentCount(commentList.size());
+            travelNotesCommentVo.setTourTravelNotesCommentVoList(firstCommentList);
+        }
+        return ResponseResult.success(travelNotesCommentVo);
     }
 
     /**
@@ -174,4 +259,198 @@ public class TravelNotesCommentController {
         }
         return ResponseResult.success();
     }
+    //对评论进行点赞
+    /**
+     * 对评论进行点赞。
+     *
+     * @param commentId 评论id。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/commentLike")
+    @Transactional
+    public ResponseResult<Void> commentLike(@RequestBody Long commentId){
+        TourTravelNotesComment byId = tourTravelNotesCommentService.getById(commentId);
+        if(byId==null){
+            return ResponseResult.error("500","评论不存在");
+        }
+        //判断是否已经点赞
+        List<TourUserCommentLikeRelation> list = tourUserCommentLikeRelationService.lambdaQuery().eq(TourUserCommentLikeRelation::getUserId, TokenData.takeFromRequest().getUserId())
+                .eq(TourUserCommentLikeRelation::getCommentId, commentId).list();
+        if(!list.isEmpty()){
+            return ResponseResult.error("500","该评论已经点赞");
+        }
+        byId.setLikeNum(byId.getLikeNum()+1);
+        tourTravelNotesCommentService.updateById(byId);
+        TourUserCommentLikeRelation tourUserCommentLikeRelation = new TourUserCommentLikeRelation();
+        tourUserCommentLikeRelation.setCommentId(commentId);
+        tourUserCommentLikeRelation.setUserId(TokenData.takeFromRequest().getUserId());
+        tourUserCommentLikeRelationService.saveNew(tourUserCommentLikeRelation);
+        return ResponseResult.success();
+    }
+    //对评论取消点赞
+    /**
+     * 对评论取消点赞。
+     *
+     * @param commentId 评论id。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/commentLikeCancle")
+    @Transactional
+    public ResponseResult<Void> commentLikeCancle(@RequestBody Long commentId){
+        TourTravelNotesComment byId = tourTravelNotesCommentService.getById(commentId);
+        if(byId==null){
+            return ResponseResult.error("500","评论不存在");
+        }
+
+        TourUserCommentLikeRelation tourUserCommentLikeRelation = new TourUserCommentLikeRelation();
+        tourUserCommentLikeRelation.setCommentId(commentId);
+        tourUserCommentLikeRelation.setUserId(TokenData.takeFromRequest().getUserId());
+        Integer i = tourUserCommentLikeRelationService.removeBy(tourUserCommentLikeRelation);
+        if(i<=0){
+            return ResponseResult.success();
+        }
+        byId.setLikeNum(byId.getLikeNum()-1);
+        tourTravelNotesCommentService.updateById(byId);
+        return ResponseResult.success();
+    }
+    //对评论进行收藏
+    /**
+     * 对评论进行收藏。
+     *
+     * @param map 评论id。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/commentCollect")
+    public ResponseResult<Void> commentCollect(@RequestBody Map<String,Long> map){
+        Long l = map.get("commentId");
+
+        List<TourUserCommentCollectRelation> list = tourUserCommentCollectRelationService.lambdaQuery().eq(TourUserCommentCollectRelation::getUserId, TokenData.takeFromRequest().getUserId())
+                .eq(TourUserCommentCollectRelation::getCommentId, l).list();
+        if(!list.isEmpty()){
+            return ResponseResult.success();
+        }
+        TourUserCommentCollectRelation tourUserCommentCollectRelation = new TourUserCommentCollectRelation();
+        tourUserCommentCollectRelation.setCommentId(l);
+        tourUserCommentCollectRelation.setUserId(TokenData.takeFromRequest().getUserId());
+        tourUserCommentCollectRelationService.saveNew(tourUserCommentCollectRelation);
+        return ResponseResult.success();
+    }
+    //对评论取消收藏
+    /**
+     * 对评论取消收藏。
+     *
+     * @param commentId 评论id。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/commentCollectCancle")
+    public ResponseResult<Void> commentCollectCancle(@RequestBody Long commentId){
+        //获取id
+        TourUserCommentCollectRelation tourUserCommentCollectRelation = new TourUserCommentCollectRelation();
+        tourUserCommentCollectRelation.setCommentId(commentId);
+        tourUserCommentCollectRelation.setUserId(TokenData.takeFromRequest().getUserId());
+        tourUserCommentCollectRelationService.removeBy(tourUserCommentCollectRelation);
+        return ResponseResult.success();
+    }
+    //删除评论接口
+    //1.删除自己写的评论;
+
+    /**
+     * 删除自己写的评论。
+     *
+     * @param commentId 评论id。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/myCommentDel")
+    public ResponseResult<Void> myCommentDel(@RequestBody Long commentId){
+        //先校验评论id是否为自己的评论
+        TourTravelNotesComment tourTravelNotesComment = tourTravelNotesCommentService.getById(commentId);
+        //是自己的评论,直接进行删除
+        if(tourTravelNotesComment.getCommentUserId().equals(TokenData.takeFromRequest().getUserId())){
+            tourTravelNotesCommentService.remove(commentId);
+        }else{
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST,"不是自己的评论,无法删除");
+        }
+        return ResponseResult.success();
+    }
+    // 2.删除自己写的游记的评论
+    //群聊详情接口
+    //举报评论接口
+
+
+
+    /**
+     *  查询用户收藏评论
+     */
+    @GetMapping("/getCollectComments")
+    public ResponseResult<MyPageData<CollectCommentsVo>> getCollectComments(String userId,Integer pageNum,Integer pageSize){
+        if(userId==null){
+            userId=TokenData.takeFromRequest().getUserId().toString();
+        }
+        LambdaQueryWrapper<TourUserCommentCollectRelation> query = Wrappers.<TourUserCommentCollectRelation>lambdaQuery()
+                .eq(TourUserCommentCollectRelation::getUserId, userId)
+                .orderByDesc(TourUserCommentCollectRelation::getCreateTime);
+
+        List<TourUserCommentCollectRelation> list = tourUserCommentCollectRelationService.list(query);
+
+        //自己收藏的评论ID
+        Set<Long> collect = list.stream().map(TourUserCommentCollectRelation::getCommentId).collect(Collectors.toSet());
+        if(collect.isEmpty()){
+            return ResponseResult.success(MyPageUtil.makeResponseData(new ArrayList<>(),0L));
+        }
+        //开启分页
+        PageMethod.startPage(pageNum==null?1:pageNum,pageSize==null?10:pageSize);
+        LambdaQueryWrapper<TourTravelNotesComment> query1 = Wrappers.<TourTravelNotesComment>lambdaQuery()
+                .in(TourTravelNotesComment::getId, collect)
+                .orderByDesc(TourTravelNotesComment::getCreateTime);
+        //分页查询评论
+        List<TourTravelNotesComment> tourTravelNotesComments = tourTravelNotesCommentService.list(query1);
+        long totalCount = 0L;
+        if (list instanceof Page) {
+            totalCount = ((Page<TourTravelNotesComment>) tourTravelNotesComments).getTotal();
+        }
+
+        List<CollectCommentsVo> result = BeanUtil.copyToList(tourTravelNotesComments, CollectCommentsVo.class);
+        //发品论用户
+        Set<Long> userIds = result.stream().map(item->Long.valueOf(item.getCreateUserId())).collect(Collectors.toSet());
+        //评论的游记ids
+        Set<Long> notice = result.stream().map(item->Long.valueOf(item.getTravelNoteId())).collect(Collectors.toSet());
+
+        List<TourUser> inList = tourUserService.getInList(userIds);
+        Map<String, TourUser> userMap = new HashMap<>();
+        for (TourUser tourUser : inList) {
+            userMap.put(tourUser.getUserId().toString(),tourUser);
+        }
+        List<TourismProjectTravelNotesWrite> inList1 = tourismProjectTravelNotesWriteService.getInList(notice);
+        Map<String, TourismProjectTravelNotesWrite> noticeMap = new HashMap<>();
+        //填充用户
+        for (TourismProjectTravelNotesWrite tourUser : inList1) {
+            noticeMap.put(tourUser.getId().toString(),tourUser);
+        }
+        //填充游记
+        for (CollectCommentsVo c : result) {
+            TourUser tourUser = userMap.get(c.getCreateUserId());
+            if(tourUser!=null){
+                c.setCreateName(tourUser.getShowName());
+                c.setHeadImage(tourUser.getHeadImageUrl());
+            }
+            TourismProjectTravelNotesWrite write = noticeMap.get(c.getTravelNoteId());
+            if(write!=null){
+                c.setNotice(BeanUtil.toBean(write,TourismProjectTravelNotesWriteVo.class));
+            }
+        }
+
+        if(CollectionUtils.isNotEmpty(result)){
+            result.stream().forEach(item->{
+                if(item.getNotice()!=null){
+                    item.getNotice().setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getNotice().getTourismUrl()));
+                }
+            });
+        }
+        return ResponseResult.success(MyPageUtil.makeResponseData(result,totalCount));
+    }
 }

+ 63 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebSiteTourismProjectSearchRecordsController.java

@@ -0,0 +1,63 @@
+package com.tourism.webadmin.app.website.controller;
+import com.tourism.common.core.object.MyPageData;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.tourism.webadmin.app.website.dto.PageDto;
+import com.tourism.webadmin.app.website.dto.TourTourismProjectSearchRecordsDto;
+import com.tourism.webadmin.app.website.service.TourismProjectSearchRecordsService;
+import com.tourism.webadmin.app.website.vo.TourismProjectSearchRecordsVo;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Tag(name = "旅游游记列表搜索接口")
+@Slf4j
+@RestController
+@Validated
+@RequestMapping("/website/tourism/projectSearchRecords")
+public class WebSiteTourismProjectSearchRecordsController {
+
+	@Autowired
+	private TourismProjectSearchRecordsService tourismProjectSearchRecordsService;
+
+	/**
+	 * 用过游记搜索记录id删除记录
+	 * @param idString 搜索记录id
+	 * @return 结果
+	 */
+	@OperationLog(type = SysOperationLogType.DELETE)
+	@PostMapping("/deleteSearchRecordById")
+	public ResponseResult<Void> removeProjectSearchRecordsById(@RequestBody String idString){
+		return tourismProjectSearchRecordsService.removeProjectSearchRecordsById(idString);
+	}
+
+
+	/**
+	 * 清空游记历史搜索记录(searchType:1)
+	 * @return 结果
+	 */
+	@OperationLog(type = SysOperationLogType.DELETE_BATCH)
+	@PostMapping("/clearSearchRecord")
+	public ResponseResult<Void> clearProjectSearchRecords(@RequestBody String searchType){
+
+		return tourismProjectSearchRecordsService.clearProjectSearchRecords(searchType);
+	}
+
+
+	/**
+	 * 获取游记搜索记录列表
+	 * @param tourTourismProjectSearchRecordsDto 参数DTO对象
+	 * @return 结果
+	 */
+	@OperationLog(type = SysOperationLogType.LIST)
+	@GetMapping("/searchRecordList")
+	public ResponseResult<MyPageData<TourismProjectSearchRecordsVo>> getSearchRecordList(TourTourismProjectSearchRecordsDto tourTourismProjectSearchRecordsDto){
+		return tourismProjectSearchRecordsService.getSearchRecordList(tourTourismProjectSearchRecordsDto);
+	}
+
+}

+ 210 - 157
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebSiteTourismTravelNotesPublishController.java

@@ -1,5 +1,7 @@
 package com.tourism.webadmin.app.website.controller;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.github.pagehelper.page.PageMethod;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.tourism.common.additional.utils.StringUtils;
@@ -11,34 +13,33 @@ import com.tourism.common.core.util.MyCommonUtil;
 import com.tourism.common.core.util.MyModelUtil;
 import com.tourism.common.core.util.MyPageUtil;
 import com.tourism.common.core.validator.UpdateGroup;
-import com.tourism.common.huaweicloud.moderation.service.HuaweiCloudModerationService;
+import com.tourism.common.huaweicloud.obs.util.MergeAvatarsFlexUtils;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.tourism.common.sequence.wrapper.IdGeneratorWrapper;
-import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteDetailPageDto;
-import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteToWebDto;
-import com.tourism.webadmin.app.website.dto.WebsiteTourUserDto;
-import com.tourism.webadmin.app.website.vo.TourWriteBelongTabVo;
-import com.tourism.webadmin.app.website.vo.TourismProjectTravelNotesWriteCovertVo;
+import com.tourism.webadmin.app.website.dto.*;
+import com.tourism.webadmin.app.website.model.TourShortImGroup;
+import com.tourism.webadmin.app.website.model.TourShortUser;
+import com.tourism.webadmin.app.website.service.TourTravelNotesPublishService;
+import com.tourism.webadmin.app.website.vo.*;
+import com.tourism.webadmin.back.dto.TourTravelNotesMentionUserDto;
 import com.tourism.webadmin.back.dto.TourismTravelNotesContentWriteDto;
 import com.tourism.webadmin.back.model.*;
 import com.tourism.webadmin.back.model.constant.AuditState;
 import com.tourism.webadmin.back.model.constant.UnmountState;
 import com.tourism.webadmin.back.service.*;
+import com.tourism.webadmin.back.vo.TourTravelNotesMentionUserVo;
+import com.tourism.webadmin.back.vo.TourTravelNotesTopicVo;
 import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
-import com.tourism.webadmin.back.vo.TourismTravelNotesContentWriteVo;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
-import ognl.Token;
 import org.apache.commons.collections4.CollectionUtils;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Tag(name = "门户网站发布游记接口")
@@ -52,17 +53,31 @@ public class WebSiteTourismTravelNotesPublishController {
     @Autowired
     private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
     @Autowired
-    private TourismTravelNotesContentWriteService tourismTravelNotesContentWriteService;
-    @Autowired
     private TourTourismProjectTravelNotesService tourTourismProjectTravelNotesService;
     @Autowired
     private TourUserService tourUserService;
     @Autowired
     private DirectoryInfoService directoryInfoService;
     @Autowired
-    private HuaweiCloudModerationService huaweiCloudModerationService;
-    @Autowired
     private ApplicationConfig applicationConfig;
+    @Autowired
+    private TourFansService tourFansService;
+    @Autowired
+    private TourTravelNotesTopicService tourTravelNotesTopicService;
+    @Autowired
+    private TourImGroupService tourImGroupService;
+    @Autowired
+    private TourImMemberService tourImMemberService;
+    @Autowired
+    private MergeAvatarsFlexUtils mergeAvatarsFlexUtils;
+    @Autowired
+    private TourTravelNotesPublishService tourTravelNotesPublishService;
+    @Autowired
+    private TourTravelNotesImgService tourTravelNotesImgService;
+    @Autowired
+    private TourTravelNotesTopicRelationService tourTravelNotesTopicRelationService;
+    @Autowired
+    private TourTravelNotesMentionUserService tourTravelNotesMentionUserService;
 
     /**
      * 获取草稿id
@@ -84,54 +99,31 @@ public class WebSiteTourismTravelNotesPublishController {
     @PostMapping("/saveDraft")
     public ResponseResult<Void> saveDraft(@RequestBody TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto) {
 
-
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
-                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
-
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteSave =
-                MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto,TourismProjectTravelNotesWrite.class);
-
-        //将从表中的数据进行过滤,筛选出cover为1的图片为封面图,第一段落为项目简述
-        List<TourismTravelNotesContentWriteDto> travelNotesContent = tourismProjectTravelNotesWriteDto.getTravelNotesContent();
-
-        //循环遍历查询内容是否超过5000长度
-        for(TourismTravelNotesContentWriteDto i:travelNotesContent){
-            if(StringUtils.isNotBlank(i.getContent()) && i.getContent().length()>5000)
-                return ResponseResult.error(ErrorCodeEnum.CONTENT_OUT_LIMIT);
-        }
-        List<TourismTravelNotesContentWriteDto> coverImageList = travelNotesContent.stream().filter(item -> item.getType().equals("image") && item.getCover() != null && item.getCover() == 1).collect(Collectors.toList());
-        List<TourismTravelNotesContentWriteDto> coverImageList1 = travelNotesContent.stream().filter(item -> item.getType().equals("image")).collect(Collectors.toList());
-        if(CollectionUtils.isEmpty(coverImageList)){
-            if(CollectionUtils.isNotEmpty(coverImageList1)){
-                tourismProjectTravelNotesWriteSave.setTourismUrl(coverImageList1.get(0).getContent());
+        Long userId = TokenData.takeFromRequest().getUserId();
+        //先校验提及的用户id是否符合互关的状态
+        if(CollectionUtils.isNotEmpty(tourismProjectTravelNotesWriteDto.getMentions())) {
+            List<TourTravelNotesMentionUserDto> mentions = tourismProjectTravelNotesWriteDto.getMentions();
+            List<TourTravelNotesMentionUserDto> mentionsUserIdList = mentions.stream().filter(item -> item.getUserId() != null).collect(Collectors.toList());
+            List<TourShortUser> fouceEachFriendsByName = tourFansService.getFouceEachFriendsByName(userId, "");
+            List<TourShortUser> fouceEachFriedsUserIdList = fouceEachFriendsByName.stream().filter(i -> i.getUserId() != null).collect(Collectors.toList());
+
+            Set<Long> collect = mentionsUserIdList.stream().map(TourTravelNotesMentionUserDto::getUserId).collect(Collectors.toSet());
+            Set<Long> collect1 = fouceEachFriedsUserIdList.stream().map(TourShortUser::getUserId).collect(Collectors.toSet());
+            if (!(collect1).containsAll(collect)) {
+                return ResponseResult.error(ErrorCodeEnum.MENTION_USER_ERROR, "提及的用户与本人不符合互关的状态");
             }
-        }else{
-            tourismProjectTravelNotesWriteSave.setTourismUrl(coverImageList.get(0).getContent());
         }
 
-        //判断是新增还是更新
-        if(tourismProjectTravelNotesWrite == null){
-            //草稿为下架状态
-            tourismProjectTravelNotesWriteSave.setUnmountState(UnmountState.DELIST);
-            tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWriteSave);
-        }else {
-            //草稿为下架状态
-            tourismProjectTravelNotesWriteSave.setUnmountState(UnmountState.DELIST);
-            tourismProjectTravelNotesWriteService.updateById(tourismProjectTravelNotesWriteSave);
-        }
-
-        //判断内容是否为空
-        if(tourismProjectTravelNotesWriteDto.getTravelNotesContent() != null) {
-            List<TourismTravelNotesContentWriteDto> travelNotesContentWriteList = tourismProjectTravelNotesWriteDto.getTravelNotesContent();
-            List<TourismTravelNotesContentWrite> tourismTravelNotesContentWriteList = MyModelUtil.copyCollectionTo(travelNotesContentWriteList, TourismTravelNotesContentWrite.class);
-            for (TourismTravelNotesContentWrite item : tourismTravelNotesContentWriteList) {
-                item.setAssociationId(tourismProjectTravelNotesWriteSave.getId());
-                item.setId(null);
+        //校验dto中的群聊是否为本人参与的群聊
+        if(tourismProjectTravelNotesWriteDto.getTourImGroupId() != null) {
+            List<TourShortImGroup> takePartImGroupListByName = tourImGroupService.getTakePartImGroupListByName(userId, "");
+            List<Long> takePartImGroupIdList = takePartImGroupListByName.stream().mapToLong(TourShortImGroup::getId).boxed().collect(Collectors.toList());
+            if (!takePartImGroupIdList.contains(tourismProjectTravelNotesWriteDto.getTourImGroupId())) {
+                return ResponseResult.error(ErrorCodeEnum.MENTION_GROUP_ERROR, "本人未参与到关联的群聊中");
             }
-            tourismTravelNotesContentWriteService.removeByAssociationId(tourismProjectTravelNotesWriteSave.getId());
-            //查询关联数据的id,根据id进行更新数据表的数据
-            tourismTravelNotesContentWriteService.saveNewBatch(tourismTravelNotesContentWriteList);
         }
+        
+        tourTravelNotesPublishService.saveDraft(tourismProjectTravelNotesWriteDto);
         return ResponseResult.success();
     }
 
@@ -147,22 +139,8 @@ public class WebSiteTourismTravelNotesPublishController {
         if (pageDto.getType() == null) {
             return ResponseResult.success(null);
         }
-        Long userId = TokenData.takeFromRequest().getUserId();
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = new TourismProjectTravelNotesWrite();
-        tourismProjectTravelNotesWrite.setCreateUserId(userId);
-        tourismProjectTravelNotesWrite.setState(pageDto.getType());
-        MyOrderParam myOrderParam = new MyOrderParam();
-        myOrderParam.add(new MyOrderParam.OrderInfo("updateTime",false,null));
-        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourismProjectTravelNotesWrite.class);
-        if(pageDto.getPageSize() != null && pageDto.getPageNum() != null){
-            PageMethod.startPage(pageDto.getPageNum(), pageDto.getPageSize(), true);
-        }
-        //查询已发布状态的状态,则需要state为3并且上下架状态为上架
-        if(pageDto.getType() == 3){
-            tourismProjectTravelNotesWrite.setUnmountState(UnmountState.LISTING);
-        }
-        List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList =
-                tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteList(tourismProjectTravelNotesWrite, orderBy);
+
+        List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList = tourTravelNotesPublishService.getDraftList(pageDto);
 
         MyPageData<TourismProjectTravelNotesWriteCovertVo> tourismProjectTravelNotesWriteVoMyPageData = MyPageUtil.makeResponseData(tourismProjectTravelNotesWriteList, TourismProjectTravelNotesWriteCovertVo.class);
         List<TourismProjectTravelNotesWriteCovertVo> dataList = tourismProjectTravelNotesWriteVoMyPageData.getDataList();
@@ -189,6 +167,27 @@ public class WebSiteTourismTravelNotesPublishController {
         }
         TourismProjectTravelNotesWriteVo tourismProjectTravelNotesWriteVo = MyModelUtil.copyTo(tourismProjectTravelNotesWrite, TourismProjectTravelNotesWriteVo.class);
 
+        //填充图片
+        TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+        tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        List<TourTravelNotesImg> tourTravelNotesImgList = tourTravelNotesImgService.getTourTravelNotesImgList(tourTravelNotesImg, "");
+        List<String> imgUrlList = tourTravelNotesImgList.stream().map(TourTravelNotesImg::getImgUrl).collect(Collectors.toList());
+        tourismProjectTravelNotesWriteVo.setImgUrls(imgUrlList);
+        //填充关联话题
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
+        tourTravelNotesTopicRelation.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList =
+                tourTravelNotesTopicRelationService.getTourTravelNotesTopicRelationList(tourTravelNotesTopicRelation, "");
+        List<String> topicNameList = tourTravelNotesTopicRelationList.stream().map(TourTravelNotesTopicRelation::getTopicName).collect(Collectors.toList());
+        tourismProjectTravelNotesWriteVo.setTopics(topicNameList);
+        tourismProjectTravelNotesWriteVo.setTopicsList(BeanUtil.copyToList(tourTravelNotesTopicRelationList, NotesNameVo.class));
+        //填充提及的用户
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = new TourTravelNotesMentionUser();
+        tourTravelNotesMentionUser.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList = tourTravelNotesMentionUserService.getTourTravelNotesMentionUserList(tourTravelNotesMentionUser, "");
+        List<TourTravelNotesMentionUserVo> tourTravelNotesMentionUserVo = MyModelUtil.copyCollectionTo(tourTravelNotesMentionUserList, TourTravelNotesMentionUserVo.class);
+        tourismProjectTravelNotesWriteVo.setMentions(tourTravelNotesMentionUserVo);
+        //填充关联用户
         return ResponseResult.success(tourismProjectTravelNotesWriteVo);
     }
 
@@ -218,8 +217,7 @@ public class WebSiteTourismTravelNotesPublishController {
                 return ResponseResult.error(ErrorCodeEnum.DATA_NOT_FOUND);
             }
         }
-        tourismProjectTravelNotesWriteService.remove(Long.valueOf(writeId));
-        tourismTravelNotesContentWriteService.removeByAssociationId(Long.valueOf(writeId));
+        tourTravelNotesPublishService.removeByDraftId(writeId);
         return ResponseResult.success();
     }
 
@@ -232,92 +230,35 @@ public class WebSiteTourismTravelNotesPublishController {
     @PostMapping("/publishDraft")
     @Transactional
     public ResponseResult<Void> publishDraft(@RequestBody TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto) {
-        String errorMessage = MyCommonUtil.getModelValidationError(tourismProjectTravelNotesWriteDto,UpdateGroup.class);
-        if (errorMessage != null) {
-            return ResponseResult.success(null);
-        }
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
-                MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);
-
-        //校验该游记是否为审核中和已发布状态
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteVerify =
-                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
-
-        if(tourismProjectTravelNotesWriteVerify != null){
-            if(tourismProjectTravelNotesWriteVerify.getState() .equals(AuditState.UNAUDITSTATE)) {
-                return ResponseResult.error(ErrorCodeEnum.INVALID_STATUS_ARGUMENT, "该游记状态为:正在审核中,请撤销后进行操作");
-            }else if(tourismProjectTravelNotesWriteVerify.getState() .equals(AuditState.SUCCEEDAUDIT)){
-                return ResponseResult.error(ErrorCodeEnum.INVALID_STATUS_ARGUMENT, "该游记状态为:已发布成功,请下架后进行操作");
-            }
-        }
-        //将从表中的数据进行过滤,筛选出cover为1的图片为封面图,第一段落为项目简述
-        List<TourismTravelNotesContentWriteDto> travelNotesContent = tourismProjectTravelNotesWriteDto.getTravelNotesContent();
 
-        //循环遍历查询内容是否超过5000长度
-        for(TourismTravelNotesContentWriteDto i:travelNotesContent){
-            if(StringUtils.isNotBlank(i.getContent()) && i.getContent().length()>5000)
-                return ResponseResult.error(ErrorCodeEnum.CONTENT_OUT_LIMIT);
-        }
-        List<TourismTravelNotesContentWriteDto> coverImageList = travelNotesContent.stream().filter(item -> item.getType().equals("image") && item.getCover() != null && item.getCover() == 1).collect(Collectors.toList());
-        List<TourismTravelNotesContentWriteDto> coverImageList1 = travelNotesContent.stream().filter(item -> item.getType().equals("image")).collect(Collectors.toList());
-        if(CollectionUtils.isEmpty(coverImageList)){
-            if(CollectionUtils.isEmpty(coverImageList1)){
-                return ResponseResult.error(ErrorCodeEnum.NOT_COVER);
-            }else {
-                tourismProjectTravelNotesWrite.setTourismUrl(coverImageList1.get(0).getContent());
-            }
-        }else{
-            tourismProjectTravelNotesWrite.setTourismUrl(coverImageList.get(0).getContent());
-        }
-        List<TourismTravelNotesContentWriteDto> sectionContent = travelNotesContent.stream().filter(item -> item.getType().equals("sectionContent")).collect(Collectors.toList());
-        if(CollectionUtils.isNotEmpty(sectionContent)){
-            tourismProjectTravelNotesWrite.setRemarks(sectionContent.get(0).getContent());
-        }
-
-        // 文案审核
-        List<String> imageList = travelNotesContent.stream().filter(e -> e.getType().equals("image")).map(TourismTravelNotesContentWriteDto::getContent).collect(Collectors.toList());
-        imageList.add(tourismProjectTravelNotesWrite.getTravelNotesBanner());
-        Boolean imageResult = huaweiCloudModerationService.runImageModeration(imageList);
-        // 图片审核
-        List<String> titleList = travelNotesContent.stream().filter(e -> e.getType().equals("sectionTitle")).map(TourismTravelNotesContentWriteDto::getContent).collect(Collectors.toList());
-        List<String> contentList = travelNotesContent.stream().filter(e -> e.getType().equals("sectionContent")).map(TourismTravelNotesContentWriteDto::getContent).collect(Collectors.toList());
-        titleList.addAll(contentList);
-        Boolean textResult = huaweiCloudModerationService.runTextModeration(titleList);
-        String auditReson = "";
-        if(imageResult && textResult){
-            tourismProjectTravelNotesWrite.setAutoAuditStatus(1);
-            auditReson = "图文审核通过";
-        }else {
-            tourismProjectTravelNotesWrite.setAutoAuditStatus(2);
-            if(!imageResult){
-                auditReson = "图片审核未通过:可能设计暴恐、色情、违禁、辱骂等内容;";
-            }
-            if(!textResult){
-                auditReson += "文案审核未通过:可能设计暴恐、色情、违禁、辱骂等内容;";
+        Long userId = TokenData.takeFromRequest().getUserId();
+        //先校验提及的用户id是否符合互关的状态
+        if(CollectionUtils.isNotEmpty(tourismProjectTravelNotesWriteDto.getMentions())) {
+            List<TourTravelNotesMentionUserDto> mentions = tourismProjectTravelNotesWriteDto.getMentions();
+            Set<TourTravelNotesMentionUserDto> mentionsUserIdList = mentions.stream().filter(item -> item.getUserId() != null).collect(Collectors.toSet());
+            List<TourShortUser> fouceEachFriendsByName = tourFansService.getFouceEachFriendsByName(userId, "");
+            List<TourShortUser> fouceEachFriedsUserIdList = fouceEachFriendsByName.stream().filter(i -> i.getUserId() != null).collect(Collectors.toList());
+
+            Map<Long, String> fouceEachFriendsUserIdMap = fouceEachFriedsUserIdList.stream().collect(Collectors.toMap(TourShortUser::getUserId, TourShortUser::getShowName));
+            Map<Long, String> mentionsUserIdMap = mentionsUserIdList.stream().collect(Collectors.toMap(TourTravelNotesMentionUserDto::getUserId, TourTravelNotesMentionUserDto::getUserName));
+
+            // 遍历 mentionsUserIdMap,检查其所有键值对是否都在 fouceEachFriendsUserIdMap 中
+            for (Map.Entry<Long, String> entry : mentionsUserIdMap.entrySet()) {
+                // 如果 fouceEachFriendsUserIdMap 不包含该 userId 或者值不相等,则返回 false
+                if (!fouceEachFriendsUserIdMap.containsKey(entry.getKey()) || !fouceEachFriendsUserIdMap.get(entry.getKey()).equals(entry.getValue())) {
+                    return ResponseResult.error(ErrorCodeEnum.MENTION_USER_ERROR, "提及的用户与本人不符合互关的状态");
+                }
             }
         }
-        tourismProjectTravelNotesWrite.setAutoRejectReason(auditReson);
-
-        tourismProjectTravelNotesWrite.setState(AuditState.UNAUDITSTATE);
-        //对dto的id进行判断,如果数据表中查不到该id,则为新增;否则为修改
-        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite1 =
-                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
-        if(tourismProjectTravelNotesWrite1 == null) {
-            tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWrite);
-        }else{
-            if(!tourismProjectTravelNotesWrite1.getCreateUserId().equals(TokenData.takeFromRequest().getUserId())){
-                return ResponseResult.error(ErrorCodeEnum.DATA_SAVE_FAILED);
+        //校验dto中的群聊是否为本人参与的群聊
+        if(tourismProjectTravelNotesWriteDto.getTourImGroupId() != null) {
+            List<TourShortImGroup> takePartImGroupListByName = tourImGroupService.getTakePartImGroupListByName(userId, "");
+            List<Long> takePartImGroupIdList = takePartImGroupListByName.stream().mapToLong(TourShortImGroup::getId).boxed().collect(Collectors.toList());
+            if (!takePartImGroupIdList.contains(tourismProjectTravelNotesWriteDto.getTourImGroupId())) {
+                return ResponseResult.error(ErrorCodeEnum.MENTION_GROUP_ERROR, "本人未参与到关联的群聊中");
             }
-            tourismProjectTravelNotesWriteService.updateById(tourismProjectTravelNotesWrite);
-        }
-        tourismTravelNotesContentWriteService.removeByAssociationId(tourismProjectTravelNotesWriteDto.getId());
-        List<TourismTravelNotesContentWrite> tourismTravelNotesContentWriteList =
-                MyModelUtil.copyCollectionTo(tourismProjectTravelNotesWriteDto.getTravelNotesContent(), TourismTravelNotesContentWrite.class);
-        for (TourismTravelNotesContentWrite item : tourismTravelNotesContentWriteList) {
-            item.setAssociationId(tourismProjectTravelNotesWrite.getId());
-            item.setId(null);
         }
-        tourismTravelNotesContentWriteService.saveNewBatch(tourismTravelNotesContentWriteList);
+        tourTravelNotesPublishService.publishDraft(tourismProjectTravelNotesWriteDto);
         return ResponseResult.success();
     }
 
@@ -485,6 +426,118 @@ public class WebSiteTourismTravelNotesPublishController {
         return ResponseResult.success(newDirectoryInfoList);
     }
 
+    /**
+     * 根据名称查询互关的好友信息
+     *
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/getFouceEachFriendsByName")
+    public ResponseResult<List<TourShortUserVo>> getFouceEachFriendsByName(@Validated TourFourceEachFriendsDto tourFourceEachFriendsDto) {
+        //limit20
+        PageMethod.startPage(tourFourceEachFriendsDto.getPageNum(), tourFourceEachFriendsDto.getPageSize(), true);
+        Long userId = TokenData.takeFromRequest().getUserId();
+        List<TourShortUser> tourShortUserList = tourFansService.getFouceEachFriendsByName(userId, tourFourceEachFriendsDto.getName());
+        List<TourShortUserVo> tourShortUserVoList = MyModelUtil.copyCollectionTo(tourShortUserList, TourShortUserVo.class);
+        return ResponseResult.success(tourShortUserVoList);
+    }
+
+    /**
+     * 模糊搜索话题列表
+     *
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/getTopicListByName")
+    public ResponseResult<List<TourTravelNotesTopicVo>> getTopicListByName(@Validated TourTravelNotesTopicByNameDto tourTravelNotesTopicByNameDto) {
+        //limit20
+        PageMethod.startPage(tourTravelNotesTopicByNameDto.getPageNum(), tourTravelNotesTopicByNameDto.getPageSize(), true);
+        TourTravelNotesTopic tourTravelNotesTopic = new TourTravelNotesTopic();
+        tourTravelNotesTopic.setName(tourTravelNotesTopicByNameDto.getName());
+        MyOrderParam myOrderParam = new MyOrderParam();
+        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourTravelNotesTopic.class);
+        myOrderParam.add(new MyOrderParam.OrderInfo("hotValue", false, null));
+        List<TourTravelNotesTopic> tourTravelNotesTopicList = tourTravelNotesTopicService.getTourTravelNotesTopicList(tourTravelNotesTopic,orderBy);
+        List<TourTravelNotesTopicVo> tourTravelNotesTopicVoList = MyModelUtil.copyCollectionTo(tourTravelNotesTopicList, TourTravelNotesTopicVo.class);
+        //专题ids
+        List<Long> topicIdList = tourTravelNotesTopicVoList.stream().map(TourTravelNotesTopicVo::getId).map(Long::valueOf).collect(Collectors.toList());
+        Map<Long, Integer> viewCountListTopicByName;
+        if(!topicIdList.isEmpty()){
+            viewCountListTopicByName= tourTravelNotesTopicService.getViewCountListTopicByName(topicIdList);
+        } else {
+            viewCountListTopicByName = new HashMap<Long, Integer>();
+        }
+
+        //放入浏览量的数值
+        if(!ObjectUtil.isEmpty(viewCountListTopicByName)){
+            for (TourTravelNotesTopicVo item : tourTravelNotesTopicVoList) {
+                item.setViewCount(viewCountListTopicByName.get(Long.valueOf(item.getId())));
+            }
+        }
+        if(tourTravelNotesTopicByNameDto.getName()!=null&&!tourTravelNotesTopicByNameDto.getName().isEmpty()){
+            List<TourTravelNotesTopicVo> collect = tourTravelNotesTopicVoList.stream().filter(item -> item.getName().equals(tourTravelNotesTopicByNameDto.getName())).collect(Collectors.toList());
+            if(collect.isEmpty()){
+                TourTravelNotesTopicVo tourTravelNotesTopicVo = new TourTravelNotesTopicVo();
+                tourTravelNotesTopicVo.setName(tourTravelNotesTopicByNameDto.getName());
+                tourTravelNotesTopicVoList.add(0,tourTravelNotesTopicVo);
+            }
+        }
+
+        return ResponseResult.success(tourTravelNotesTopicVoList);
+    }
+
+    /**
+     * 模糊搜索自己参与的群聊列表
+     *
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/getTakePartImGroupListByName")
+    public ResponseResult<List<TourShortImGroupVo>> getTakePartImGroupListByName(@Validated TourTakePartImGroupDto tourTakePartImGroupDto) {
+        //limit20
+        PageMethod.startPage(tourTakePartImGroupDto.getPageNum(), tourTakePartImGroupDto.getPageSize(), true);
+        Long localUserId = TokenData.takeFromRequest().getUserId();
+        List<TourShortImGroup> takePartImGroupListByName = tourImGroupService.getTakePartImGroupListByName(localUserId,tourTakePartImGroupDto.getName());
+
+        //根据群聊id,填充每个群聊的人数以及每个群聊的头像
+        Set<Long> set = new HashSet();
+        set.addAll(takePartImGroupListByName.stream()
+                .filter(t -> t.getId() != null)  // 过滤掉 id 为 null 的元素
+                .map(TourShortImGroup::getId)    // 提取 id
+                .collect(Collectors.toSet()));
+
+        //查询群聊中有哪些群成员id
+        List<TourImMember> tourImMemberList = tourImMemberService.getInList("groupId", set);
+        // 根据群 ID 对群成员进行分组,并且每个群组最多取前 9 个成员
+        Map<Long, List<TourImMember>> groupedMembers = tourImMemberList.stream()
+                .collect(Collectors.groupingBy(
+                        TourImMember::getGroupId,
+                        Collectors.collectingAndThen(
+                                Collectors.toList(),
+                                members -> members.stream().limit(9).collect(Collectors.toList())  // 限制每个群组的成员为前 9 个
+                        )
+                ));
+        // 提取 userId 并去重
+        Set<Long> uniqueUserIds = tourImMemberList.stream().map(TourImMember::getUserId).collect(Collectors.toSet());  // 使用 Set 自动去重
+        // 根据userId获取用户头像
+        List<TourUser> userIdList = tourUserService.getInList("userId", uniqueUserIds);
+        // 使用 Stream 提取 userId 和 headImageUrl,生成 Map
+        Map<Long, String> userHeadImageMap = userIdList.stream()
+                .collect(Collectors.toMap(TourUser::getUserId, TourUser::getHeadImageUrl));
+        //根据群成员id来查询群成员的头像
+        for(TourShortImGroup i:takePartImGroupListByName){
+                i.setCount(tourImMemberList.stream().filter(e -> e.getGroupId().equals(i.getId())).collect(Collectors.toList()).size());
+            if(StringUtils.isBlank(i.getGroupAvatarUrl())){
+                //没有设置头像,则进行拼头像
+                List<TourImMember> tourImMembers = groupedMembers.get(i.getId());
+                List<String> avatarUrls = tourImMembers.stream().map(TourImMember::getUserId).map(userId -> userHeadImageMap.get(userId)).collect(Collectors.toList());
+                i.setMemberHeadImg(avatarUrls);
+            }
+        }
+
+        List<TourShortImGroupVo> tourShortImGroupVo = MyModelUtil.copyCollectionTo(takePartImGroupListByName, TourShortImGroupVo.class);
+        return ResponseResult.success(tourShortImGroupVo);
+    }
 
 
 }

+ 62 - 4
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteTourismProjectTravelNotesController.java

@@ -1,6 +1,7 @@
 package com.tourism.webadmin.app.website.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.github.pagehelper.page.PageMethod;
 import com.tourism.common.additional.config.ApplicationConfig;
 import com.tourism.common.additional.utils.UrlConvertUtils;
@@ -22,7 +23,6 @@ import com.tourism.webadmin.app.website.dto.TourismTravelNotesWriteDto;
 import com.tourism.webadmin.app.website.service.BasicToWebService;
 import com.tourism.webadmin.app.website.vo.TourTravelNotesDirectoryCountryVo;
 import com.tourism.webadmin.app.website.vo.TourTravelNotesDirectoryVo;
-import com.tourism.webadmin.app.website.vo.TourismProjectTravelNotesWriteCovertVo;
 import com.tourism.webadmin.back.model.*;
 import com.tourism.webadmin.back.model.constant.NoticeType;
 import com.tourism.webadmin.back.model.constant.UnmountState;
@@ -36,9 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Tag(name = "门户网站旅游游记接口")
@@ -64,6 +62,8 @@ public class WebsiteTourismProjectTravelNotesController {
     private TourUserLikeTravelNotesService tourUserLikeTravelNotesService;
     @Autowired
     private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
+    @Autowired
+    private TourTourismProjectSearchRecordsService tourTourismSearchRecordsService;
 
 
     /**
@@ -106,9 +106,21 @@ public class WebsiteTourismProjectTravelNotesController {
         if(vo != null) {
             vo.setContactCodeConvert("https://v.xiaoyaotravel.com/image/ContactQRCode/tourism.png");
         }
+        if(vo!=null&&vo.getTourImGroup()!=null&&vo.getTourImGroup().getBelongTypeId()!=null){
+            vo.setType((TourImGroupType)vo.getTourImGroup().getBelongTypeIdDictMap().get(vo.getTourImGroup().getBelongTypeId()));
+        }
+
         return ResponseResult.success(vo);
     }
 
+    /**查询游记的收藏数量*/
+    @GetMapping("/getCollectCount")
+    public ResponseResult<String> getCollectCount(@RequestParam String id){
+        TourUserLikeTravelNotes tourUserLikeTravelNotes = new TourUserLikeTravelNotes();
+        tourUserLikeTravelNotes.setTravelNotesId(Long.valueOf(id));
+        long countByFilter = tourUserLikeTravelNotesService.getCountByFilter(tourUserLikeTravelNotes);
+        return ResponseResult.success(countByFilter+"");
+    }
     /**
      * 用户游记收藏
      * param travelNotesId 游记id
@@ -307,4 +319,50 @@ public class WebsiteTourismProjectTravelNotesController {
         Integer likeCount = writeDto.getLikeCount() == null ? 0 : writeDto.getLikeCount();
         return ResponseResult.success(likeCount);
     }
+
+    /**
+     * 通过模糊查询旅游游记列表。(游记页)
+     * @param tourismTravelNotesWriteDto 参数
+     * @return 结果
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/travelNotesPageListBySearch")
+    public ResponseResult<MyPageData<TourismProjectTravelNotesWriteVo>> travelNotesPageListBySearch(TourismTravelNotesWriteDto tourismTravelNotesWriteDto) {
+//        TokenData tokenData = new TokenData();
+//        tokenData.setUserId(4L);
+//        TokenData.addToRequest(tokenData);
+        Long userId = TokenData.takeFromRequest().getUserId();
+        String searchString = tourismTravelNotesWriteDto.getSearchString();
+        //搜索内容不为空时记录
+        if (MyCommonUtil.isNotBlankOrNull(searchString)){
+            //查询用户搜索记录
+            TourTourismProjectSearchRecords rawTourTourismSearchRecords = tourTourismSearchRecordsService
+                    .getOne(new LambdaQueryWrapper<TourTourismProjectSearchRecords>()
+                            .eq(TourTourismProjectSearchRecords::getSearchKeyword, searchString)
+                            .eq(TourTourismProjectSearchRecords::getSearchType,0)   //0游记列表1话题列表
+                            .eq(TourTourismProjectSearchRecords::getCreateUserId, userId));
+            //已存搜索记录在数量进行自增1
+            if (Objects.nonNull(rawTourTourismSearchRecords)){
+                rawTourTourismSearchRecords.setSearchResultCount(rawTourTourismSearchRecords.getSearchResultCount()+1);
+                rawTourTourismSearchRecords.setSearchTime(new Date());
+                rawTourTourismSearchRecords.setUpdateTime(new Date());
+                tourTourismSearchRecordsService.updateById(rawTourTourismSearchRecords);
+            }else{  //不存在搜索记录则进行插入
+                TourTourismProjectSearchRecords tourTourismSearchRecords = new TourTourismProjectSearchRecords();
+                tourTourismSearchRecords.setSearchKeyword(searchString);
+                //搜索次数初始为1
+                tourTourismSearchRecords.setSearchResultCount(1);
+                //0游记列表1话题列表
+                tourTourismSearchRecords.setSearchType(0);
+                tourTourismSearchRecords.setSearchTime(new Date());
+                tourTourismSearchRecordsService.saveNew(tourTourismSearchRecords);
+            }
+
+        }
+        MyPageData<TourismProjectTravelNotesWriteVo> tourTourismProjectTravelNotesList = basicToWebServicel.getTravelNotesPageList(tourismTravelNotesWriteDto);
+
+        return ResponseResult.success(tourTourismProjectTravelNotesList);
+    }
+
+
 }

+ 30 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourFourceEachFriendsDto.java

@@ -0,0 +1,30 @@
+package com.tourism.webadmin.app.website.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Schema(description = "获取互关好友Dto")
+@Data
+public class TourFourceEachFriendsDto {
+
+    /**
+     * 分页号码,从1开始计数。
+     */
+    @Schema(description = "分页号码。")
+    @NotNull(message = "分页号码不能为空,请提供有效的 pageSize 参数")
+    private Integer pageNum;
+
+    /**
+     * 每页大小。
+     */
+    @Schema(description = "每页大小。")
+    @NotNull(message = "每页大小不能为空,请提供有效的 pageSize 参数")
+    private Integer pageSize;
+
+    /**
+     * 名称。
+     */
+    @Schema(description = "名称。")
+    private String name;
+}

+ 30 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTakePartImGroupDto.java

@@ -0,0 +1,30 @@
+package com.tourism.webadmin.app.website.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Schema(description = "获取参与的群聊Dto")
+@Data
+public class TourTakePartImGroupDto {
+
+    /**
+     * 分页号码,从1开始计数。
+     */
+    @Schema(description = "分页号码。")
+    @NotNull(message = "分页号码不能为空,请提供有效的 pageSize 参数")
+    private Integer pageNum;
+
+    /**
+     * 每页大小。
+     */
+    @Schema(description = "每页大小。")
+    @NotNull(message = "每页大小不能为空,请提供有效的 pageSize 参数")
+    private Integer pageSize;
+
+    /**
+     * 名称。
+     */
+    @Schema(description = "名称。")
+    private String name;
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTourismProjectSearchRecordsDto.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.app.website.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Schema(description = "历史搜索记录Dto")
+@Data
+public class TourTourismProjectSearchRecordsDto{
+
+
+	@Schema(description = "搜索类型(0游记列表1话题列表)")
+	@NotNull(message = "搜索类型不能为空")
+	private Integer searchType;
+
+	/**
+	 * 分页号码,从1开始计数。
+	 */
+	@Schema(description = "分页号码。")
+	private Integer pageNum;
+
+	/**
+	 * 每页大小。
+	 */
+	@Schema(description = "每页大小。")
+	private Integer pageSize;
+
+	/**
+	 * 是否统计totalCount。
+	 */
+	@Schema(description = "是否统计totalCount。")
+	private Boolean count;
+}

+ 30 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTravelNotesTopicByNameDto.java

@@ -0,0 +1,30 @@
+package com.tourism.webadmin.app.website.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Schema(description = "获取话题Dto")
+@Data
+public class TourTravelNotesTopicByNameDto {
+
+    /**
+     * 分页号码,从1开始计数。
+     */
+    @Schema(description = "分页号码。")
+    @NotNull(message = "分页号码不能为空,请提供有效的 pageSize 参数")
+    private Integer pageNum;
+
+    /**
+     * 每页大小。
+     */
+    @Schema(description = "每页大小。")
+    @NotNull(message = "每页大小不能为空,请提供有效的 pageSize 参数")
+    private Integer pageSize;
+
+    /**
+     * 名称。
+     */
+    @Schema(description = "名称。")
+    private String name;
+}

+ 45 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourTravelNotesTopicListByNameDto.java

@@ -0,0 +1,45 @@
+package com.tourism.webadmin.app.website.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Schema(description = "根据话题获取游记列表Dto")
+@Data
+public class TourTravelNotesTopicListByNameDto {
+
+    /**
+     * 分页号码,从1开始计数。
+     */
+    @Schema(description = "分页号码。")
+    @NotNull(message = "分页号码不能为空,请提供有效的 pageSize 参数")
+    private Integer pageNum;
+
+    /**
+     * 每页大小。
+     */
+    @Schema(description = "每页大小。")
+    @NotNull(message = "每页大小不能为空,请提供有效的 pageSize 参数")
+    private Integer pageSize;
+
+    /**
+     * 名称。
+     */
+    @Schema(description = "名称。")
+    @NotNull(message = "话题名称不能为空,请提供有效的 name 参数")
+    private String topicName;
+
+    /**
+     * 排序。不传值或者传0的话,按最热排序;传1的话,则按照最新排序
+     */
+    @Schema(description = "排序。")
+    private String orderBy;
+
+    /**
+     * 标题名称。模糊查询
+     */
+    @Schema(description = "标题名称。模糊查询")
+    private String titleName;
+
+
+}

+ 35 - 2
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismProjectTravelNotesWriteToWebDto.java

@@ -1,7 +1,10 @@
 package com.tourism.webadmin.app.website.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.tourism.common.core.validator.ConstDictRef;
 import com.tourism.common.core.validator.UpdateGroup;
+import com.tourism.webadmin.back.dto.TourTourismProjectTravelNotesWriteContentDto;
+import com.tourism.webadmin.back.dto.TourTravelNotesMentionUserDto;
 import com.tourism.webadmin.back.dto.TourismTravelNotesContentWriteDto;
 import com.tourism.webadmin.back.model.constant.*;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -10,6 +13,7 @@ import lombok.Data;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发布游记Dto对象。
@@ -215,8 +219,7 @@ public class TourismProjectTravelNotesWriteToWebDto {
      * 游记内容。
      */
     @Schema(description = "游记内容。")
-//    @NotNull(message = "游记内容不能为空!", groups = {UpdateGroup.class})
-    private List<TourismTravelNotesContentWriteDto> travelNotesContent;
+    private TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDto;
 
     /**
      * 出行方式。
@@ -230,4 +233,34 @@ public class TourismProjectTravelNotesWriteToWebDto {
      */
     @Schema(description = "游玩人数。")
     private String travelNumber;
+
+    /**
+     * 上传的图片集。
+     */
+    @Schema(description = "上传的图片集。")
+    private List<String> imgUrls;
+
+    /**
+     * 游记内容提及的用户信息。
+     */
+    @Schema(description = "游记内容提及的用户信息。")
+    private List<TourTravelNotesMentionUserDto> mentions;
+
+    /**
+     * 游记内容提及的话题名称。
+     */
+    @Schema(description = "游记内容提及的话题名称。")
+    private List<Map<String, String>> topics;
+
+    /**
+     * 群聊id。
+     */
+    @Schema(description = "群聊id。")
+    private Long tourImGroupId;
+
+    /**
+     * 可见范围(0.全部可见;1.仅自己可见)。
+     */
+    @Schema(description = "可见范围(0.全部可见;1.仅自己可见)。")
+    private Integer visibleRange;
 }

+ 9 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TourismTravelNotesWriteDto.java

@@ -81,8 +81,16 @@ public class TourismTravelNotesWriteDto {
     private String searchString;
 
     /**
-     * 游记类型(0全部;1原创)。
+     * 游记类型(0全部;1原创 2 非原创)。
      */
     private Integer travelWriteType;
 
+    /**
+     * 项目标题。
+     */
+    @Schema(description = "项目标题。")
+    private String projectTitle;
+
+    @Schema(description = "是否查询关注用户的游记。1 关注")
+    private String isFollow;
 }

+ 14 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TravelNotesByStateDto.java

@@ -0,0 +1,14 @@
+package com.tourism.webadmin.app.website.dto;
+
+import lombok.Data;
+
+@Data
+public class TravelNotesByStateDto {
+    /**每页大小*/
+    private Integer pageSize;
+    /**页码*/
+    private Integer pageNum;
+    /**状态 0,草稿;1,待审核;2,审核不通过;3,审核通过;*/
+    private Integer state;
+
+}

+ 11 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/TravelToTopDto.java

@@ -0,0 +1,11 @@
+package com.tourism.webadmin.app.website.dto;
+
+import lombok.Data;
+
+@Data
+public class TravelToTopDto {
+    /**游记ID*/
+    private String id;
+    /**是否置顶 0 否 1 是*/
+    private String isTop;
+}

+ 2 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/dto/WebsiteTourUserDto.java

@@ -65,5 +65,6 @@ public class WebsiteTourUserDto {
      */
     private String personalSign;
 
-
+    /**背景图*/
+    private String backgroundImage;
 }

+ 43 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/model/TourShortImGroup.java

@@ -0,0 +1,43 @@
+package com.tourism.webadmin.app.website.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@TableName(value = "tour_im_group")
+public class TourShortImGroup {
+    /**
+     * 群聊id。
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 群聊名称。
+     */
+    @TableId(value = "group_name")
+    private String groupName;
+
+    /**
+     * 群聊头像。
+     */
+    @TableId(value = "group_avatar")
+    private String groupAvatarUrl;
+
+    /**
+     * 群成员人数。
+     */
+    @TableField(exist = false)
+    private Integer count;
+
+    /**
+     * 群成员头像。
+     */
+    @TableField(exist = false)
+    private List<String> memberHeadImg;
+}

+ 29 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/model/TourShortUser.java

@@ -0,0 +1,29 @@
+package com.tourism.webadmin.app.website.model;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@TableName(value = "tour_user")
+public class TourShortUser {
+    /**
+     * 主键Id。
+     */
+    @TableId(value = "user_id")
+    private Long userId;
+
+    /**
+     * 昵称。
+     */
+    @TableId(value = "show_name")
+    private String showName;
+
+    /**
+     * 用户头像的Url。
+     */
+    @TableId(value = "head_image_url")
+    private String headImageUrl;
+}

+ 21 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/TourTravelNotesPublishService.java

@@ -0,0 +1,21 @@
+package com.tourism.webadmin.app.website.service;
+
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteDetailPageDto;
+import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteToWebDto;
+import com.tourism.webadmin.app.website.vo.HouseFilterListsVo;
+import com.tourism.webadmin.back.model.TourismProjectTravelNotesWrite;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+public interface TourTravelNotesPublishService {
+
+    void saveDraft(TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto);
+
+    void removeByDraftId(String writeId);
+
+    List<TourismProjectTravelNotesWrite> getDraftList(TourismProjectTravelNotesWriteDetailPageDto pageDto);
+
+    ResponseResult<Void> publishDraft(TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto);
+}

+ 36 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/TourismProjectSearchRecordsService.java

@@ -0,0 +1,36 @@
+package com.tourism.webadmin.app.website.service;
+
+
+import com.tourism.common.core.object.MyPageData;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.webadmin.app.website.dto.PageDto;
+import com.tourism.webadmin.app.website.dto.TourTourismProjectSearchRecordsDto;
+import com.tourism.webadmin.app.website.vo.TourismProjectSearchRecordsVo;
+
+import java.util.List;
+
+/**
+ * 游记列表搜索Service
+ */
+public interface TourismProjectSearchRecordsService {
+
+	/**
+	 * 用过游记搜索记录id删除记录
+	 * @param idString 搜索记录id
+	 * @return 结果
+	 */
+	ResponseResult<Void> removeProjectSearchRecordsById(String idString);
+
+	/**
+	 * 清空游记历史搜索记录
+	 * @return 结果
+	 */
+	ResponseResult<Void> clearProjectSearchRecords(String searchType);
+
+	/**
+	 * 获取游记搜索记录列表
+	 * @param pageDto 参数DTO对象
+	 * @return 结果
+	 */
+	ResponseResult<MyPageData<TourismProjectSearchRecordsVo>> getSearchRecordList(TourTourismProjectSearchRecordsDto tourTourismProjectSearchRecordsDto);
+}

+ 226 - 19
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/BasicToWebServiceImpl.java

@@ -1,38 +1,46 @@
 package com.tourism.webadmin.app.website.service.impl;
 
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
 import com.github.pagehelper.page.PageMethod;
 import com.tourism.common.additional.utils.StringUtils;
 import com.tourism.common.additional.utils.UrlConvertUtils;
-import com.tourism.common.core.object.MyOrderParam;
-import com.tourism.common.core.object.MyPageData;
-import com.tourism.common.core.object.MyRelationParam;
-import com.tourism.common.core.object.TokenData;
+import com.tourism.common.core.base.vo.BaseVo;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.MyCommonUtil;
 import com.tourism.common.core.util.MyModelUtil;
 import com.tourism.common.core.util.MyPageUtil;
+import com.tourism.common.huaweicloud.obs.util.MergeAvatarsFlexUtils;
+import com.tourism.webadmin.app.website.controller.TourGroupController;
+import com.tourism.webadmin.app.website.controller.TourWebFansController;
+import com.tourism.webadmin.app.website.dto.TourWebFansDto;
 import com.tourism.webadmin.app.website.dto.TourismBannerDto;
 import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesToWebDto;
 import com.tourism.webadmin.app.website.dto.TourismTravelNotesWriteDto;
 import com.tourism.webadmin.app.website.service.BasicToWebService;
+import com.tourism.webadmin.app.website.service.TourGroupService;
 import com.tourism.webadmin.back.model.*;
-import com.tourism.webadmin.back.model.constant.AuditState;
-import com.tourism.webadmin.back.model.constant.Hotspot;
-import com.tourism.webadmin.back.model.constant.TravelWriteType;
-import com.tourism.webadmin.back.model.constant.UnmountState;
+import com.tourism.webadmin.back.model.constant.*;
 import com.tourism.webadmin.back.service.*;
+import com.tourism.webadmin.back.service.impl.TourUserServiceImpl;
 import com.tourism.webadmin.back.vo.*;
 import com.tourism.common.additional.config.ApplicationConfig;
+import com.tourism.webadmin.enums.Constant;
+import com.tourism.webadmin.enums.MyAttentionStatus;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
  * 门户网站首页Service
- * 
+ *
  * @author tourism
  */
 @Slf4j
@@ -54,6 +62,26 @@ public class BasicToWebServiceImpl implements BasicToWebService
     private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
     @Autowired
     private TourBusinessBannerService tourBusinessBannerService;
+    @Autowired
+    private TourTravelNotesImgService tourTravelNotesImgService;
+    @Autowired
+    private TourImMemberService tourImMemberService;
+    @Autowired
+    private TourUserServiceImpl tourUserService;
+    @Autowired
+    private MergeAvatarsFlexUtils mergeAvatarsFlexUtils;
+    @Autowired
+    private TourGroupService tourGroupService;
+    @Autowired
+    private TourImGroupTypeService tourImGroupTypeService;
+    @Autowired
+    private TourWebFansController tourWebFansController;
+    @Autowired
+    private TourGroupController tourGroupController;
+    @Autowired
+    private TourismTravelNotesContentWriteService tourismTravelNotesContentWriteService;
+
+
 
     @Override
     public MyPageData<BannerInfoVo> getBannerInfoList(TourismBannerDto tourismBannerDto) {
@@ -138,6 +166,8 @@ public class BasicToWebServiceImpl implements BasicToWebService
         tourismProjectTravelNotesWriteFilter.setUnmountState(UnmountState.LISTING);
         tourismProjectTravelNotesWriteFilter.setIsHotspot(Hotspot.HOTSPOT_YES);
         tourismProjectTravelNotesWriteFilter.setState(AuditState.SUCCEEDAUDIT);
+        tourismProjectTravelNotesWriteFilter.setVisibleRange(VisibleRange.ALL);
+        tourismProjectTravelNotesWriteFilter.setProjectTitle(tourismTravelNotesWriteDto.getProjectTitle());
 //        TourTourismProjectTravelNotes tourTourismProjectTravelNotesFilter = new TourTourismProjectTravelNotes();
 //        tourTourismProjectTravelNotesFilter.setEnable(1);
 //        tourTourismProjectTravelNotesFilter.setIsHotspot(1);
@@ -163,19 +193,41 @@ public class BasicToWebServiceImpl implements BasicToWebService
     public MyPageData<TourismProjectTravelNotesWriteVo> getTravelNotesPageList(TourismTravelNotesWriteDto dto){
         //当belongTab为1的时候,则表明查询全部的游记
         MyOrderParam myOrderParam = new MyOrderParam();
-        myOrderParam.add(new MyOrderParam.OrderInfo("isHotspot",false,null));
+        myOrderParam.add(new MyOrderParam.OrderInfo("hotValue",false,null));
         myOrderParam.add(new MyOrderParam.OrderInfo("updateTime",false,null));
         String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourismProjectTravelNotesWrite.class);
 
         TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteFilter = new TourismProjectTravelNotesWrite();
+        tourismProjectTravelNotesWriteFilter.setVisibleRange(VisibleRange.ALL);
+        tourismProjectTravelNotesWriteFilter.setState(AuditState.SUCCEEDAUDIT);
+        tourismProjectTravelNotesWriteFilter.setProjectTitle(dto.getProjectTitle());
 //        TourTourismProjectTravelNotes tourTourismProjectTravelNotes = new TourTourismProjectTravelNotes();
 
+        if(dto.getIsFollow()!=null&&dto.getIsFollow().equals("1")){
+            //查询关注用户ids
+            ResponseResult<MyPageData<TourFansVo>> pageList = tourWebFansController.getMyConCern(new TourWebFansDto());
+            List<TourFansVo> dataList = pageList.getData().getDataList();
+            if(ObjectUtil.isEmpty(dataList)){
+                return  MyPageUtil.makeResponseData(new ArrayList<>(), 0L);
+            }
+            Set<String> collect = dataList.stream().map(TourFansVo::getAttentionId).collect(Collectors.toSet());
+            String userId = TokenData.takeFromRequest().getUserId().toString();
+            //排除自己
+            collect.remove(userId);
+            tourismProjectTravelNotesWriteFilter.setCreatUserIdFilter(collect);
+        }
         if(dto.getTravelWriteType() != null){
-            if(dto.getTravelWriteType().equals(TravelWriteType.ORIGINAL)){
+            if(dto.getTravelWriteType().equals(1)){
                //是否原创(0:非原创;1:原创)。
                 tourismProjectTravelNotesWriteFilter.setIsOriginal(1);
+            }else if(dto.getTravelWriteType().equals(2)){
+                tourismProjectTravelNotesWriteFilter.setIsOriginal(0);
             }
         }
+
+        if (MyCommonUtil.isNotBlankOrNull(dto.getSearchString())){
+            tourismProjectTravelNotesWriteFilter.setSearchString(dto.getSearchString());
+        }
         if(StringUtils.isEmpty(dto.getAreaId()) && StringUtils.isEmpty(dto.getCountryId())){
             //判断是否为全部的地区
             tourismProjectTravelNotesWriteFilter.setUnmountState(1);
@@ -201,12 +253,13 @@ public class BasicToWebServiceImpl implements BasicToWebService
         if(dto.getPageNum() != null && dto.getPageSize() != null) {
             PageMethod.startPage(dto.getPageNum(), dto.getPageSize(), true);
         }
-
+        if(ObjectUtil.isEmpty(dto.getIsHotspot())){
+            tourismProjectTravelNotesWriteFilter.setIsHotspot(dto.getIsHotspot());
+        }
 //        List<TourTourismProjectTravelNotes> tourTourismProjectTravelNotesList =
 //                tourTourismProjectTravelNotesService.getTourTourismProjectTravelNotesList(tourismProjectTravelNotesWriteFilter, orderBy);
         List<TourismProjectTravelNotesWrite> writeList =
                 tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteList(tourismProjectTravelNotesWriteFilter, orderBy);
-
         MyPageData<TourismProjectTravelNotesWriteVo> pageData =
                 MyPageUtil.makeResponseData(writeList, TourismProjectTravelNotesWriteVo.class);
 
@@ -216,12 +269,45 @@ public class BasicToWebServiceImpl implements BasicToWebService
             item.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
         });
 
+        //填充创建人和头像
+        Set<Long> collect = dataList.stream().map(BaseVo::getCreateUserId).collect(Collectors.toSet());
+        collect.add(Constant.BASE_TEST_USER_ID);
+        collect.add(Constant.BASE_FORMALLY_USER_ID);
+        List<TourUser> inList = tourUserService.getInList(collect);
+
+        HashMap<String, TourUser> userHashMap = new HashMap<>();
+        for (TourUser tourUser : inList) {
+            userHashMap.put(tourUser.getUserId().toString(),tourUser);
+        }
+        for (TourismProjectTravelNotesWriteVo vo :pageData.getDataList()) {
+            TourUser tourUser = userHashMap.get(vo.getCreateUserId().toString());
+            if(tourUser!=null){
+                vo.setCreateImage(tourUser.getHeadImageUrl());
+                vo.setCreateName(tourUser.getShowName());
+            }else {
+                TourUser tourUser1 = userHashMap.get(Constant.BASE_TEST_USER_ID.toString());
+                if(tourUser1==null){
+                    tourUser1=userHashMap.get(Constant.BASE_FORMALLY_USER_ID.toString());
+                }
+                vo.setCreateImage(tourUser1.getHeadImageUrl());
+                vo.setCreateName(tourUser1.getShowName());
+                vo.setCreateUser(tourUser1.getUserId().toString());
+            }
+        }
         return pageData;
     }
 
     @Override
     public TourismProjectTravelNotesWriteVo travelNotesDetail(String id){
         TourismProjectTravelNotesWrite writeDto = tourismProjectTravelNotesWriteService.getByIdWithRelation(Long.parseLong(id), MyRelationParam.full());
+        if(ObjectUtil.isEmpty(writeDto)){
+            return null;
+        }
+        if(writeDto.getTourImGroupId()!=null){
+            TourImGroup byId = tourGroupService.getById(writeDto.getTourImGroupId());
+            writeDto.setTourImGroup(byId);
+        }
+
         if(writeDto.getPageViewCount() != null) {
             writeDto.setPageViewCount(writeDto.getPageViewCount() + 1);
         }else {
@@ -237,11 +323,132 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         TourismProjectTravelNotesWriteVo writeVo =
                 MyModelUtil.copyTo(writeDto, TourismProjectTravelNotesWriteVo.class);
+        writeVo.setCreateUser(writeDto.getCreateUserId().toString());
+        writeVo.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTourismUrl()));
+        writeVo.setHomeHotPicturesAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTourismUrl()));
+        writeVo.setTravelNotesBannerAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTravelNotesBanner()));
+
+        DirectoryInfo directoryInfo = directoryInfoService.getById(writeVo.getEndPlace());
+        if(directoryInfo.getParentId() != null) {
+            DirectoryInfo directoryInfo1 = directoryInfoService.getById(directoryInfo.getParentId());
+            writeVo.setEndArea(directoryInfo1.getMenuName());
+        }
 
-        if(writeVo != null) {
-            writeVo.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTourismUrl()));
-            writeVo.setHomeHotPicturesAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTourismUrl()));
-            writeVo.setTravelNotesBannerAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), writeVo.getTravelNotesBanner()));
+        //查询关联的照片图集
+        TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+        tourTravelNotesImg.setTravelNotesId(Long.parseLong(writeVo.getId()));
+        List<TourTravelNotesImg> tourTravelNotesImgList = tourTravelNotesImgService.getTourTravelNotesImgList(tourTravelNotesImg, "");
+        List<String> imgUrls = tourTravelNotesImgList.stream().map(TourTravelNotesImg::getImgUrl).collect(Collectors.toList());
+        writeVo.setImgUrls(imgUrls);
+
+        //设置群聊信息
+        //如果群聊没有设置群聊头像的话,则进行拼接群聊头像
+        if(!ObjectUtil.isEmpty(writeDto.getTourImGroup())&&ObjectUtil.isEmpty(writeDto.getTourImGroup().getGroupAvatar()) && writeVo.getTourImGroupId() != null) {
+            TourImMember tourImMember = new TourImMember();
+            tourImMember.setGroupId(Long.parseLong(writeVo.getTourImGroupId()));
+            List<TourImMember> tourImMemberList = tourImMemberService.getTourImMemberList(tourImMember, "");
+            // 如果群聊为空的话,则该群聊是被解散了
+            if(!CollectionUtils.isEmpty(tourImMemberList)){
+                List<TourImMember> tourImMembers = new ArrayList<>();
+                if(tourImMemberList.size() > 9) {
+                    tourImMembers = tourImMemberList.subList(0, 9);
+                }else {
+                    tourImMembers = tourImMemberList.subList(0,tourImMemberList.size());
+                }
+                List<Long> userIdList = tourImMembers.stream().map(TourImMember::getUserId).collect(Collectors.toList());
+
+                List<TourUser> userList = tourUserService.getInList("userId", new HashSet<>(userIdList));
+                List<String> userHeadImgUrlList = userList.stream().map(TourUser::getHeadImageUrl).collect(Collectors.toList());
+                //设置群聊头像
+                writeVo.getTourImGroup().setGroupAvatar(mergeAvatarsFlexUtils.mergeAndUploadAvatars(userHeadImgUrlList));
+                //设置群聊人数
+                writeVo.setTourImGroupCount(tourImMemberList.size());
+                //群主
+                TourUser byId1 = tourUserService.getById( writeVo.getTourImGroup().getLeaderId());
+                //类型
+                if( writeVo.getTourImGroup().getBelongTypeId()!=null){
+                    TourImGroupType type = tourImGroupTypeService.getById( writeVo.getTourImGroup().getBelongTypeId());
+                    HashMap<String, Object> longObjectHashMap = new HashMap<>();
+                    longObjectHashMap.put(type.getId().toString(),type);
+                    writeVo.getTourImGroup().setBelongTypeIdDictMap(longObjectHashMap);
+                }
+                writeVo.setGroupOwnerName(byId1.getShowName());
+                writeVo.setGroupOwnerImage(byId1.getHeadImageUrl());
+                writeVo.setGroupOwnerId(byId1.getUserId().toString());
+            }
+        }
+        if (writeVo.getCreateUserId()!=null) {
+            TourUser creatUser = tourUserService.getById(writeDto.getCreateUserId());
+            if(creatUser!=null){
+                writeVo.setCreateImage(creatUser.getHeadImageUrl());
+                writeVo.setCreateName(creatUser.getShowName());
+                writeVo.setCreateUser(creatUser.getUserId().toString());
+            }else {
+                TourUser user = tourUserService.getById(Constant.BASE_TEST_USER_ID);
+                if(user==null){
+                    user = tourUserService.getById(Constant.BASE_FORMALLY_USER_ID);
+
+                }
+                writeVo.setCreateImage(user.getHeadImageUrl());
+                writeVo.setCreateName(user.getShowName());
+                writeVo.setCreateUser(user.getUserId().toString());
+
+            }
+            if(TokenData.takeFromRequest()!=null){
+                Long l = tourGroupController.attentionStatus(writeVo.getCreateUserId());
+                writeVo.setUserState(l.toString());
+                Long userId = TokenData.takeFromRequest().getUserId();
+
+                //是否收藏
+                List<TourUserLikeTravelNotes> list = tourUserLikeTravelNotesService.lambdaQuery()
+                        .eq(TourUserLikeTravelNotes::getTravelNotesId, writeVo.getId())
+                        .eq(TourUserLikeTravelNotes::getUserId, userId).list();
+                if (ObjectUtil.isEmpty(list)) {
+                    writeVo.setIsCollect(0);
+                } else {
+                    writeVo.setIsCollect(1);
+                }
+            }else {
+                writeVo.setIsCollect(0);
+                writeVo.setIsLike(0);
+                writeVo.setUserState(MyAttentionStatus.UN_FOCUS.toString());
+            }
+            //收藏数量
+            TourUserLikeTravelNotes tourUserLikeTravelNotes = new TourUserLikeTravelNotes();
+            tourUserLikeTravelNotes.setTravelNotesId(Long.valueOf(writeVo.getId()));
+            long countByFilter = tourUserLikeTravelNotesService.getCountByFilter(tourUserLikeTravelNotes);
+            writeVo.setCollectCount(countByFilter);
+        }
+        if(ObjectUtil.isEmpty(writeVo.getImgUrls())){
+            //图片
+            Set<String> image = writeVo.getTravelNotesContent().stream().filter(item ->
+                    !ObjectUtil.isEmpty(item.getType())&&item.getType().equals("image")
+            ).map(TourismTravelNotesContentWriteVo::getContent).collect(Collectors.toSet());
+            if(image.isEmpty()){
+                image.addAll(writeVo.getTravelNotesBannerAfterConvert());
+            }
+            writeVo.setImgUrls(new ArrayList<String>(image));
+            //图片
+            List<TourismTravelNotesContentWriteVo> collect = writeVo.getTravelNotesContent().stream().filter(item ->
+                    item.getType().equals("sectionContent")|| item.getType().equals("sectionTitle")
+            ).collect(Collectors.toList());
+            Map<String, Object> map=new HashMap<>();
+            StringBuilder content = new StringBuilder();
+            for (TourismTravelNotesContentWriteVo travelNotesContentWriteVo : collect) {
+                String s="";
+                if(travelNotesContentWriteVo.getType().equals("sectionContent")){
+                  s="<p>"+travelNotesContentWriteVo.getContent()+"</p>";
+
+                }else {
+                    s="<div class=\"py-15 text-5xl text-black-3\">"+travelNotesContentWriteVo.getContent()+"</div>";
+                }
+                content.append(s);
+            }
+            map.put("content",content.toString());
+            if(!collect.isEmpty()){
+                map.put("associationId",collect.get(0).getAssociationId());
+            }
+            writeVo.setTourTourismProjectTravelNotesWriteContent(map);
         }
         return writeVo;
     }

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourMemberImpl.java

@@ -91,7 +91,7 @@ public class TourMemberImpl extends ServiceImpl<TourImMemberMapper, TourImMember
                 groupId.put(tourImGroup.getId().toString(),tourImGroup);
             }
         }
-        //聊对应的用户
+        //聊对应的用户
         Map<String, Set<TourUser>> users = getUserByGroupId(collect);
         if(!ObjectUtil.isEmpty(users)){
             users.forEach((k, v) -> {

+ 398 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourTravelNotesPublishServiceImpl.java

@@ -0,0 +1,398 @@
+package com.tourism.webadmin.app.website.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.common.additional.utils.StringUtils;
+import com.tourism.common.core.constant.ErrorCodeEnum;
+import com.tourism.common.core.object.MyOrderParam;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.core.object.TokenData;
+import com.tourism.common.core.util.MyCommonUtil;
+import com.tourism.common.core.util.MyModelUtil;
+import com.tourism.common.core.validator.UpdateGroup;
+import com.tourism.common.sequence.wrapper.IdGeneratorWrapper;
+import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteDetailPageDto;
+import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesWriteToWebDto;
+import com.tourism.webadmin.app.website.service.TourTravelNotesPublishService;
+import com.tourism.webadmin.back.dto.TourTourismProjectTravelNotesWriteContentDto;
+import com.tourism.webadmin.back.dto.TourismTravelNotesContentWriteDto;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.model.constant.AuditState;
+import com.tourism.webadmin.back.model.constant.UnmountState;
+import com.tourism.webadmin.back.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.tourism.common.huaweicloud.moderation.service.HuaweiCloudModerationService;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service("TourTravelNotesPublishService")
+public class TourTravelNotesPublishServiceImpl implements TourTravelNotesPublishService {
+
+
+    @Autowired
+    private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
+    @Autowired
+    private TourismTravelNotesContentWriteService tourismTravelNotesContentWriteService;
+    @Autowired
+    private TourTravelNotesMentionUserService tourTravelNotesMentionUserService;
+    @Autowired
+    private TourTravelNotesTopicRelationService tourTravelNotesTopicRelationService;
+    @Autowired
+    private HuaweiCloudModerationService huaweiCloudModerationService;
+    @Autowired
+    private TourTravelNotesImgService tourTravelNotesImgService;
+    @Autowired
+    private TourTourismProjectTravelNotesWriteContentService tourTourismProjectTravelNotesWriteContentService;
+    @Autowired
+    private TourTravelNotesTopicService tourTravelNotesTopicService;
+    @Autowired
+    private IdGeneratorWrapper idGenerator;
+    @Override
+    @Transactional
+    public void saveDraft(TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto) {
+
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
+                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
+
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteSave =
+                MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);
+
+        //判断imgUrls是否为空,不为空的话,则把第一张图作为列表图
+        if (CollectionUtils.isNotEmpty(tourismProjectTravelNotesWriteDto.getImgUrls())) {
+            tourismProjectTravelNotesWriteSave.setTourismUrl(tourismProjectTravelNotesWriteDto.getImgUrls().get(0));
+        }
+
+        List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList = new ArrayList<>();
+        List<TourTravelNotesImg> tourTravelNotesImgList = new ArrayList<>();
+        //需要新增的话题
+        List<Map<String, String>> ls = tourismProjectTravelNotesWriteDto.getTopics().stream().filter(j -> ObjectUtil.isEmpty(j.get("id"))).collect(Collectors.toList());
+        ArrayList<TourTravelNotesTopic> objects = new ArrayList<>();
+        if(!ls.isEmpty()){
+            for (Map<String, String> l : ls) {
+                String s = l.get("name");
+                TourTravelNotesTopic tourTravelNotesTopic = new TourTravelNotesTopic();
+                tourTravelNotesTopic.setId(idGenerator.nextLongId());
+                tourTravelNotesTopic.setName(s);
+                tourTravelNotesTopic.setEnable(1);
+                tourTravelNotesTopic.setHotValue(0);
+                objects.add(tourTravelNotesTopic);
+            }
+            tourTravelNotesTopicService.saveNewBatch(objects);
+        }
+
+        List<String> topics = tourismProjectTravelNotesWriteDto.getTopics().stream().map(i->i.get("name")).collect(Collectors.toList());
+        List<TourTravelNotesTopic> lls = new ArrayList<>();
+        if(!topics.isEmpty()){
+            lls=tourTravelNotesTopicService.lambdaQuery().in(TourTravelNotesTopic::getName, topics).list();
+        }
+        //判断是新增还是更新
+        if (tourismProjectTravelNotesWrite == null) {
+            //新增
+            //草稿为下架状态
+            tourismProjectTravelNotesWriteSave.setUnmountState(UnmountState.DELIST);
+            TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteNew = tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWriteSave);
+
+            //对游记提及的关联用户信息进行关联游记id
+            tourismProjectTravelNotesWriteDto.getMentions().forEach(item -> {
+                item.setTravelNotesId(tourismProjectTravelNotesWriteNew.getId());
+            });
+
+            //对游记中提及的话题进行关联游记id
+            lls.forEach(j->{
+                TourTravelNotesTopicRelation tourTravelNotesTopicRelationNew = new TourTravelNotesTopicRelation();
+                tourTravelNotesTopicRelationNew.setTopicName(j.getName());
+                tourTravelNotesTopicRelationNew.setTopicId(j.getId());
+                tourTravelNotesTopicRelationNew.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+                tourTravelNotesTopicRelationList.add(tourTravelNotesTopicRelationNew);
+            });
+
+            if(!objects.isEmpty()){
+                for (TourTravelNotesTopic object : objects) {
+                    TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
+                    tourTravelNotesTopicRelation.setTopicName(object.getName());
+                    tourTravelNotesTopicRelation.setTopicId(object.getId());
+                    tourTravelNotesTopicRelation.setTravelNotesId(tourismProjectTravelNotesWriteNew.getId());
+                    tourTravelNotesTopicRelationList.add(tourTravelNotesTopicRelation);
+                }
+            }
+
+            //构建游记中的图片数据
+            tourismProjectTravelNotesWriteDto.getImgUrls().forEach(y->{
+                TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+                tourTravelNotesImg.setImgUrl(y);
+                tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWriteNew.getId());
+                tourTravelNotesImgList.add(tourTravelNotesImg);
+            });
+        } else {
+            //修改
+            //草稿为下架状态
+            tourismProjectTravelNotesWriteSave.setUnmountState(UnmountState.DELIST);
+            tourismProjectTravelNotesWriteService.updateById(tourismProjectTravelNotesWriteSave);
+            //对游记提及的关联用户信息进行关联游记id
+            tourismProjectTravelNotesWriteDto.getMentions().forEach(item -> {
+                item.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+            });
+            TourTravelNotesMentionUser tourTravelNotesMentionUser = new TourTravelNotesMentionUser();
+            tourTravelNotesMentionUser.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+            tourTravelNotesMentionUserService.removeBy(tourTravelNotesMentionUser);
+            //移除原来关联的话题
+            TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
+            tourTravelNotesTopicRelation.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+            tourTravelNotesTopicRelationService.removeBy(tourTravelNotesTopicRelation);
+
+            //对游记中提及的话题进行关联游记id
+            lls.forEach(j->{
+                TourTravelNotesTopicRelation tourTravelNotesTopicRelationNew = new TourTravelNotesTopicRelation();
+                tourTravelNotesTopicRelationNew.setTopicName(j.getName());
+                tourTravelNotesTopicRelationNew.setTopicId(j.getId());
+                tourTravelNotesTopicRelationNew.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+                tourTravelNotesTopicRelationList.add(tourTravelNotesTopicRelationNew);
+            });
+
+            //移除原来图片中的地址数据
+            TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+            tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+            tourTravelNotesImgService.removeBy(tourTravelNotesImg);
+
+            //构建现有的游记图片数据
+            tourismProjectTravelNotesWriteDto.getImgUrls().forEach(y->{
+                TourTravelNotesImg tourTravelNotesImgNew = new TourTravelNotesImg();
+                tourTravelNotesImgNew.setImgUrl(y);
+                tourTravelNotesImgNew.setTravelNotesId(tourismProjectTravelNotesWriteSave.getId());
+                tourTravelNotesImgList.add(tourTravelNotesImgNew);
+            });
+        }
+        //保存游记中提及的用户
+        List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList = MyModelUtil.copyCollectionTo(tourismProjectTravelNotesWriteDto.getMentions(), TourTravelNotesMentionUser.class);
+        tourTravelNotesMentionUserService.saveBatch(tourTravelNotesMentionUserList);
+        //保存游记中提及的话题
+        tourTravelNotesTopicRelationService.saveNewBatch(tourTravelNotesTopicRelationList);
+        //保存游记中的图片
+        tourTravelNotesImgService.saveNewBatch(tourTravelNotesImgList);
+
+        //判断内容是否为空
+        if (tourismProjectTravelNotesWriteDto.getTourTourismProjectTravelNotesWriteContentDto() != null) {
+            TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDto = 
+                    tourismProjectTravelNotesWriteDto.getTourTourismProjectTravelNotesWriteContentDto();
+            TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContent =
+                    MyModelUtil.copyTo(tourTourismProjectTravelNotesWriteContentDto, TourTourismProjectTravelNotesWriteContent.class);
+                tourTourismProjectTravelNotesWriteContent.setAssociationId(tourismProjectTravelNotesWriteSave.getId());
+            tourTourismProjectTravelNotesWriteContent.setId(null);
+            tourismTravelNotesContentWriteService.removeByAssociationId(tourismProjectTravelNotesWriteSave.getId());
+            //查询关联数据的id,根据id进行更新数据表的数据
+            tourTourismProjectTravelNotesWriteContentService.saveNew(tourTourismProjectTravelNotesWriteContent);
+        }
+
+
+    }
+
+    @Override
+    @Transactional
+    public void removeByDraftId(String writeId){
+        //删除游记主表
+        tourismProjectTravelNotesWriteService.remove(Long.valueOf(writeId));
+        //删除游记内容表
+        tourismTravelNotesContentWriteService.removeByAssociationId(Long.valueOf(writeId));
+        //删除游记中提及的用户关系表
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = new TourTravelNotesMentionUser();
+        tourTravelNotesMentionUser.setTravelNotesId(Long.valueOf(writeId));
+        tourTravelNotesMentionUserService.removeBy(tourTravelNotesMentionUser);
+        //删除游记中提及的话题关系表
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
+        tourTravelNotesTopicRelation.setTravelNotesId(Long.valueOf(writeId));
+        tourTravelNotesTopicRelationService.removeBy(tourTravelNotesTopicRelation);
+        //删除游记中的图片信息
+        TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+        tourTravelNotesImg.setTravelNotesId(Long.valueOf(writeId));
+        tourTravelNotesImgService.removeBy(tourTravelNotesImg);
+    }
+
+    @Override
+    public List<TourismProjectTravelNotesWrite> getDraftList(TourismProjectTravelNotesWriteDetailPageDto pageDto){
+
+        Long userId = TokenData.takeFromRequest().getUserId();
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite = new TourismProjectTravelNotesWrite();
+        tourismProjectTravelNotesWrite.setCreateUserId(userId);
+        tourismProjectTravelNotesWrite.setState(pageDto.getType());
+        MyOrderParam myOrderParam = new MyOrderParam();
+        myOrderParam.add(new MyOrderParam.OrderInfo("updateTime",false,null));
+        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourismProjectTravelNotesWrite.class);
+        if(pageDto.getPageSize() != null && pageDto.getPageNum() != null){
+            PageMethod.startPage(pageDto.getPageNum(), pageDto.getPageSize(), true);
+        }
+        //查询已发布状态的状态,则需要state为3并且上下架状态为上架
+        if(pageDto.getType() == 3){
+            tourismProjectTravelNotesWrite.setUnmountState(UnmountState.LISTING);
+        }
+        List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList =
+                tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteList(tourismProjectTravelNotesWrite, orderBy);
+
+        return tourismProjectTravelNotesWriteList;
+    }
+
+    @Override
+    @Transactional
+    public ResponseResult<Void> publishDraft(TourismProjectTravelNotesWriteToWebDto tourismProjectTravelNotesWriteDto){
+        String errorMessage = MyCommonUtil.getModelValidationError(tourismProjectTravelNotesWriteDto, UpdateGroup.class);
+        if (errorMessage != null) {
+            return ResponseResult.success(null);
+        }
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite =
+                BeanUtil.toBean(tourismProjectTravelNotesWriteDto, TourismProjectTravelNotesWrite.class);
+
+        //校验该游记是否为审核中和已发布状态
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWriteVerify =
+                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
+
+        if(tourismProjectTravelNotesWriteVerify != null){
+            if(tourismProjectTravelNotesWriteVerify.getState().equals(AuditState.UNAUDITSTATE)) {
+                return ResponseResult.error(ErrorCodeEnum.INVALID_STATUS_ARGUMENT, "该游记状态为:正在审核中,请撤销后进行操作");
+            }else if(tourismProjectTravelNotesWriteVerify.getState() .equals(AuditState.SUCCEEDAUDIT)){
+                return ResponseResult.error(ErrorCodeEnum.INVALID_STATUS_ARGUMENT, "该游记状态为:已发布成功,请下架后进行操作");
+            }
+        }
+
+        //判断imgUrls是否为空,不为空的话,则把第一张图作为列表图
+        if (CollectionUtils.isNotEmpty(tourismProjectTravelNotesWriteDto.getImgUrls())) {
+            tourismProjectTravelNotesWrite.setTourismUrl(tourismProjectTravelNotesWriteDto.getImgUrls().get(0));
+        }
+
+        // 图片审核
+        List<String> imageList = tourismProjectTravelNotesWriteDto.getImgUrls();
+//        if(tourismProjectTravelNotesWrite.getTravelNotesBanner()!=null){
+//            imageList.add(tourismProjectTravelNotesWrite.getTravelNotesBanner());
+//        }
+        Boolean imageResult = huaweiCloudModerationService.runImageModeration(imageList);
+        // 文案审核
+        List<String> titleList = new ArrayList<>();
+
+        //提取出从表内容
+        TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDto =
+                tourismProjectTravelNotesWriteDto.getTourTourismProjectTravelNotesWriteContentDto();
+        if(tourTourismProjectTravelNotesWriteContentDto != null && StringUtils.isNotBlank(tourTourismProjectTravelNotesWriteContentDto.getContent())) {
+            titleList.add(tourTourismProjectTravelNotesWriteContentDto.getContent());
+            Boolean textResult = huaweiCloudModerationService.runTextModeration(titleList);
+            String auditReson = "";
+            if (imageResult && textResult) {
+                tourismProjectTravelNotesWrite.setAutoAuditStatus(1);
+                auditReson = "图文审核通过";
+            } else {
+                tourismProjectTravelNotesWrite.setAutoAuditStatus(2);
+                if (!imageResult) {
+                    auditReson = "图片审核未通过:可能设计暴恐、色情、违禁、辱骂等内容;";
+                }
+                if (!textResult) {
+                    auditReson += "文案审核未通过:可能设计暴恐、色情、违禁、辱骂等内容;";
+                }
+            }
+            tourismProjectTravelNotesWrite.setAutoRejectReason(auditReson);
+        }
+
+        tourismProjectTravelNotesWrite.setState(AuditState.UNAUDITSTATE);
+        List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList = new ArrayList<>();
+        List<TourTravelNotesImg> tourTravelNotesImgList = new ArrayList<>();
+
+        List<TourTravelNotesTopic> list = new ArrayList<>();
+        //对dto的id进行判断,如果数据表中查不到该id,则为新增;否则为修改
+        TourismProjectTravelNotesWrite tourismProjectTravelNotesWrite1 =
+                tourismProjectTravelNotesWriteService.getById(tourismProjectTravelNotesWriteDto.getId());
+
+
+        if(tourismProjectTravelNotesWrite1 == null) {
+            //新增
+            tourismProjectTravelNotesWriteService.saveNew(tourismProjectTravelNotesWrite);
+        }else{//草稿
+            if(!tourismProjectTravelNotesWrite1.getCreateUserId().equals(TokenData.takeFromRequest().getUserId())){
+                return ResponseResult.error(ErrorCodeEnum.DATA_SAVE_FAILED);
+            }
+            tourismProjectTravelNotesWriteService.updateById(tourismProjectTravelNotesWrite);
+        }
+
+        //新增的话题
+        tourismProjectTravelNotesWriteDto.getTopics().forEach(j->{
+            String id = j.get("id");
+            String name = j.get("name");
+            if(ObjectUtil.isEmpty(id)){
+                TourTravelNotesTopic tourTravelNotesTopic = new TourTravelNotesTopic();
+                tourTravelNotesTopic.setId(idGenerator.nextLongId());
+                tourTravelNotesTopic.setName(name);
+                tourTravelNotesTopic.setEnable(1);
+                tourTravelNotesTopic.setHotValue(0);
+                list.add(tourTravelNotesTopic);
+            }
+        });
+        //新增话题
+        tourTravelNotesTopicService.saveNewBatch(list);
+
+        //删除游记中提及的用户关系表
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = new TourTravelNotesMentionUser();
+        tourTravelNotesMentionUser.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        tourTravelNotesMentionUserService.removeBy(tourTravelNotesMentionUser);
+
+        //对游记提及的关联用户信息进行关联游记id
+        tourismProjectTravelNotesWriteDto.getMentions().forEach(item -> {
+            item.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        });
+        //保存游记中提及的用户
+        List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList = MyModelUtil.copyCollectionTo(tourismProjectTravelNotesWriteDto.getMentions(), TourTravelNotesMentionUser.class);
+        tourTravelNotesMentionUserService.saveBatch(tourTravelNotesMentionUserList);
+
+        //删除游记中提及的话题关系表
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = new TourTravelNotesTopicRelation();
+        tourTravelNotesTopicRelation.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        tourTravelNotesTopicRelationService.removeBy(tourTravelNotesTopicRelation);
+
+        List<String> topics = tourismProjectTravelNotesWriteDto.getTopics().stream().map(i->i.get("name")).collect(Collectors.toList());
+        List<TourTravelNotesTopic> ls = new ArrayList<>();
+        if(!topics.isEmpty()){
+            ls = tourTravelNotesTopicService.lambdaQuery().in(TourTravelNotesTopic::getName, topics).list();
+        }
+
+        //对游记中提及的话题进行关联游记id
+        ls.forEach(j->{
+            TourTravelNotesTopicRelation tourTravelNotesTopic = new TourTravelNotesTopicRelation();
+            tourTravelNotesTopic.setTopicName(j.getName());
+            tourTravelNotesTopic.setTopicId(j.getId());
+            tourTravelNotesTopic.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+            tourTravelNotesTopicRelationList.add(tourTravelNotesTopic);
+        });
+        //保存游记中提及的话题
+        tourTravelNotesTopicRelationService.saveNewBatch(tourTravelNotesTopicRelationList);
+
+
+        //移除原来图片中的地址数据
+        TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+        tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        tourTravelNotesImgService.removeBy(tourTravelNotesImg);
+
+        //构建游记中的图片数据
+        tourismProjectTravelNotesWriteDto.getImgUrls().forEach(y->{
+            TourTravelNotesImg image = new TourTravelNotesImg();
+            image.setImgUrl(y);
+            image.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+            tourTravelNotesImgList.add(image);
+        });
+        //保存游记中的图片
+        tourTravelNotesImgService.saveNewBatch(tourTravelNotesImgList);
+
+        //删除游记中的内容
+        tourismTravelNotesContentWriteService.removeByAssociationId(tourismProjectTravelNotesWriteDto.getId());
+
+        //新增内容
+        TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContent =
+                MyModelUtil.copyTo(tourismProjectTravelNotesWriteDto.getTourTourismProjectTravelNotesWriteContentDto(), TourTourismProjectTravelNotesWriteContent.class);
+        tourTourismProjectTravelNotesWriteContent.setAssociationId(tourismProjectTravelNotesWrite.getId());
+        tourTourismProjectTravelNotesWriteContent.setId(null);
+        tourTourismProjectTravelNotesWriteContentService.saveNew(tourTourismProjectTravelNotesWriteContent);
+
+        return ResponseResult.success();
+    }
+}

+ 151 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/TourismProjectSearchRecordsServiceImpl.java

@@ -0,0 +1,151 @@
+package com.tourism.webadmin.app.website.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.common.core.constant.ErrorCodeEnum;
+import com.tourism.common.core.object.MyOrderParam;
+import com.tourism.common.core.object.MyPageData;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.core.object.TokenData;
+import com.tourism.common.core.util.MyCommonUtil;
+import com.tourism.common.core.util.MyModelUtil;
+import com.tourism.common.core.util.MyPageUtil;
+import com.tourism.webadmin.app.website.dto.PageDto;
+import com.tourism.webadmin.app.website.dto.TourTourismProjectSearchRecordsDto;
+import com.tourism.webadmin.app.website.service.TourismProjectSearchRecordsService;
+import com.tourism.webadmin.app.website.vo.TourismProjectSearchRecordsVo;
+import com.tourism.webadmin.back.model.TourTourismProjectSearchRecords;
+import com.tourism.webadmin.back.service.TourTourismProjectSearchRecordsService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * 游记列表搜索Service
+ */
+@Slf4j
+@SuppressWarnings("all")
+@Service("tourismProjectSearchRecordsService")
+public class TourismProjectSearchRecordsServiceImpl implements TourismProjectSearchRecordsService {
+
+	@Autowired
+	private TourTourismProjectSearchRecordsService tourismProjectSearchRecordsService;
+
+	/**
+	 * 用过游记搜索记录id删除记录
+	 * @param idString 搜索记录id
+	 * @return 结果
+	 */
+	@Override
+	public ResponseResult<Void> removeProjectSearchRecordsById(String idString) {
+		//为空返回
+		if (MyCommonUtil.isBlankOrNull(idString)) {
+			return ResponseResult.error(ErrorCodeEnum.ARGUMENT_PK_ID_NULL);
+		}
+		//获取id
+		JSONObject jsonObject = JSON.parseObject(idString);
+		Object rawId = jsonObject.get("id");
+		if (MyCommonUtil.isBlankOrNull(rawId)) {
+			return ResponseResult.error(ErrorCodeEnum.ARGUMENT_PK_ID_NULL);
+		}
+		String id = (String) rawId;
+		//获取搜索记录
+		TourTourismProjectSearchRecords searchRecordsServiceById = tourismProjectSearchRecordsService.getById(id);
+		String errorMessage;
+		//校验数据合法性
+		if (Objects.isNull(searchRecordsServiceById)){
+			errorMessage = "数据操作失败,删除的记录不存在,请刷新后重试!";
+			return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+		}
+		//判断是否为自己的记录
+		Long userId = TokenData.takeFromRequest().getUserId();
+		if (!searchRecordsServiceById.getCreateUserId().equals(userId)){
+			errorMessage = "数据操作失败,不允许删除当前记录,请刷新后重试!";
+			return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+		}
+		if (!tourismProjectSearchRecordsService.remove(Long.valueOf(id))){
+			errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+			return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+		}
+		return ResponseResult.success();
+	}
+
+	/**
+	 * 清空游记历史搜索记录
+	 * @return 结果
+	 */
+	@Override
+	public ResponseResult<Void> clearProjectSearchRecords(String searchType) {
+		if (MyCommonUtil.isBlankOrNull(searchType)){
+			return ResponseResult.error(ErrorCodeEnum.TOUR_ORDER_USER_ERROR,"参数错误");
+		}
+		//获取用户登录id
+		Long userId = TokenData.takeFromRequest().getUserId();
+		//获取类型
+		JSONObject searchJSONObject = JSON.parseObject(searchType);
+		Integer type;
+		try {
+			type = Integer.valueOf(searchJSONObject.get("searchType").toString());
+		}catch (Exception e){
+			return ResponseResult.error(ErrorCodeEnum.TOUR_ORDER_USER_ERROR,"参数类型错误");
+		}
+
+		//通过用户id进行清空
+		boolean remove = tourismProjectSearchRecordsService
+				.remove(new LambdaQueryWrapper<TourTourismProjectSearchRecords>()
+						.eq(TourTourismProjectSearchRecords::getSearchType,type)
+						.eq(TourTourismProjectSearchRecords::getCreateUserId, userId));
+		return remove?ResponseResult.success():ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+	}
+
+	/**
+	 * 获取游记搜索记录列表
+	 * @param pageDto 参数DTO对象
+	 * @return 结果
+	 */
+	@Override
+	public ResponseResult<MyPageData<TourismProjectSearchRecordsVo>> getSearchRecordList(TourTourismProjectSearchRecordsDto tourTourismProjectSearchRecordsDto) {
+		//获取登入用户id
+		Long userId = TokenData.takeFromRequest().getUserId();
+		//分页参数
+		Integer pageSize = tourTourismProjectSearchRecordsDto.getPageSize();
+		Integer pageNum = tourTourismProjectSearchRecordsDto.getPageNum();
+		if (pageNum == null){
+			pageNum = 1;
+		}
+		if (pageSize == null){
+			pageSize = 20;
+		}
+
+		//分页查询
+		PageMethod.startPage(pageNum, pageSize);
+
+		//构建查询排序条件
+		MyOrderParam myOrderParam = new MyOrderParam();
+		//默认降序
+		MyOrderParam.OrderInfo orderInfo = new MyOrderParam.OrderInfo("searchTime",false,null);
+		myOrderParam.add(orderInfo);
+		//排序参数
+		String orderBy = myOrderParam.buildOrderBy(myOrderParam, TourTourismProjectSearchRecords.class);
+		//构建过滤条件
+		TourTourismProjectSearchRecords searchRecordFilter = new TourTourismProjectSearchRecords();
+		searchRecordFilter.setCreateUserId(userId);
+		searchRecordFilter.setSearchType(tourTourismProjectSearchRecordsDto.getSearchType());
+		//得到结果集
+		List<TourTourismProjectSearchRecords> tourTourismSearchRecordsList = tourismProjectSearchRecordsService.getTourTourismSearchRecordsList(searchRecordFilter, orderBy);
+		//获取历史搜索总数
+		long count = tourismProjectSearchRecordsService.getCountByFilter(searchRecordFilter);
+		//将结果集复制到VO对象
+		List<TourismProjectSearchRecordsVo> searchRecordsVos = MyModelUtil.copyCollectionTo(tourTourismSearchRecordsList, TourismProjectSearchRecordsVo.class);
+		//封装为分页对象
+		MyPageData<TourismProjectSearchRecordsVo> projectSearchRecordsVoMyPageData = MyPageUtil.makeResponseData(searchRecordsVos);
+		projectSearchRecordsVoMyPageData.setTotalCount(count);
+		return ResponseResult.success(projectSearchRecordsVoMyPageData);
+	}
+}

+ 25 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/CollectCommentsVo.java

@@ -0,0 +1,25 @@
+package com.tourism.webadmin.app.website.vo;
+
+import com.tourism.webadmin.back.model.TourUser;
+import com.tourism.webadmin.back.model.TourismProjectTravelNotesWrite;
+import com.tourism.webadmin.back.vo.TourismProjectTravelNotesWriteVo;
+import lombok.Data;
+
+@Data
+public class CollectCommentsVo {
+    /**评论ID*/
+    private String id;
+    /**发送用户ID*/
+    private String createUserId;
+    /**发送用户详情*/
+    private String createName;
+    private String headImage;
+    /**品论内容*/
+    private String commentContent;
+
+    /**游记ID*/
+    private String travelNoteId;
+
+    /**评论对应的游记*/
+    private TourismProjectTravelNotesWriteVo notice;
+}

+ 53 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/HomePageDetailsVo.java

@@ -0,0 +1,53 @@
+package com.tourism.webadmin.app.website.vo;
+
+
+import lombok.Data;
+
+@Data
+public class HomePageDetailsVo {
+    /**
+     * 主键Id。
+     */
+    private String userId;
+
+    /**
+     * 昵称。
+     */
+    private String showName;
+
+    /**
+     * 用户头像的Url。
+     */
+    private String headImageUrl;
+
+    /**
+     * 性别(1:男 2:女 3:其它)。
+     */
+    private String sex;
+
+    /**
+     * 个性签名
+     */
+    private String personalSign;
+
+    /**
+     *  关注数量
+     */
+    private String numberOfConcern;
+
+    /**
+     *  粉丝数量
+     */
+    private String numberOfFollowers;
+
+    /**
+     *  获赞
+     */
+    private Long praiseNum;
+
+    /**
+     *  关注状态
+     */
+    private String state;
+
+}

+ 9 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/NotesNameVo.java

@@ -0,0 +1,9 @@
+package com.tourism.webadmin.app.website.vo;
+
+import lombok.Data;
+
+@Data
+public class NotesNameVo {
+    private String id;
+    private String topicName;
+}

+ 9 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/NotesViewsVo.java

@@ -0,0 +1,9 @@
+package com.tourism.webadmin.app.website.vo;
+
+import lombok.Data;
+
+@Data
+public class NotesViewsVo {
+    private Long id;
+    private Integer totalPageViews;
+}

+ 27 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/SpecialCollectionVo.java

@@ -0,0 +1,27 @@
+package com.tourism.webadmin.app.website.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+public class SpecialCollectionVo {
+    /**
+     * 专题ID
+     */
+    @Schema(description = "话题ID")
+    private String id;
+    /**
+     * 话题名称。
+     */
+    @Schema(description = "话题名称")
+    private String name;
+
+    @Schema(description = "话题热度")
+    private Long hotValue;
+
+    /**
+     * 话题浏览量。
+     */
+    @Schema(description = "话题浏览量")
+    private Integer viewCount;
+}

+ 40 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourShortImGroupVo.java

@@ -0,0 +1,40 @@
+package com.tourism.webadmin.app.website.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class TourShortImGroupVo {
+    /**
+     * 群聊id。
+     */
+    @Schema(description = "群聊id")
+    private String id;
+
+    /**
+     * 群聊名称。
+     */
+    @Schema(description = "群聊名称")
+    private String groupName;
+
+    /**
+     * 群聊头像。
+     */
+    @Schema(description = "群聊头像的Url")
+    private String groupAvatarUrl;
+
+    /**
+     * 群成员人数。
+     */
+    @Schema(description = "群成员人数")
+    private Integer count;
+
+    /**
+     * 群成员头像。
+     */
+    @TableField(exist = false)
+    private List<String> memberHeadImg;
+}

+ 37 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourShortUserVo.java

@@ -0,0 +1,37 @@
+package com.tourism.webadmin.app.website.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.tourism.common.core.annotation.RelationConstDict;
+import com.tourism.common.core.annotation.RelationGlobalDict;
+import com.tourism.common.core.annotation.UploadFlagColumn;
+import com.tourism.common.core.upload.UploadStoreTypeEnum;
+import com.tourism.common.core.util.MyCommonUtil;
+import com.tourism.webadmin.upms.model.constant.SysUserStatus;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.Map;
+
+@Data
+public class TourShortUserVo {
+    /**
+     * 主键Id。
+     */
+    @Schema(description = "主键Id")
+    private String userId;
+
+    /**
+     * 昵称。
+     */
+    @Schema(description = "昵称")
+    private String showName;
+
+    /**
+     * 用户头像的Url。
+     */
+    @Schema(description = "用户头像的Url")
+    private String headImageUrl;
+}

+ 65 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourTravelNotesTopicNotesSearchVo.java

@@ -0,0 +1,65 @@
+package com.tourism.webadmin.app.website.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * TourTravelNotesTopicNotesSearchVo视图对象。
+ *
+ * @author 陈
+ * @date 2024/01/24
+ */
+@Schema(description = "TourTravelNotesTopicNotesSearchVo视图对象")
+@Data
+public class TourTravelNotesTopicNotesSearchVo {
+
+    /**
+     * 游记id。
+     */
+    @Schema(description = "游记id")
+    private String id;
+
+    /**
+     * 是否原创(0:非原创;1:原创)。。
+     */
+    @Schema(description = "是否原创(0:非原创;1:原创)。")
+    private Integer isOriginal;
+
+    /**
+     * 游记标题。
+     */
+    @Schema(description = "游记标题")
+    private String projectTitle;
+
+    /**游记*/
+    @Schema(description = "封面")
+    private String tourismUrl;
+
+    /**
+     * 游记点赞量。
+     */
+    @Schema(description = "游记点赞量")
+    private Integer likeCount;
+
+    /**
+     * 创作者id。
+     */
+    @Schema(description = "创作者id")
+    private String createUserId;
+
+    /**
+     * 创作者昵称。
+     */
+    @Schema(description = "创作者昵称")
+    private String createdShowName;
+
+    /**
+     * 创作者头像
+     */
+    @Schema(description = "创作者头像")
+    private String createdHeadImageUrl;
+
+
+}

+ 56 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourTravelNotesTopicSearchVo.java

@@ -0,0 +1,56 @@
+package com.tourism.webadmin.app.website.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * TourTravelNotesTopicSearchVo视图对象。
+ *
+ * @author 陈
+ * @date 2024/01/24
+ */
+@Schema(description = "TourTravelNotesTopicSearchVo视图对象")
+@Data
+public class TourTravelNotesTopicSearchVo {
+    /**专题ID*/
+    private String id;
+    /**
+     * 是否收藏。
+     */
+    @Schema(description = "是否收藏(0.未收藏;1.已收藏")
+    private Integer isCollect;
+
+    /**
+     * 话题名称。
+     */
+    @Schema(description = "话题名称")
+    private String name;
+
+    /**
+     * 话题浏览量。
+     */
+    @Schema(description = "话题浏览量")
+    private Integer viewCount;
+
+    /**
+     * 话题讨论量。
+     */
+    @Schema(description = "话题讨论量")
+    private Integer commentCount;
+
+    /**
+     * 话题帖子数量。
+     */
+    @Schema(description = "话题帖子数量")
+    private Integer travelNotesCount;
+
+    /**
+     * 游记列表
+     */
+    @Schema(description = "游记列表")
+    private List<TourTravelNotesTopicNotesSearchVo> tourTravelNotesTopicNotesSearchVoList;
+
+
+}

+ 16 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourismProjectSearchRecordsVo.java

@@ -0,0 +1,16 @@
+package com.tourism.webadmin.app.website.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+@Schema(description = "游记列表搜索VO对象")
+@Data
+public class TourismProjectSearchRecordsVo {
+	@Schema(description = "搜索记录id")
+	private String id;
+
+	@Schema(description = "搜索内容")
+	private String searchKeyword;
+
+	@Schema(description = "次数")
+	private Integer searchResultCount;
+}

+ 5 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TourismProjectTravelNotesWriteCovertVo.java

@@ -212,4 +212,9 @@ public class TourismProjectTravelNotesWriteCovertVo extends BaseVo {
      */
     @Schema(description = "游玩人数")
     private String travelNumber;
+    /**
+     * 是否置顶。
+     */
+    @Schema(description = "是否置顶")
+    private String isTop;
 }

+ 52 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesByStateVo.java

@@ -0,0 +1,52 @@
+package com.tourism.webadmin.app.website.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class TravelNotesByStateVo {
+
+
+    /**
+     * 主键id。
+     */
+    private String id;
+    /**
+     *  是否置顶
+     */
+    private String isTop;
+
+    /**
+     * 项目标题。
+     */
+    private String projectTitle;
+
+    /**
+     * 审核不通过的原因。
+     */
+    private String reason;
+
+    /**
+     * 项目展示图。
+     */
+    private String tourismUrl;
+    /**
+     *  封面图
+     */
+    private List<String> imageUrl;
+    /**
+     * 上下架状态(0,下架;1,上架)。
+     */
+    private Integer unmountState;
+
+    /**是否收藏 0 否 1 是*/
+    private String isCollect;
+
+    /**更新时间*/
+    private Date updateTime;
+
+    /**浏览量*/
+    private String pageViewCount;
+}

+ 30 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesCommentVo.java

@@ -0,0 +1,30 @@
+package com.tourism.webadmin.app.website.vo;
+
+import com.tourism.webadmin.back.vo.TourTravelNotesCommentVo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 游记评论VO视图对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记评论VO视图对象")
+@Data
+public class TravelNotesCommentVo {
+
+    /**
+     * 评论数量。
+     */
+    @Schema(description = "评论数量")
+    private Integer commentCount;
+
+    /**
+     * 评论列表。
+     */
+    @Schema(description = "评论列表")
+    private List<TourTravelNotesCommentVo> tourTravelNotesCommentVoList;
+}

+ 49 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/TravelNotesVo.java

@@ -0,0 +1,49 @@
+package com.tourism.webadmin.app.website.vo;
+
+import com.tourism.webadmin.back.model.TourUser;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class TravelNotesVo {
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id")
+    private String id;
+
+    /**
+     * 项目标题。
+     */
+    @Schema(description = "项目标题")
+    private String projectTitle;
+    /**
+     * 项目展示图。
+     */
+    private String tourismUrl;
+    /**
+     *  封面图
+     */
+    private List<String> imageUrl;
+    /**
+     * 电子数量。
+     */
+    @Schema(description = "点赞数量")
+    private Long likeCount;
+
+    /**
+     *  是否置顶
+     */
+    private String isTop;
+
+    /**
+     * 是否原创(0:非原创;1:原创)。
+     */
+    private Integer isOriginal;
+    /**用户头像*/
+    private String image;
+    /**用户名称*/
+    private String name;
+}

+ 23 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/UserGroupVo.java

@@ -0,0 +1,23 @@
+package com.tourism.webadmin.app.website.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class UserGroupVo {
+    /**群ID*/
+    private String id;
+    /**群名称*/
+    private String groupName;
+    /**人数*/
+    private Integer count;
+    /**描述*/
+    private String description;
+
+    /**入群状态  0没入群 1 已经入群  2 已申请*/
+    private String status;
+
+    /**头像*/
+    private List<String> memberHeadImg;
+}

+ 10 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/vo/UserNameVo.java

@@ -0,0 +1,10 @@
+package com.tourism.webadmin.app.website.vo;
+
+import lombok.Data;
+
+@Data
+public class UserNameVo {
+    private String userId;
+
+    private String showName;
+}

+ 189 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectSearchRecordsController.java

@@ -0,0 +1,189 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.tourism.webadmin.back.dto.TourTourismSearchRecordsDto;
+import com.tourism.webadmin.back.model.TourTourismProjectSearchRecords;
+import com.tourism.webadmin.back.service.TourTourismProjectSearchRecordsService;
+import com.tourism.webadmin.back.vo.TourTourismSearchRecordsVo;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记列表搜索操作控制器类。
+ *
+ * @author 奇幻之旅
+ * @date 2024-09-06
+ */
+@Tag(name = "游记列表搜索管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTourismSearchRecords")
+public class TourTourismProjectSearchRecordsController {
+
+    @Autowired
+    private TourTourismProjectSearchRecordsService tourTourismSearchRecordsService;
+
+    /**
+     * 新增游记列表搜索数据。
+     *
+     * @param tourTourismSearchRecordsDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {
+            "tourTourismSearchRecordsDto.id",
+            "tourTourismSearchRecordsDto.searchResultCountStart",
+            "tourTourismSearchRecordsDto.searchResultCountEnd",
+            "tourTourismSearchRecordsDto.searchTimeStart",
+            "tourTourismSearchRecordsDto.searchTimeEnd"})
+    @SaCheckPermission("tourTourismSearchRecords.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTourismSearchRecordsDto tourTourismSearchRecordsDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTourismSearchRecordsDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTourismProjectSearchRecords tourTourismSearchRecords = MyModelUtil.copyTo(tourTourismSearchRecordsDto, TourTourismProjectSearchRecords.class);
+        tourTourismSearchRecords = tourTourismSearchRecordsService.saveNew(tourTourismSearchRecords);
+        return ResponseResult.success(tourTourismSearchRecords.getId());
+    }
+
+    /**
+     * 更新游记列表搜索数据。
+     *
+     * @param tourTourismSearchRecordsDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @ApiOperationSupport(ignoreParameters = {
+            "tourTourismSearchRecordsDto.searchResultCountStart",
+            "tourTourismSearchRecordsDto.searchResultCountEnd",
+            "tourTourismSearchRecordsDto.searchTimeStart",
+            "tourTourismSearchRecordsDto.searchTimeEnd"})
+    @SaCheckPermission("tourTourismSearchRecords.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTourismSearchRecordsDto tourTourismSearchRecordsDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTourismSearchRecordsDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTourismProjectSearchRecords tourTourismSearchRecords = MyModelUtil.copyTo(tourTourismSearchRecordsDto, TourTourismProjectSearchRecords.class);
+        TourTourismProjectSearchRecords originalTourTourismSearchRecords = tourTourismSearchRecordsService.getById(tourTourismSearchRecords.getId());
+        if (originalTourTourismSearchRecords == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTourismSearchRecordsService.update(tourTourismSearchRecords, originalTourTourismSearchRecords)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记列表搜索数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTourismSearchRecords.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记列表搜索数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTourismSearchRecords.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记列表搜索列表。
+     *
+     * @param tourTourismSearchRecordsDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTourismSearchRecords.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTourismSearchRecordsVo>> list(
+            @MyRequestBody TourTourismSearchRecordsDto tourTourismSearchRecordsDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTourismProjectSearchRecords tourTourismSearchRecordsFilter = MyModelUtil.copyTo(tourTourismSearchRecordsDtoFilter, TourTourismProjectSearchRecords.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTourismProjectSearchRecords.class);
+        List<TourTourismProjectSearchRecords> tourTourismSearchRecordsList =
+                tourTourismSearchRecordsService.getTourTourismSearchRecordsListWithRelation(tourTourismSearchRecordsFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTourismSearchRecordsList, TourTourismSearchRecordsVo.class));
+    }
+
+    /**
+     * 查看指定游记列表搜索对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTourismSearchRecords.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTourismSearchRecordsVo> view(@RequestParam Long id) {
+        TourTourismProjectSearchRecords tourTourismSearchRecords = tourTourismSearchRecordsService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTourismSearchRecords == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTourismSearchRecordsVo tourTourismSearchRecordsVo = MyModelUtil.copyTo(tourTourismSearchRecords, TourTourismSearchRecordsVo.class);
+        return ResponseResult.success(tourTourismSearchRecordsVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTourismProjectSearchRecords originalTourTourismSearchRecords = tourTourismSearchRecordsService.getById(id);
+        if (originalTourTourismSearchRecords == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTourismSearchRecordsService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectTravelNotesWriteContentController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记内容表操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记内容表管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTourismProjectTravelNotesWriteContent")
+public class TourTourismProjectTravelNotesWriteContentController {
+
+    @Autowired
+    private TourTourismProjectTravelNotesWriteContentService tourTourismProjectTravelNotesWriteContentService;
+
+    /**
+     * 新增游记内容表数据。
+     *
+     * @param tourTourismProjectTravelNotesWriteContentDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTourismProjectTravelNotesWriteContentDto.id"})
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTourismProjectTravelNotesWriteContentDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContent = MyModelUtil.copyTo(tourTourismProjectTravelNotesWriteContentDto, TourTourismProjectTravelNotesWriteContent.class);
+        tourTourismProjectTravelNotesWriteContent = tourTourismProjectTravelNotesWriteContentService.saveNew(tourTourismProjectTravelNotesWriteContent);
+        return ResponseResult.success(tourTourismProjectTravelNotesWriteContent.getId());
+    }
+
+    /**
+     * 更新游记内容表数据。
+     *
+     * @param tourTourismProjectTravelNotesWriteContentDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTourismProjectTravelNotesWriteContentDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContent = MyModelUtil.copyTo(tourTourismProjectTravelNotesWriteContentDto, TourTourismProjectTravelNotesWriteContent.class);
+        TourTourismProjectTravelNotesWriteContent originalTourTourismProjectTravelNotesWriteContent = tourTourismProjectTravelNotesWriteContentService.getById(tourTourismProjectTravelNotesWriteContent.getId());
+        if (originalTourTourismProjectTravelNotesWriteContent == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTourismProjectTravelNotesWriteContentService.update(tourTourismProjectTravelNotesWriteContent, originalTourTourismProjectTravelNotesWriteContent)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记内容表数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记内容表数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记内容表列表。
+     *
+     * @param tourTourismProjectTravelNotesWriteContentDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTourismProjectTravelNotesWriteContentVo>> list(
+            @MyRequestBody TourTourismProjectTravelNotesWriteContentDto tourTourismProjectTravelNotesWriteContentDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContentFilter = MyModelUtil.copyTo(tourTourismProjectTravelNotesWriteContentDtoFilter, TourTourismProjectTravelNotesWriteContent.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTourismProjectTravelNotesWriteContent.class);
+        List<TourTourismProjectTravelNotesWriteContent> tourTourismProjectTravelNotesWriteContentList =
+                tourTourismProjectTravelNotesWriteContentService.getTourTourismProjectTravelNotesWriteContentListWithRelation(tourTourismProjectTravelNotesWriteContentFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTourismProjectTravelNotesWriteContentList, TourTourismProjectTravelNotesWriteContentVo.class));
+    }
+
+    /**
+     * 查看指定游记内容表对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTourismProjectTravelNotesWriteContent.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTourismProjectTravelNotesWriteContentVo> view(@RequestParam Long id) {
+        TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContent = tourTourismProjectTravelNotesWriteContentService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTourismProjectTravelNotesWriteContent == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTourismProjectTravelNotesWriteContentVo tourTourismProjectTravelNotesWriteContentVo = MyModelUtil.copyTo(tourTourismProjectTravelNotesWriteContent, TourTourismProjectTravelNotesWriteContentVo.class);
+        return ResponseResult.success(tourTourismProjectTravelNotesWriteContentVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTourismProjectTravelNotesWriteContent originalTourTourismProjectTravelNotesWriteContent = tourTourismProjectTravelNotesWriteContentService.getById(id);
+        if (originalTourTourismProjectTravelNotesWriteContent == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTourismProjectTravelNotesWriteContentService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesCommentMentionUserController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记评论中提到的用户操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记评论中提到的用户管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTravelNotesCommentMentionUser")
+public class TourTravelNotesCommentMentionUserController {
+
+    @Autowired
+    private TourTravelNotesCommentMentionUserService tourTravelNotesCommentMentionUserService;
+
+    /**
+     * 新增游记评论中提到的用户数据。
+     *
+     * @param tourTravelNotesCommentMentionUserDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTravelNotesCommentMentionUserDto.id"})
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTravelNotesCommentMentionUserDto tourTravelNotesCommentMentionUserDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesCommentMentionUserDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesCommentMentionUser tourTravelNotesCommentMentionUser = MyModelUtil.copyTo(tourTravelNotesCommentMentionUserDto, TourTravelNotesCommentMentionUser.class);
+        tourTravelNotesCommentMentionUser = tourTravelNotesCommentMentionUserService.saveNew(tourTravelNotesCommentMentionUser);
+        return ResponseResult.success(tourTravelNotesCommentMentionUser.getId());
+    }
+
+    /**
+     * 更新游记评论中提到的用户数据。
+     *
+     * @param tourTravelNotesCommentMentionUserDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTravelNotesCommentMentionUserDto tourTravelNotesCommentMentionUserDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesCommentMentionUserDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesCommentMentionUser tourTravelNotesCommentMentionUser = MyModelUtil.copyTo(tourTravelNotesCommentMentionUserDto, TourTravelNotesCommentMentionUser.class);
+        TourTravelNotesCommentMentionUser originalTourTravelNotesCommentMentionUser = tourTravelNotesCommentMentionUserService.getById(tourTravelNotesCommentMentionUser.getId());
+        if (originalTourTravelNotesCommentMentionUser == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesCommentMentionUserService.update(tourTravelNotesCommentMentionUser, originalTourTravelNotesCommentMentionUser)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记评论中提到的用户数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记评论中提到的用户数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记评论中提到的用户列表。
+     *
+     * @param tourTravelNotesCommentMentionUserDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTravelNotesCommentMentionUserVo>> list(
+            @MyRequestBody TourTravelNotesCommentMentionUserDto tourTravelNotesCommentMentionUserDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTravelNotesCommentMentionUser tourTravelNotesCommentMentionUserFilter = MyModelUtil.copyTo(tourTravelNotesCommentMentionUserDtoFilter, TourTravelNotesCommentMentionUser.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTravelNotesCommentMentionUser.class);
+        List<TourTravelNotesCommentMentionUser> tourTravelNotesCommentMentionUserList =
+                tourTravelNotesCommentMentionUserService.getTourTravelNotesCommentMentionUserListWithRelation(tourTravelNotesCommentMentionUserFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTravelNotesCommentMentionUserList, TourTravelNotesCommentMentionUserVo.class));
+    }
+
+    /**
+     * 查看指定游记评论中提到的用户对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTravelNotesCommentMentionUser.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTravelNotesCommentMentionUserVo> view(@RequestParam Long id) {
+        TourTravelNotesCommentMentionUser tourTravelNotesCommentMentionUser = tourTravelNotesCommentMentionUserService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTravelNotesCommentMentionUser == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTravelNotesCommentMentionUserVo tourTravelNotesCommentMentionUserVo = MyModelUtil.copyTo(tourTravelNotesCommentMentionUser, TourTravelNotesCommentMentionUserVo.class);
+        return ResponseResult.success(tourTravelNotesCommentMentionUserVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTravelNotesCommentMentionUser originalTourTravelNotesCommentMentionUser = tourTravelNotesCommentMentionUserService.getById(id);
+        if (originalTourTravelNotesCommentMentionUser == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesCommentMentionUserService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesImgController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记中的图片操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记中的图片管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTravelNotesImg")
+public class TourTravelNotesImgController {
+
+    @Autowired
+    private TourTravelNotesImgService tourTravelNotesImgService;
+
+    /**
+     * 新增游记中的图片数据。
+     *
+     * @param tourTravelNotesImgDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTravelNotesImgDto.id"})
+    @SaCheckPermission("tourTravelNotesImg.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTravelNotesImgDto tourTravelNotesImgDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesImgDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesImg tourTravelNotesImg = MyModelUtil.copyTo(tourTravelNotesImgDto, TourTravelNotesImg.class);
+        tourTravelNotesImg = tourTravelNotesImgService.saveNew(tourTravelNotesImg);
+        return ResponseResult.success(tourTravelNotesImg.getId());
+    }
+
+    /**
+     * 更新游记中的图片数据。
+     *
+     * @param tourTravelNotesImgDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesImg.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTravelNotesImgDto tourTravelNotesImgDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesImgDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesImg tourTravelNotesImg = MyModelUtil.copyTo(tourTravelNotesImgDto, TourTravelNotesImg.class);
+        TourTravelNotesImg originalTourTravelNotesImg = tourTravelNotesImgService.getById(tourTravelNotesImg.getId());
+        if (originalTourTravelNotesImg == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesImgService.update(tourTravelNotesImg, originalTourTravelNotesImg)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记中的图片数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesImg.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记中的图片数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesImg.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记中的图片列表。
+     *
+     * @param tourTravelNotesImgDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTravelNotesImg.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTravelNotesImgVo>> list(
+            @MyRequestBody TourTravelNotesImgDto tourTravelNotesImgDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTravelNotesImg tourTravelNotesImgFilter = MyModelUtil.copyTo(tourTravelNotesImgDtoFilter, TourTravelNotesImg.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTravelNotesImg.class);
+        List<TourTravelNotesImg> tourTravelNotesImgList =
+                tourTravelNotesImgService.getTourTravelNotesImgListWithRelation(tourTravelNotesImgFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTravelNotesImgList, TourTravelNotesImgVo.class));
+    }
+
+    /**
+     * 查看指定游记中的图片对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTravelNotesImg.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTravelNotesImgVo> view(@RequestParam Long id) {
+        TourTravelNotesImg tourTravelNotesImg = tourTravelNotesImgService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTravelNotesImg == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTravelNotesImgVo tourTravelNotesImgVo = MyModelUtil.copyTo(tourTravelNotesImg, TourTravelNotesImgVo.class);
+        return ResponseResult.success(tourTravelNotesImgVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTravelNotesImg originalTourTravelNotesImg = tourTravelNotesImgService.getById(id);
+        if (originalTourTravelNotesImg == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesImgService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesMentionUserController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记提及的用户操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记提及的用户管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTravelNotesMentionUser")
+public class TourTravelNotesMentionUserController {
+
+    @Autowired
+    private TourTravelNotesMentionUserService tourTravelNotesMentionUserService;
+
+    /**
+     * 新增游记提及的用户数据。
+     *
+     * @param tourTravelNotesMentionUserDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTravelNotesMentionUserDto.id"})
+    @SaCheckPermission("tourTravelNotesMentionUser.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTravelNotesMentionUserDto tourTravelNotesMentionUserDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesMentionUserDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = MyModelUtil.copyTo(tourTravelNotesMentionUserDto, TourTravelNotesMentionUser.class);
+        tourTravelNotesMentionUser = tourTravelNotesMentionUserService.saveNew(tourTravelNotesMentionUser);
+        return ResponseResult.success(tourTravelNotesMentionUser.getId());
+    }
+
+    /**
+     * 更新游记提及的用户数据。
+     *
+     * @param tourTravelNotesMentionUserDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesMentionUser.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTravelNotesMentionUserDto tourTravelNotesMentionUserDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesMentionUserDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = MyModelUtil.copyTo(tourTravelNotesMentionUserDto, TourTravelNotesMentionUser.class);
+        TourTravelNotesMentionUser originalTourTravelNotesMentionUser = tourTravelNotesMentionUserService.getById(tourTravelNotesMentionUser.getId());
+        if (originalTourTravelNotesMentionUser == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesMentionUserService.update(tourTravelNotesMentionUser, originalTourTravelNotesMentionUser)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记提及的用户数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesMentionUser.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记提及的用户数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesMentionUser.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记提及的用户列表。
+     *
+     * @param tourTravelNotesMentionUserDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTravelNotesMentionUser.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTravelNotesMentionUserVo>> list(
+            @MyRequestBody TourTravelNotesMentionUserDto tourTravelNotesMentionUserDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTravelNotesMentionUser tourTravelNotesMentionUserFilter = MyModelUtil.copyTo(tourTravelNotesMentionUserDtoFilter, TourTravelNotesMentionUser.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTravelNotesMentionUser.class);
+        List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList =
+                tourTravelNotesMentionUserService.getTourTravelNotesMentionUserListWithRelation(tourTravelNotesMentionUserFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTravelNotesMentionUserList, TourTravelNotesMentionUserVo.class));
+    }
+
+    /**
+     * 查看指定游记提及的用户对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTravelNotesMentionUser.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTravelNotesMentionUserVo> view(@RequestParam Long id) {
+        TourTravelNotesMentionUser tourTravelNotesMentionUser = tourTravelNotesMentionUserService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTravelNotesMentionUser == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTravelNotesMentionUserVo tourTravelNotesMentionUserVo = MyModelUtil.copyTo(tourTravelNotesMentionUser, TourTravelNotesMentionUserVo.class);
+        return ResponseResult.success(tourTravelNotesMentionUserVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTravelNotesMentionUser originalTourTravelNotesMentionUser = tourTravelNotesMentionUserService.getById(id);
+        if (originalTourTravelNotesMentionUser == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesMentionUserService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesTopicController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记话题操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记话题管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTravelNotesTopic")
+public class TourTravelNotesTopicController {
+
+    @Autowired
+    private TourTravelNotesTopicService tourTravelNotesTopicService;
+
+    /**
+     * 新增游记话题数据。
+     *
+     * @param tourTravelNotesTopicDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTravelNotesTopicDto.id"})
+    @SaCheckPermission("tourTravelNotesTopic.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTravelNotesTopicDto tourTravelNotesTopicDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesTopicDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesTopic tourTravelNotesTopic = MyModelUtil.copyTo(tourTravelNotesTopicDto, TourTravelNotesTopic.class);
+        tourTravelNotesTopic = tourTravelNotesTopicService.saveNew(tourTravelNotesTopic);
+        return ResponseResult.success(tourTravelNotesTopic.getId());
+    }
+
+    /**
+     * 更新游记话题数据。
+     *
+     * @param tourTravelNotesTopicDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopic.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTravelNotesTopicDto tourTravelNotesTopicDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesTopicDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesTopic tourTravelNotesTopic = MyModelUtil.copyTo(tourTravelNotesTopicDto, TourTravelNotesTopic.class);
+        TourTravelNotesTopic originalTourTravelNotesTopic = tourTravelNotesTopicService.getById(tourTravelNotesTopic.getId());
+        if (originalTourTravelNotesTopic == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesTopicService.update(tourTravelNotesTopic, originalTourTravelNotesTopic)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记话题数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopic.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记话题数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopic.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记话题列表。
+     *
+     * @param tourTravelNotesTopicDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTravelNotesTopic.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTravelNotesTopicVo>> list(
+            @MyRequestBody TourTravelNotesTopicDto tourTravelNotesTopicDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTravelNotesTopic tourTravelNotesTopicFilter = MyModelUtil.copyTo(tourTravelNotesTopicDtoFilter, TourTravelNotesTopic.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTravelNotesTopic.class);
+        List<TourTravelNotesTopic> tourTravelNotesTopicList =
+                tourTravelNotesTopicService.getTourTravelNotesTopicListWithRelation(tourTravelNotesTopicFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTravelNotesTopicList, TourTravelNotesTopicVo.class));
+    }
+
+    /**
+     * 查看指定游记话题对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTravelNotesTopic.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTravelNotesTopicVo> view(@RequestParam Long id) {
+        TourTravelNotesTopic tourTravelNotesTopic = tourTravelNotesTopicService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTravelNotesTopic == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTravelNotesTopicVo tourTravelNotesTopicVo = MyModelUtil.copyTo(tourTravelNotesTopic, TourTravelNotesTopicVo.class);
+        return ResponseResult.success(tourTravelNotesTopicVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTravelNotesTopic originalTourTravelNotesTopic = tourTravelNotesTopicService.getById(id);
+        if (originalTourTravelNotesTopic == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesTopicService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTravelNotesTopicRelationController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 游记与话题关联操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "游记与话题关联管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourTravelNotesTopicRelation")
+public class TourTravelNotesTopicRelationController {
+
+    @Autowired
+    private TourTravelNotesTopicRelationService tourTravelNotesTopicRelationService;
+
+    /**
+     * 新增游记与话题关联数据。
+     *
+     * @param tourTravelNotesTopicRelationDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourTravelNotesTopicRelationDto.id"})
+    @SaCheckPermission("tourTravelNotesTopicRelation.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourTravelNotesTopicRelationDto tourTravelNotesTopicRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesTopicRelationDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = MyModelUtil.copyTo(tourTravelNotesTopicRelationDto, TourTravelNotesTopicRelation.class);
+        tourTravelNotesTopicRelation = tourTravelNotesTopicRelationService.saveNew(tourTravelNotesTopicRelation);
+        return ResponseResult.success(tourTravelNotesTopicRelation.getId());
+    }
+
+    /**
+     * 更新游记与话题关联数据。
+     *
+     * @param tourTravelNotesTopicRelationDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopicRelation.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourTravelNotesTopicRelationDto tourTravelNotesTopicRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourTravelNotesTopicRelationDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = MyModelUtil.copyTo(tourTravelNotesTopicRelationDto, TourTravelNotesTopicRelation.class);
+        TourTravelNotesTopicRelation originalTourTravelNotesTopicRelation = tourTravelNotesTopicRelationService.getById(tourTravelNotesTopicRelation.getId());
+        if (originalTourTravelNotesTopicRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesTopicRelationService.update(tourTravelNotesTopicRelation, originalTourTravelNotesTopicRelation)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除游记与话题关联数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopicRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除游记与话题关联数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourTravelNotesTopicRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的游记与话题关联列表。
+     *
+     * @param tourTravelNotesTopicRelationDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourTravelNotesTopicRelation.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourTravelNotesTopicRelationVo>> list(
+            @MyRequestBody TourTravelNotesTopicRelationDto tourTravelNotesTopicRelationDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelationFilter = MyModelUtil.copyTo(tourTravelNotesTopicRelationDtoFilter, TourTravelNotesTopicRelation.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourTravelNotesTopicRelation.class);
+        List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList =
+                tourTravelNotesTopicRelationService.getTourTravelNotesTopicRelationListWithRelation(tourTravelNotesTopicRelationFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourTravelNotesTopicRelationList, TourTravelNotesTopicRelationVo.class));
+    }
+
+    /**
+     * 查看指定游记与话题关联对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourTravelNotesTopicRelation.view")
+    @GetMapping("/view")
+    public ResponseResult<TourTravelNotesTopicRelationVo> view(@RequestParam Long id) {
+        TourTravelNotesTopicRelation tourTravelNotesTopicRelation = tourTravelNotesTopicRelationService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourTravelNotesTopicRelation == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourTravelNotesTopicRelationVo tourTravelNotesTopicRelationVo = MyModelUtil.copyTo(tourTravelNotesTopicRelation, TourTravelNotesTopicRelationVo.class);
+        return ResponseResult.success(tourTravelNotesTopicRelationVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourTravelNotesTopicRelation originalTourTravelNotesTopicRelation = tourTravelNotesTopicRelationService.getById(id);
+        if (originalTourTravelNotesTopicRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourTravelNotesTopicRelationService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserCommentCollectRelationController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 用户与评论的收藏关系表操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "用户与评论的收藏关系表管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourUserCommentCollectRelation")
+public class TourUserCommentCollectRelationController {
+
+    @Autowired
+    private TourUserCommentCollectRelationService tourUserCommentCollectRelationService;
+
+    /**
+     * 新增用户与评论的收藏关系表数据。
+     *
+     * @param tourUserCommentCollectRelationDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourUserCommentCollectRelationDto.userId"})
+    @SaCheckPermission("tourUserCommentCollectRelation.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourUserCommentCollectRelationDto tourUserCommentCollectRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserCommentCollectRelationDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserCommentCollectRelation tourUserCommentCollectRelation = MyModelUtil.copyTo(tourUserCommentCollectRelationDto, TourUserCommentCollectRelation.class);
+        tourUserCommentCollectRelation = tourUserCommentCollectRelationService.saveNew(tourUserCommentCollectRelation);
+        return ResponseResult.success(tourUserCommentCollectRelation.getUserId());
+    }
+
+    /**
+     * 更新用户与评论的收藏关系表数据。
+     *
+     * @param tourUserCommentCollectRelationDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentCollectRelation.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourUserCommentCollectRelationDto tourUserCommentCollectRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserCommentCollectRelationDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserCommentCollectRelation tourUserCommentCollectRelation = MyModelUtil.copyTo(tourUserCommentCollectRelationDto, TourUserCommentCollectRelation.class);
+        TourUserCommentCollectRelation originalTourUserCommentCollectRelation = tourUserCommentCollectRelationService.getById(tourUserCommentCollectRelation.getUserId());
+        if (originalTourUserCommentCollectRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserCommentCollectRelationService.update(tourUserCommentCollectRelation, originalTourUserCommentCollectRelation)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除用户与评论的收藏关系表数据。
+     *
+     * @param userId 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentCollectRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long userId) {
+        if (MyCommonUtil.existBlankArgument(userId)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(userId);
+    }
+
+    /**
+     * 批量删除用户与评论的收藏关系表数据。
+     *
+     * @param userIdList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentCollectRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> userIdList) {
+        if (MyCommonUtil.existBlankArgument(userIdList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long userId : userIdList) {
+            ResponseResult<Void> responseResult = this.doDelete(userId);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的用户与评论的收藏关系表列表。
+     *
+     * @param tourUserCommentCollectRelationDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourUserCommentCollectRelation.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourUserCommentCollectRelationVo>> list(
+            @MyRequestBody TourUserCommentCollectRelationDto tourUserCommentCollectRelationDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourUserCommentCollectRelation tourUserCommentCollectRelationFilter = MyModelUtil.copyTo(tourUserCommentCollectRelationDtoFilter, TourUserCommentCollectRelation.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourUserCommentCollectRelation.class);
+        List<TourUserCommentCollectRelation> tourUserCommentCollectRelationList =
+                tourUserCommentCollectRelationService.getTourUserCommentCollectRelationListWithRelation(tourUserCommentCollectRelationFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourUserCommentCollectRelationList, TourUserCommentCollectRelationVo.class));
+    }
+
+    /**
+     * 查看指定用户与评论的收藏关系表对象详情。
+     *
+     * @param userId 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourUserCommentCollectRelation.view")
+    @GetMapping("/view")
+    public ResponseResult<TourUserCommentCollectRelationVo> view(@RequestParam Long userId) {
+        TourUserCommentCollectRelation tourUserCommentCollectRelation = tourUserCommentCollectRelationService.getByIdWithRelation(userId, MyRelationParam.full());
+        if (tourUserCommentCollectRelation == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourUserCommentCollectRelationVo tourUserCommentCollectRelationVo = MyModelUtil.copyTo(tourUserCommentCollectRelation, TourUserCommentCollectRelationVo.class);
+        return ResponseResult.success(tourUserCommentCollectRelationVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long userId) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourUserCommentCollectRelation originalTourUserCommentCollectRelation = tourUserCommentCollectRelationService.getById(userId);
+        if (originalTourUserCommentCollectRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserCommentCollectRelationService.remove(userId)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserCommentLikeRelationController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 用户与评论的点赞关系表操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "用户与评论的点赞关系表管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourUserCommentLikeRelation")
+public class TourUserCommentLikeRelationController {
+
+    @Autowired
+    private TourUserCommentLikeRelationService tourUserCommentLikeRelationService;
+
+    /**
+     * 新增用户与评论的点赞关系表数据。
+     *
+     * @param tourUserCommentLikeRelationDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourUserCommentLikeRelationDto.userId"})
+    @SaCheckPermission("tourUserCommentLikeRelation.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourUserCommentLikeRelationDto tourUserCommentLikeRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserCommentLikeRelationDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserCommentLikeRelation tourUserCommentLikeRelation = MyModelUtil.copyTo(tourUserCommentLikeRelationDto, TourUserCommentLikeRelation.class);
+        tourUserCommentLikeRelation = tourUserCommentLikeRelationService.saveNew(tourUserCommentLikeRelation);
+        return ResponseResult.success(tourUserCommentLikeRelation.getUserId());
+    }
+
+    /**
+     * 更新用户与评论的点赞关系表数据。
+     *
+     * @param tourUserCommentLikeRelationDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentLikeRelation.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourUserCommentLikeRelationDto tourUserCommentLikeRelationDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserCommentLikeRelationDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserCommentLikeRelation tourUserCommentLikeRelation = MyModelUtil.copyTo(tourUserCommentLikeRelationDto, TourUserCommentLikeRelation.class);
+        TourUserCommentLikeRelation originalTourUserCommentLikeRelation = tourUserCommentLikeRelationService.getById(tourUserCommentLikeRelation.getUserId());
+        if (originalTourUserCommentLikeRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserCommentLikeRelationService.update(tourUserCommentLikeRelation, originalTourUserCommentLikeRelation)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除用户与评论的点赞关系表数据。
+     *
+     * @param userId 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentLikeRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long userId) {
+        if (MyCommonUtil.existBlankArgument(userId)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(userId);
+    }
+
+    /**
+     * 批量删除用户与评论的点赞关系表数据。
+     *
+     * @param userIdList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserCommentLikeRelation.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> userIdList) {
+        if (MyCommonUtil.existBlankArgument(userIdList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long userId : userIdList) {
+            ResponseResult<Void> responseResult = this.doDelete(userId);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的用户与评论的点赞关系表列表。
+     *
+     * @param tourUserCommentLikeRelationDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourUserCommentLikeRelation.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourUserCommentLikeRelationVo>> list(
+            @MyRequestBody TourUserCommentLikeRelationDto tourUserCommentLikeRelationDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourUserCommentLikeRelation tourUserCommentLikeRelationFilter = MyModelUtil.copyTo(tourUserCommentLikeRelationDtoFilter, TourUserCommentLikeRelation.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourUserCommentLikeRelation.class);
+        List<TourUserCommentLikeRelation> tourUserCommentLikeRelationList =
+                tourUserCommentLikeRelationService.getTourUserCommentLikeRelationListWithRelation(tourUserCommentLikeRelationFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourUserCommentLikeRelationList, TourUserCommentLikeRelationVo.class));
+    }
+
+    /**
+     * 查看指定用户与评论的点赞关系表对象详情。
+     *
+     * @param userId 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourUserCommentLikeRelation.view")
+    @GetMapping("/view")
+    public ResponseResult<TourUserCommentLikeRelationVo> view(@RequestParam Long userId) {
+        TourUserCommentLikeRelation tourUserCommentLikeRelation = tourUserCommentLikeRelationService.getByIdWithRelation(userId, MyRelationParam.full());
+        if (tourUserCommentLikeRelation == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourUserCommentLikeRelationVo tourUserCommentLikeRelationVo = MyModelUtil.copyTo(tourUserCommentLikeRelation, TourUserCommentLikeRelationVo.class);
+        return ResponseResult.success(tourUserCommentLikeRelationVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long userId) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourUserCommentLikeRelation originalTourUserCommentLikeRelation = tourUserCommentLikeRelationService.getById(userId);
+        if (originalTourUserCommentLikeRelation == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserCommentLikeRelationService.remove(userId)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 179 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourUserLikeTopicController.java

@@ -0,0 +1,179 @@
+package com.tourism.webadmin.back.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.github.pagehelper.page.PageMethod;
+import com.tourism.webadmin.back.vo.*;
+import com.tourism.webadmin.back.dto.*;
+import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.service.*;
+import com.tourism.common.core.object.*;
+import com.tourism.common.core.util.*;
+import com.tourism.common.core.constant.*;
+import com.tourism.common.core.annotation.MyRequestBody;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 用户与话题的关联表操作控制器类。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "用户与话题的关联表管理接口")
+@Slf4j
+@RestController
+@RequestMapping("/admin/app/tourUserLikeTopic")
+public class TourUserLikeTopicController {
+
+    @Autowired
+    private TourUserLikeTopicService tourUserLikeTopicService;
+
+    /**
+     * 新增用户与话题的关联表数据。
+     *
+     * @param tourUserLikeTopicDto 新增对象。
+     * @return 应答结果对象,包含新增对象主键Id。
+     */
+    @ApiOperationSupport(ignoreParameters = {"tourUserLikeTopicDto.id"})
+    @SaCheckPermission("tourUserLikeTopic.add")
+    @OperationLog(type = SysOperationLogType.ADD)
+    @PostMapping("/add")
+    public ResponseResult<Long> add(@MyRequestBody TourUserLikeTopicDto tourUserLikeTopicDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserLikeTopicDto, false);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserLikeTopic tourUserLikeTopic = MyModelUtil.copyTo(tourUserLikeTopicDto, TourUserLikeTopic.class);
+        tourUserLikeTopic = tourUserLikeTopicService.saveNew(tourUserLikeTopic);
+        return ResponseResult.success(tourUserLikeTopic.getId());
+    }
+
+    /**
+     * 更新用户与话题的关联表数据。
+     *
+     * @param tourUserLikeTopicDto 更新对象。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserLikeTopic.update")
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @PostMapping("/update")
+    public ResponseResult<Void> update(@MyRequestBody TourUserLikeTopicDto tourUserLikeTopicDto) {
+        String errorMessage = MyCommonUtil.getModelValidationError(tourUserLikeTopicDto, true);
+        if (errorMessage != null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
+        }
+        TourUserLikeTopic tourUserLikeTopic = MyModelUtil.copyTo(tourUserLikeTopicDto, TourUserLikeTopic.class);
+        TourUserLikeTopic originalTourUserLikeTopic = tourUserLikeTopicService.getById(tourUserLikeTopic.getId());
+        if (originalTourUserLikeTopic == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserLikeTopicService.update(tourUserLikeTopic, originalTourUserLikeTopic)) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 删除用户与话题的关联表数据。
+     *
+     * @param id 删除对象主键Id。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserLikeTopic.delete")
+    @OperationLog(type = SysOperationLogType.DELETE)
+    @PostMapping("/delete")
+    public ResponseResult<Void> delete(@MyRequestBody Long id) {
+        if (MyCommonUtil.existBlankArgument(id)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        return this.doDelete(id);
+    }
+
+    /**
+     * 批量删除用户与话题的关联表数据。
+     *
+     * @param idList 待删除对象的主键Id列表。
+     * @return 应答结果对象。
+     */
+    @SaCheckPermission("tourUserLikeTopic.delete")
+    @OperationLog(type = SysOperationLogType.DELETE_BATCH)
+    @PostMapping("/deleteBatch")
+    public ResponseResult<Void> deleteBatch(@MyRequestBody List<Long> idList) {
+        if (MyCommonUtil.existBlankArgument(idList)) {
+            return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
+        }
+        for (Long id : idList) {
+            ResponseResult<Void> responseResult = this.doDelete(id);
+            if (!responseResult.isSuccess()) {
+                return responseResult;
+            }
+        }
+        return ResponseResult.success();
+    }
+
+    /**
+     * 列出符合过滤条件的用户与话题的关联表列表。
+     *
+     * @param tourUserLikeTopicDtoFilter 过滤对象。
+     * @param orderParam 排序参数。
+     * @param pageParam 分页参数。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @SaCheckPermission("tourUserLikeTopic.view")
+    @PostMapping("/list")
+    public ResponseResult<MyPageData<TourUserLikeTopicVo>> list(
+            @MyRequestBody TourUserLikeTopicDto tourUserLikeTopicDtoFilter,
+            @MyRequestBody MyOrderParam orderParam,
+            @MyRequestBody MyPageParam pageParam) {
+        if (pageParam != null) {
+            PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize(), pageParam.getCount());
+        }
+        TourUserLikeTopic tourUserLikeTopicFilter = MyModelUtil.copyTo(tourUserLikeTopicDtoFilter, TourUserLikeTopic.class);
+        String orderBy = MyOrderParam.buildOrderBy(orderParam, TourUserLikeTopic.class);
+        List<TourUserLikeTopic> tourUserLikeTopicList =
+                tourUserLikeTopicService.getTourUserLikeTopicListWithRelation(tourUserLikeTopicFilter, orderBy);
+        return ResponseResult.success(MyPageUtil.makeResponseData(tourUserLikeTopicList, TourUserLikeTopicVo.class));
+    }
+
+    /**
+     * 查看指定用户与话题的关联表对象详情。
+     *
+     * @param id 指定对象主键Id。
+     * @return 应答结果对象,包含对象详情。
+     */
+    @SaCheckPermission("tourUserLikeTopic.view")
+    @GetMapping("/view")
+    public ResponseResult<TourUserLikeTopicVo> view(@RequestParam Long id) {
+        TourUserLikeTopic tourUserLikeTopic = tourUserLikeTopicService.getByIdWithRelation(id, MyRelationParam.full());
+        if (tourUserLikeTopic == null) {
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
+        }
+        TourUserLikeTopicVo tourUserLikeTopicVo = MyModelUtil.copyTo(tourUserLikeTopic, TourUserLikeTopicVo.class);
+        return ResponseResult.success(tourUserLikeTopicVo);
+    }
+
+    private ResponseResult<Void> doDelete(Long id) {
+        String errorMessage;
+        // 验证关联Id的数据合法性
+        TourUserLikeTopic originalTourUserLikeTopic = tourUserLikeTopicService.getById(id);
+        if (originalTourUserLikeTopic == null) {
+            // NOTE: 修改下面方括号中的话述
+            errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        if (!tourUserLikeTopicService.remove(id)) {
+            errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
+            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
+        }
+        return ResponseResult.success();
+    }
+}

+ 52 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourismProjectTravelNotesWriteController.java

@@ -12,6 +12,7 @@ import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.github.pagehelper.page.PageMethod;
 import com.tourism.webadmin.back.model.constant.AuditState;
+import com.tourism.webadmin.back.model.constant.Enable;
 import com.tourism.webadmin.back.vo.*;
 import com.tourism.webadmin.back.dto.*;
 import com.tourism.webadmin.back.model.*;
@@ -25,6 +26,7 @@ import com.tourism.common.additional.config.ApplicationConfig;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -32,6 +34,7 @@ import org.springframework.web.multipart.MultipartFile;
 import jakarta.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 发布游记操作控制器类。
@@ -53,7 +56,10 @@ public class TourismProjectTravelNotesWriteController {
     private UpDownloaderFactory upDownloaderFactory;
     @Autowired
     private TourismProjectTravelNotesWriteService tourismProjectTravelNotesWriteService;
-
+    @Autowired
+    private TourTravelNotesTopicService tourTravelNotesTopicService;
+    @Autowired
+    private TourTravelNotesImgService tourTravelNotesImgService;
     /**
      * 新增发布游记数据。
      *
@@ -154,6 +160,29 @@ public class TourismProjectTravelNotesWriteController {
             return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
         }
 
+        //审核通过的话,则进行查询话题,查看是否话题是否存在
+        //话题不存在的话,则进行新增话题
+        if(tourismProjectTravelNotesWrite.getState() == 3) {
+            if (StringUtils.isNotBlank(tourismProjectTravelNotesWrite.getTourTravelNotesTopicRelationName())) {
+                String[] tourTravelNotesTopicRelationNameArray = tourismProjectTravelNotesWrite.getTourTravelNotesTopicRelationName().split(",");
+                Set<String> tourTravelNotesTopicRelationNameSet = new HashSet<>(Arrays.asList(tourTravelNotesTopicRelationNameArray));
+
+                //查询哪些是存在于数据库中的,反之获得哪些是不存在于数据库中
+                List<TourTravelNotesTopic> tourTravelNotesTopicServiceInList = tourTravelNotesTopicService.getInList("name", tourTravelNotesTopicRelationNameSet);
+                List<String> topicNameList = tourTravelNotesTopicServiceInList.stream().map(TourTravelNotesTopic::getName).toList();
+                tourTravelNotesTopicRelationNameSet.removeAll(topicNameList);
+
+                //对不存在数据库中的话题,进行新增话题
+                List<TourTravelNotesTopic> tourTravelNotesTopicList = new ArrayList<>();
+                tourTravelNotesTopicRelationNameSet.stream().forEach(item->{
+                    TourTravelNotesTopic tourTravelNotesTopic = new TourTravelNotesTopic();
+                    tourTravelNotesTopic.setName(item);
+                    tourTravelNotesTopic.setEnable(Enable.ENABLE_YES);
+                    tourTravelNotesTopicList.add(tourTravelNotesTopic);
+                });
+                tourTravelNotesTopicService.saveNewBatch(tourTravelNotesTopicList);
+            }
+        }
         tourismProjectTravelNotesWriteService.audit(tourismProjectTravelNotesWrite);
 //        if (!tourismProjectTravelNotesWriteService.update(tourismProjectTravelNotesWrite, originalTourismProjectTravelNotesWrite)) {
 //            return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
@@ -221,6 +250,15 @@ public class TourismProjectTravelNotesWriteController {
         String orderBy = MyOrderParam.buildOrderBy(orderParam, TourismProjectTravelNotesWrite.class);
         List<TourismProjectTravelNotesWrite> tourismProjectTravelNotesWriteList =
                 tourismProjectTravelNotesWriteService.getTourismProjectTravelNotesWriteListWithRelation(tourismProjectTravelNotesWriteFilter, orderBy);
+
+        tourismProjectTravelNotesWriteList.stream().forEach(item->{
+            if(CollectionUtils.isNotEmpty(item.getTourTravelNotesTopicRelationList())){
+                // 使用Stream API提取topicName并拼接成一个逗号分隔的字符串
+                item.setTourTravelNotesTopicRelationName(item.getTourTravelNotesTopicRelationList().stream()
+                        .map(TourTravelNotesTopicRelation::getTopicName) // 获取每个对象的topicName
+                        .collect(Collectors.joining(",")));
+            }
+        });
         return ResponseResult.success(MyPageUtil.makeResponseData(tourismProjectTravelNotesWriteList, TourismProjectTravelNotesWriteVo.class));
     }
 
@@ -237,7 +275,20 @@ public class TourismProjectTravelNotesWriteController {
         if (tourismProjectTravelNotesWrite == null) {
             return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
         }
+        if(CollectionUtils.isNotEmpty(tourismProjectTravelNotesWrite.getTourTravelNotesTopicRelationList())){
+            // 使用Stream API提取topicName并拼接成一个逗号分隔的字符串
+            tourismProjectTravelNotesWrite.setTourTravelNotesTopicRelationName(tourismProjectTravelNotesWrite.getTourTravelNotesTopicRelationList().stream()
+                    .map(TourTravelNotesTopicRelation::getTopicName) // 获取每个对象的topicName
+                    .collect(Collectors.joining(",")));
+        }
+
         TourismProjectTravelNotesWriteVo tourismProjectTravelNotesWriteVo = MyModelUtil.copyTo(tourismProjectTravelNotesWrite, TourismProjectTravelNotesWriteVo.class);
+
+        TourTravelNotesImg tourTravelNotesImg = new TourTravelNotesImg();
+        tourTravelNotesImg.setTravelNotesId(tourismProjectTravelNotesWrite.getId());
+        List<TourTravelNotesImg> tourTravelNotesImgList = tourTravelNotesImgService.getTourTravelNotesImgList(tourTravelNotesImg, "");
+        List<String> tourTravelNotesImgUrlList = tourTravelNotesImgList.stream().map(TourTravelNotesImg::getImgUrl).collect(Collectors.toList());
+        tourismProjectTravelNotesWriteVo.setImgUrls(tourTravelNotesImgUrlList);
         return ResponseResult.success(tourismProjectTravelNotesWriteVo);
     }
 

+ 11 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourFansMapper.java

@@ -1,6 +1,8 @@
 package com.tourism.webadmin.back.dao;
 
 import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.app.website.model.TourShortUser;
+import com.tourism.webadmin.app.website.vo.TourShortUserVo;
 import com.tourism.webadmin.back.model.TourFans;
 import org.apache.ibatis.annotations.Param;
 
@@ -30,4 +32,13 @@ public interface TourFansMapper extends BaseDaoMapper<TourFans> {
      */
     List<TourFans> getTourFansList(
             @Param("tourFansFilter") TourFans tourFansFilter, @Param("orderBy") String orderBy);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param name 模糊查询的昵称。
+     * @return 对象列表。
+     */
+    List<TourShortUser> getFouceEachFriendsByName(
+            @Param("userId") Long userId,@Param("name") String name);
 }

+ 12 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourImGroupMapper.java

@@ -1,6 +1,8 @@
 package com.tourism.webadmin.back.dao;
 
 import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.app.website.model.TourShortImGroup;
+import com.tourism.webadmin.app.website.vo.TourShortImGroupVo;
 import com.tourism.webadmin.back.model.TourImGroup;
 import com.tourism.webadmin.back.model.TourImGroupInvitation;
 import com.tourism.webadmin.back.model.TourImMember;
@@ -50,4 +52,14 @@ public interface TourImGroupMapper extends BaseDaoMapper<TourImGroup> {
             @Param("tourImMemberFilter") TourImMember tourImMemberFilter,
             @Param("tourImMessageFilter") TourImMessage tourImMessageFilter,
             @Param("orderBy") String orderBy);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param userId 用户id。
+     * @param name 昵称。
+     * @return 对象列表。
+     */
+    List<TourShortImGroup> getTakePartImGroupListByName(
+            @Param("userId") Long userId,@Param("name") String name);
 }

+ 32 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTourismProjectSearchRecordsMapper.java

@@ -0,0 +1,32 @@
+package com.tourism.webadmin.back.dao;
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTourismProjectSearchRecords;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记列表搜索数据操作访问接口。
+ *
+ * @author 奇幻之旅
+ * @date 2024-09-06
+ */
+public interface TourTourismProjectSearchRecordsMapper extends BaseDaoMapper<TourTourismProjectSearchRecords> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTourismSearchRecordsList 新增对象列表。
+     */
+    void insertList(List<TourTourismProjectSearchRecords> tourTourismSearchRecordsList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTourismSearchRecordsFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTourismProjectSearchRecords> getTourTourismSearchRecordsList(
+            @Param("tourTourismSearchRecordsFilter") TourTourismProjectSearchRecords tourTourismSearchRecordsFilter, @Param("orderBy") String orderBy);
+}

+ 34 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTourismProjectTravelNotesWriteContentMapper.java

@@ -0,0 +1,34 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTourismProjectTravelNotesWriteContent;
+import com.tourism.webadmin.back.model.TourismTravelNotesContentWrite;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 发布游记的文本框数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTourismProjectTravelNotesWriteContentMapper extends BaseDaoMapper<TourTourismProjectTravelNotesWriteContent> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTourismProjectTravelNotesWriteContentList 新增对象列表。
+     */
+    void insertList(List<TourTourismProjectTravelNotesWriteContent> tourTourismProjectTravelNotesWriteContentList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTourismProjectTravelNotesWriteContentFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTourismProjectTravelNotesWriteContent> getTourTourismProjectTravelNotesWriteContentList(
+            @Param("tourTourismProjectTravelNotesWriteContentFilter") TourTourismProjectTravelNotesWriteContent tourTourismProjectTravelNotesWriteContentFilter, @Param("orderBy") String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesCommentMentionUserMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTravelNotesCommentMentionUser;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记评论中提到的用户数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTravelNotesCommentMentionUserMapper extends BaseDaoMapper<TourTravelNotesCommentMentionUser> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTravelNotesCommentMentionUserList 新增对象列表。
+     */
+    void insertList(List<TourTravelNotesCommentMentionUser> tourTravelNotesCommentMentionUserList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTravelNotesCommentMentionUserFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTravelNotesCommentMentionUser> getTourTravelNotesCommentMentionUserList(
+            @Param("tourTravelNotesCommentMentionUserFilter") TourTravelNotesCommentMentionUser tourTravelNotesCommentMentionUserFilter, @Param("orderBy") String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesImgMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTravelNotesImg;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记中的图片数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTravelNotesImgMapper extends BaseDaoMapper<TourTravelNotesImg> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTravelNotesImgList 新增对象列表。
+     */
+    void insertList(List<TourTravelNotesImg> tourTravelNotesImgList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTravelNotesImgFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTravelNotesImg> getTourTravelNotesImgList(
+            @Param("tourTravelNotesImgFilter") TourTravelNotesImg tourTravelNotesImgFilter, @Param("orderBy") String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesMentionUserMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTravelNotesMentionUser;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记提及的用户数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTravelNotesMentionUserMapper extends BaseDaoMapper<TourTravelNotesMentionUser> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTravelNotesMentionUserList 新增对象列表。
+     */
+    void insertList(List<TourTravelNotesMentionUser> tourTravelNotesMentionUserList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTravelNotesMentionUserFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTravelNotesMentionUser> getTourTravelNotesMentionUserList(
+            @Param("tourTravelNotesMentionUserFilter") TourTravelNotesMentionUser tourTravelNotesMentionUserFilter, @Param("orderBy") String orderBy);
+}

+ 70 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesTopicMapper.java

@@ -0,0 +1,70 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.app.website.vo.NotesViewsVo;
+import com.tourism.webadmin.back.model.TourTravelNotesTopic;
+import com.tourism.webadmin.back.model.TourismProjectTravelNotesWrite;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记话题数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTravelNotesTopicMapper extends BaseDaoMapper<TourTravelNotesTopic> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTravelNotesTopicList 新增对象列表。
+     */
+    void insertList(List<TourTravelNotesTopic> tourTravelNotesTopicList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTravelNotesTopicFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTravelNotesTopic> getTourTravelNotesTopicList(
+            @Param("tourTravelNotesTopicFilter") TourTravelNotesTopic tourTravelNotesTopicFilter, @Param("orderBy") String orderBy);
+
+    /**
+     * 根据游记话题名称查询话题浏览量
+     *
+     * @return 查询结果集。
+     */
+    Integer getViewCountTopicByName(String name,String titleName);
+
+    /**
+     * 根据游记话题名称查询话题浏览量
+     *
+     * @return 查询结果集。
+     */
+    List<NotesViewsVo> getViewCountListTopicByName(List<Long> idList);
+
+    /**
+     * 根据游记话题名称查询话题浏览量
+     *
+     * @return 查询结果集。
+     */
+    Integer getCommentCountTopicByName(String name,String titleName);
+
+    /**
+     * 根据游记话题名称查询游记的数量
+     *
+     * @return 查询结果集。
+     */
+    Integer getCountTravelNotesByName(String name,String titleName);
+
+    /**
+     * 根据游记话题名称查询关联的游记id
+     *
+     * @return 查询结果集。
+     */
+    List<TourismProjectTravelNotesWrite> getTravelNotesByTopicName(String name,String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourTravelNotesTopicRelationMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourTravelNotesTopicRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 游记与话题关联数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourTravelNotesTopicRelationMapper extends BaseDaoMapper<TourTravelNotesTopicRelation> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourTravelNotesTopicRelationList 新增对象列表。
+     */
+    void insertList(List<TourTravelNotesTopicRelation> tourTravelNotesTopicRelationList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourTravelNotesTopicRelationFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourTravelNotesTopicRelation> getTourTravelNotesTopicRelationList(
+            @Param("tourTravelNotesTopicRelationFilter") TourTravelNotesTopicRelation tourTravelNotesTopicRelationFilter, @Param("orderBy") String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserCommentCollectRelationMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourUserCommentCollectRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 用户与评论的收藏关系表数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourUserCommentCollectRelationMapper extends BaseDaoMapper<TourUserCommentCollectRelation> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourUserCommentCollectRelationList 新增对象列表。
+     */
+    void insertList(List<TourUserCommentCollectRelation> tourUserCommentCollectRelationList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourUserCommentCollectRelationFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourUserCommentCollectRelation> getTourUserCommentCollectRelationList(
+            @Param("tourUserCommentCollectRelationFilter") TourUserCommentCollectRelation tourUserCommentCollectRelationFilter, @Param("orderBy") String orderBy);
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserCommentLikeRelationMapper.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.back.model.TourUserCommentLikeRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 用户与评论的点赞关系表数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourUserCommentLikeRelationMapper extends BaseDaoMapper<TourUserCommentLikeRelation> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourUserCommentLikeRelationList 新增对象列表。
+     */
+    void insertList(List<TourUserCommentLikeRelation> tourUserCommentLikeRelationList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourUserCommentLikeRelationFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourUserCommentLikeRelation> getTourUserCommentLikeRelationList(
+            @Param("tourUserCommentLikeRelationFilter") TourUserCommentLikeRelation tourUserCommentLikeRelationFilter, @Param("orderBy") String orderBy);
+}

+ 36 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourUserLikeTopicMapper.java

@@ -0,0 +1,36 @@
+package com.tourism.webadmin.back.dao;
+
+import com.tourism.common.core.base.dao.BaseDaoMapper;
+import com.tourism.webadmin.app.website.vo.SpecialCollectionVo;
+import com.tourism.webadmin.back.model.TourUserLikeTopic;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.*;
+
+/**
+ * 用户与话题的关联表数据操作访问接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+public interface TourUserLikeTopicMapper extends BaseDaoMapper<TourUserLikeTopic> {
+
+    /**
+     * 批量插入对象列表。
+     *
+     * @param tourUserLikeTopicList 新增对象列表。
+     */
+    void insertList(List<TourUserLikeTopic> tourUserLikeTopicList);
+
+    /**
+     * 获取过滤后的对象列表。
+     *
+     * @param tourUserLikeTopicFilter 主表过滤对象。
+     * @param orderBy 排序字符串,order by从句的参数。
+     * @return 对象列表。
+     */
+    List<TourUserLikeTopic> getTourUserLikeTopicList(
+            @Param("tourUserLikeTopicFilter") TourUserLikeTopic tourUserLikeTopicFilter, @Param("orderBy") String orderBy);
+
+    List<SpecialCollectionVo> getSpecialCollection(Long userId);
+}

+ 3 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourismProjectTravelNotesWriteMapper.java

@@ -36,4 +36,7 @@ public interface TourismProjectTravelNotesWriteMapper extends BaseDaoMapper<Tour
 
     @Select("select id from tour_tourism_project_travel_notes_writer where create_user_id = #{userId}")
     List<Long> getTravelNoteIds(@Param("userId") Long userId);
+
+
+    Long getLikeCount(@Param("list") Set<Long> list);
 }

+ 2 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourismTravelNotesContentWriteMapper.java

@@ -30,4 +30,6 @@ public interface TourismTravelNotesContentWriteMapper extends BaseDaoMapper<Tour
      */
     List<TourismTravelNotesContentWrite> getTourismTravelNotesContentWriteList(
             @Param("tourismTravelNotesContentWriteFilter") TourismTravelNotesContentWrite tourismTravelNotesContentWriteFilter, @Param("orderBy") String orderBy);
+
+    int deleteContById(Long associationId);
 }

+ 18 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourFansMapper.xml

@@ -60,4 +60,22 @@
             ORDER BY ${orderBy}
         </if>
     </select>
+
+    <select id="getFouceEachFriendsByName" resultType="com.tourism.webadmin.app.website.model.TourShortUser" parameterType="String">
+        SELECT user.user_id, user.show_name, user.head_image_url
+        FROM tour_user AS user
+        WHERE user.user_id IN (
+        SELECT f1.attention_id AS mutual_follow_user_id
+        FROM tour_fans f1
+        JOIN tour_fans f2
+        ON f1.attention_id = f2.create_user_id
+        AND f1.create_user_id = f2.attention_id
+        WHERE f1.create_user_id = #{userId}
+        AND f1.delete_flag = 1
+        AND f2.delete_flag = 1
+        )
+        <if test="name != null and name != ''">
+            AND user.show_name LIKE CONCAT('%', #{name}, '%')
+        </if>
+    </select>
 </mapper>

+ 18 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourImGroupMapper.xml

@@ -155,4 +155,22 @@
             ORDER BY ${orderBy}
         </if>
     </select>
+
+    <select id="getTakePartImGroupListByName" resultType="com.tourism.webadmin.app.website.model.TourShortImGroup">
+        SELECT
+            g.id,
+            g.group_name,
+            g.group_avatar
+        FROM
+            tour_im_group g
+                INNER JOIN
+            tour_im_member m
+            ON
+                g.id = m.group_id
+        WHERE
+            m.user_id = #{userId} and g.data_state = 1 and m.data_state = 1 and g.notice_type = 2
+        <if test="name != null and name != ''">
+        AND g.group_name LIKE CONCAT('%', #{name}, '%')
+        </if>
+    </select>
 </mapper>

+ 88 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTourismProjectSearchRecordsMapper.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTourismProjectSearchRecordsMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTourismProjectSearchRecords">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="search_keyword" jdbcType="VARCHAR" property="searchKeyword"/>
+        <result column="search_result_count" jdbcType="INTEGER" property="searchResultCount"/>
+        <result column="search_time" jdbcType="TIMESTAMP" property="searchTime"/>
+        <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="data_state" jdbcType="TINYINT" property="dataState"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_tourism_project_search_records
+            (id,
+            search_keyword,
+            search_result_count,
+            search_time,
+            create_user_id,
+            create_time,
+            update_user_id,
+            update_time,
+            data_state)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.searchKeyword},
+            #{item.searchResultCount},
+            #{item.searchTime},
+            #{item.createUserId},
+            #{item.createTime},
+            #{item.updateUserId},
+            #{item.updateTime},
+            #{item.dataState})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTourismProjectSearchRecordsMapper.inputFilterRef"/>
+        AND tour_tourism_project_search_records.data_state = ${@com.tourism.common.core.constant.GlobalDeletedFlag@NORMAL}
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTourismSearchRecordsFilter != null">
+            <if test="tourTourismSearchRecordsFilter.id != null">
+                AND tour_tourism_project_search_records.id = #{tourTourismSearchRecordsFilter.id}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchKeyword != null and tourTourismSearchRecordsFilter.searchKeyword != ''">
+                <bind name = "safeTourTourismSearchRecordsSearchKeyword" value = "'%' + tourTourismSearchRecordsFilter.searchKeyword + '%'" />
+                AND tour_tourism_project_search_records.search_keyword LIKE #{safeTourTourismSearchRecordsSearchKeyword}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchResultCountStart != null">
+                AND tour_tourism_project_search_records.search_result_count &gt;= #{tourTourismSearchRecordsFilter.searchResultCountStart}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchResultCountEnd != null">
+                AND tour_tourism_project_search_records.search_result_count &lt;= #{tourTourismSearchRecordsFilter.searchResultCountEnd}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchTimeStart != null and tourTourismSearchRecordsFilter.searchTimeStart != ''">
+                AND tour_tourism_project_search_records.search_time &gt;= #{tourTourismSearchRecordsFilter.searchTimeStart}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchTimeEnd != null and tourTourismSearchRecordsFilter.searchTimeEnd != ''">
+                AND tour_tourism_project_search_records.search_time &lt;= #{tourTourismSearchRecordsFilter.searchTimeEnd}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.createUserId != null and tourTourismSearchRecordsFilter.createUserId != ''">
+                AND tour_tourism_project_search_records.create_user_id = #{tourTourismSearchRecordsFilter.createUserId}
+            </if>
+            <if test="tourTourismSearchRecordsFilter.searchType != null">
+                AND tour_tourism_project_search_records.search_type = #{tourTourismSearchRecordsFilter.searchType}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTourismSearchRecordsList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTourismProjectSearchRecords">
+        SELECT * FROM tour_tourism_project_search_records
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 63 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTourismProjectTravelNotesWriteContentMapper.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTourismProjectTravelNotesWriteContentMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTourismProjectTravelNotesWriteContent">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="association_id" jdbcType="BIGINT" property="associationId"/>
+        <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="data_state" jdbcType="TINYINT" property="dataState"/>
+        <result column="content" jdbcType="LONGVARCHAR" property="content"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_tourism_project_travel_notes_writer_content
+            (id,
+            association_id,
+            create_user_id,
+            create_time,
+            update_user_id,
+            update_time,
+            data_state,
+            content)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.associationId},
+            #{item.createUserId},
+            #{item.createTime},
+            #{item.updateUserId},
+            #{item.updateTime},
+            #{item.dataState},
+            #{item.content})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTourismProjectTravelNotesWriteContentMapper.inputFilterRef"/>
+        AND tour_tourism_project_travel_notes_writer_content.data_state = ${@com.tourism.common.core.constant.GlobalDeletedFlag@NORMAL}
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTourismProjectTravelNotesWriteContentFilter != null">
+            <if test="tourTourismProjectTravelNotesWriteContentFilter.associationId != null">
+                AND tour_tourism_project_travel_notes_writer_content.association_id = #{tourTourismProjectTravelNotesWriteContentFilter.associationId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTourismProjectTravelNotesWriteContentList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTourismProjectTravelNotesWriteContent">
+        SELECT * FROM tour_tourism_project_travel_notes_writer_content
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 8 - 2
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesCommentMapper.xml

@@ -16,6 +16,8 @@
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="is_author" jdbcType="INTEGER" property="isAuthor"/>
+        <result column="collect_num" jdbcType="INTEGER" property="collectNum"/>
     </resultMap>
 
     <insert id="insertList">
@@ -33,7 +35,9 @@
             create_time,
             update_user_id,
             update_time,
-            comment_user_id)
+            comment_user_id,
+            is_author,
+            collect_num)
         VALUES
         <foreach collection="list" index="index" item="item" separator="," >
             (#{item.id},
@@ -49,7 +53,9 @@
             #{item.createTime},
             #{item.updateUserId},
             #{item.updateTime},
-            #{item.commentUserId})
+            #{item.commentUserId},
+            #{item.isAuthor},
+            #{item.collectNum})
         </foreach>
     </insert>
 

+ 58 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesCommentMentionUserMapper.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTravelNotesCommentMentionUserMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTravelNotesCommentMentionUser">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="comment_id" jdbcType="BIGINT" property="commentId"/>
+        <result column="user_name" jdbcType="VARCHAR" property="userName"/>
+        <result column="user_id" jdbcType="BIGINT" property="userId"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_travel_notes_comment_mention_user
+        INSERT INTO tour_travel_notes_comment_mention_user
+            (id,
+            comment_id,
+            user_name,
+            user_id)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.commentId},
+            #{item.userName},
+            #{item.userId})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTravelNotesCommentMentionUserMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTravelNotesCommentMentionUserFilter != null">
+            <if test="tourTravelNotesCommentMentionUserFilter.commentId != null">
+                AND tour_travel_notes_comment_mention_user.comment_id = #{tourTravelNotesCommentMentionUserFilter.commentId}
+            </if>
+            <if test="tourTravelNotesCommentMentionUserFilter.userName != null and tourTravelNotesCommentMentionUserFilter.userName != ''">
+                <bind name = "safeTourTravelNotesCommentMentionUserUserName" value = "'%' + tourTravelNotesCommentMentionUserFilter.userName + '%'" />
+                AND tour_travel_notes_comment_mention_user.user_name LIKE #{safeTourTravelNotesCommentMentionUserUserName}
+            </if>
+            <if test="tourTravelNotesCommentMentionUserFilter.userId != null">
+                AND tour_travel_notes_comment_mention_user.user_id = #{tourTravelNotesCommentMentionUserFilter.userId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTravelNotesCommentMentionUserList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTravelNotesCommentMentionUser">
+        SELECT * FROM tour_travel_notes_comment_mention_user
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesImgMapper.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTravelNotesImgMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTravelNotesImg">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="img_url" jdbcType="VARCHAR" property="imgUrl"/>
+        <result column="travel_notes_id" jdbcType="BIGINT" property="travelNotesId"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_travel_notes_img
+            (id,
+            img_url,
+            travel_notes_id)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.imgUrl},
+            #{item.travelNotesId})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTravelNotesImgMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTravelNotesImgFilter != null">
+            <if test="tourTravelNotesImgFilter.travelNotesId != null">
+                AND tour_travel_notes_img.travel_notes_id = #{tourTravelNotesImgFilter.travelNotesId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTravelNotesImgList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTravelNotesImg">
+        SELECT * FROM tour_travel_notes_img
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 57 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesMentionUserMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTravelNotesMentionUserMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTravelNotesMentionUser">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="travel_notes_id" jdbcType="BIGINT" property="travelNotesId"/>
+        <result column="user_name" jdbcType="VARCHAR" property="userName"/>
+        <result column="user_id" jdbcType="BIGINT" property="userId"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_travel_notes_mention_user
+            (id,
+            travel_notes_id,
+            user_name,
+            user_id)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.travelNotesId},
+            #{item.userName},
+            #{item.userId})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTravelNotesMentionUserMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTravelNotesMentionUserFilter != null">
+            <if test="tourTravelNotesMentionUserFilter.travelNotesId != null">
+                AND tour_travel_notes_mention_user.travel_notes_id = #{tourTravelNotesMentionUserFilter.travelNotesId}
+            </if>
+            <if test="tourTravelNotesMentionUserFilter.userName != null and tourTravelNotesMentionUserFilter.userName != ''">
+                <bind name = "safeTourTravelNotesMentionUserUserName" value = "'%' + tourTravelNotesMentionUserFilter.userName + '%'" />
+                AND tour_travel_notes_mention_user.user_name LIKE #{safeTourTravelNotesMentionUserUserName}
+            </if>
+            <if test="tourTravelNotesMentionUserFilter.userId != null">
+                AND tour_travel_notes_mention_user.user_id = #{tourTravelNotesMentionUserFilter.userId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTravelNotesMentionUserList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTravelNotesMentionUser">
+        SELECT * FROM tour_travel_notes_mention_user
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 171 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesTopicMapper.xml

@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTravelNotesTopicMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTravelNotesTopic">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="enable" jdbcType="TINYINT" property="enable"/>
+        <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="data_state" jdbcType="TINYINT" property="dataState"/>
+        <result column="hot_value" jdbcType="INTEGER" property="hotValue"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_travel_notes_topic
+            (id,
+            name,
+            enable,
+            create_user_id,
+            create_time,
+            update_user_id,
+            update_time,
+            data_state,
+            hot_value)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.name},
+            #{item.enable},
+            #{item.createUserId},
+            #{item.createTime},
+            #{item.updateUserId},
+            #{item.updateTime},
+            #{item.dataState},
+            #{item.hotValue})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTravelNotesTopicMapper.inputFilterRef"/>
+        AND tour_travel_notes_topic.data_state = ${@com.tourism.common.core.constant.GlobalDeletedFlag@NORMAL}
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTravelNotesTopicFilter != null">
+            <if test="tourTravelNotesTopicFilter.name != null and tourTravelNotesTopicFilter.name != ''">
+                <bind name = "safeTourTravelNotesTopicName" value = "'%' + tourTravelNotesTopicFilter.name + '%'" />
+                AND tour_travel_notes_topic.name LIKE #{safeTourTravelNotesTopicName}
+            </if>
+            <if test="tourTravelNotesTopicFilter.enable != null">
+                AND tour_travel_notes_topic.enable = #{tourTravelNotesTopicFilter.enable}
+            </if>
+            <if test="tourTravelNotesTopicFilter.hotValueStart != null">
+                AND tour_travel_notes_topic.hot_value &gt;= #{tourTravelNotesTopicFilter.hotValueStart}
+            </if>
+            <if test="tourTravelNotesTopicFilter.hotValueEnd != null">
+                AND tour_travel_notes_topic.hot_value &lt;= #{tourTravelNotesTopicFilter.hotValueEnd}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTravelNotesTopicList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTravelNotesTopic">
+        SELECT * FROM tour_travel_notes_topic
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+
+    <select id="getViewCountTopicByName" resultType="Integer" parameterType="String">
+        SELECT
+            SUM(ttn.page_view_count) AS total_page_views
+        FROM
+            tour_travel_notes_topic_relation ttnr
+                JOIN
+            tour_tourism_project_travel_notes_writer ttn
+            ON
+                ttnr.travel_notes_id = ttn.id
+        WHERE
+            ttnr.topic_name = #{name} and ttn.data_state = 1
+        <if test="titleName != null and titleName !=''">
+            and ttn.project_title LIKE CONCAT('%', #{titleName}, '%');
+        </if>
+    </select>
+    <resultMap id="viewCountMap" type="java.util.Map">
+        <id property="id" column="id" />
+        <result property="totalPageViews" column="total_page_views"/>
+    </resultMap>
+
+    <select id="getViewCountListTopicByName" resultType="com.tourism.webadmin.app.website.vo.NotesViewsVo" parameterType="java.util.List">
+        SELECT
+        ttnr.topic_id AS id,
+        SUM(ttn.page_view_count) AS total_page_views
+        FROM
+        tour_travel_notes_topic_relation ttnr
+        JOIN
+        tour_tourism_project_travel_notes_writer ttn
+        ON ttnr.travel_notes_id = ttn.id
+        WHERE
+        ttnr.topic_id IN
+        <foreach collection="idList" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+        AND ttn.data_state = 1
+        GROUP BY
+        ttnr.topic_id
+    </select>
+
+    <select id="getCommentCountTopicByName" resultType="Integer" parameterType="String">
+        SELECT
+            COUNT(tnc.id) AS total_comment_count
+        FROM
+            tour_travel_notes_topic_relation ttnr
+                JOIN
+            tour_tourism_project_travel_notes_writer ttn
+            ON ttnr.travel_notes_id = ttn.id
+                LEFT JOIN
+            tour_travel_notes_comment tnc
+            ON ttn.id = tnc.travel_note_id
+        WHERE
+            ttnr.topic_name = #{name} and ttn.data_state = 1
+        <if test="titleName != null and titleName !=''">
+            and ttn.project_title LIKE CONCAT('%', #{titleName}, '%');
+        </if>
+    </select>
+
+    <select id="getCountTravelNotesByName" resultType="Integer" parameterType="String">
+        SELECT
+            COUNT(DISTINCT ttnr.travel_notes_id) AS travel_note_count
+        FROM
+            tour_travel_notes_topic_relation ttnr
+        left join tour_tourism_project_travel_notes_writer ttn on ttnr.travel_notes_id = ttn.id
+        WHERE
+            ttnr.topic_name = #{name}
+            and ttn.data_state = 1
+            AND ttn.state = 3
+            AND ttn.unmount_state = 1
+        <if test="titleName != null and titleName !=''">
+            and ttn.project_title LIKE CONCAT('%', #{titleName}, '%');
+        </if>
+    </select>
+
+    <select id="getTravelNotesByTopicName" resultType="TourismProjectTravelNotesWrite" parameterType="String">
+        SELECT
+            DISTINCT tttw.*
+        FROM
+            tour_tourism_project_travel_notes_writer tttw
+                JOIN
+            tour_travel_notes_topic_relation ttnr
+            ON
+                tttw.id = ttnr.travel_notes_id
+        WHERE
+            ttnr.topic_name = #{name}
+          AND tttw.state = 3
+          AND tttw.unmount_state = 1
+          AND tttw.data_state = 1
+        <if test="orderBy == null or orderBy == 0">
+            ORDER BY tttw.hot_value DESC
+        </if>
+        <if test="orderBy == 1">
+            ORDER BY tttw.create_time DESC
+        </if>
+    </select>
+</mapper>

+ 57 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourTravelNotesTopicRelationMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourTravelNotesTopicRelationMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourTravelNotesTopicRelation">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="travel_notes_id" jdbcType="BIGINT" property="travelNotesId"/>
+        <result column="topic_id" jdbcType="BIGINT" property="topicId"/>
+        <result column="topic_name" jdbcType="VARCHAR" property="topicName"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_travel_notes_topic_relation
+            (id,
+            travel_notes_id,
+            topic_id,
+            topic_name)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.travelNotesId},
+            #{item.topicId},
+            #{item.topicName})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourTravelNotesTopicRelationMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourTravelNotesTopicRelationFilter != null">
+            <if test="tourTravelNotesTopicRelationFilter.travelNotesId != null">
+                AND tour_travel_notes_topic_relation.travel_notes_id = #{tourTravelNotesTopicRelationFilter.travelNotesId}
+            </if>
+            <if test="tourTravelNotesTopicRelationFilter.topicId != null">
+                AND tour_travel_notes_topic_relation.topic_id = #{tourTravelNotesTopicRelationFilter.topicId}
+            </if>
+            <if test="tourTravelNotesTopicRelationFilter.topicName != null and tourTravelNotesTopicRelationFilter.topicName != ''">
+                <bind name = "safeTourTravelNotesTopicRelationTopicName" value = "'%' + tourTravelNotesTopicRelationFilter.topicName + '%'" />
+                AND tour_travel_notes_topic_relation.topic_name LIKE #{safeTourTravelNotesTopicRelationTopicName}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourTravelNotesTopicRelationList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourTravelNotesTopicRelation">
+        SELECT * FROM tour_travel_notes_topic_relation
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserCommentCollectRelationMapper.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourUserCommentCollectRelationMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourUserCommentCollectRelation">
+        <id column="user_id" jdbcType="BIGINT" property="userId"/>
+        <result column="comment_id" jdbcType="BIGINT" property="commentId"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_user_comment_collect_relation
+            (user_id,
+            comment_id)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.userId},
+            #{item.commentId})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourUserCommentCollectRelationMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourUserCommentCollectRelationFilter != null">
+            <if test="tourUserCommentCollectRelationFilter.userId != null">
+                AND tour_user_comment_collect_relation.user_id = #{tourUserCommentCollectRelationFilter.userId}
+            </if>
+            <if test="tourUserCommentCollectRelationFilter.commentId != null">
+                AND tour_user_comment_collect_relation.comment_id = #{tourUserCommentCollectRelationFilter.commentId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourUserCommentCollectRelationList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourUserCommentCollectRelation">
+        SELECT * FROM tour_user_comment_collect_relation
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 48 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserCommentLikeRelationMapper.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourUserCommentLikeRelationMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourUserCommentLikeRelation">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="comment_id" jdbcType="BIGINT" property="commentId"/>
+        <result column="user_id" jdbcType="BIGINT" property="userId"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_user_comment_like_relation
+            (id,user_id,
+            comment_id)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},#{item.userId},
+            #{item.commentId})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourUserCommentLikeRelationMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourUserCommentLikeRelationFilter != null">
+            <if test="tourUserCommentLikeRelationFilter.userId != null">
+                AND tour_user_comment_like_relation.user_id = #{tourUserCommentLikeRelationFilter.userId}
+            </if>
+            <if test="tourUserCommentLikeRelationFilter.commentId != null">
+                AND tour_user_comment_like_relation.comment_id = #{tourUserCommentLikeRelationFilter.commentId}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourUserCommentLikeRelationList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourUserCommentLikeRelation">
+        SELECT * FROM tour_user_comment_like_relation
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+</mapper>

+ 70 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourUserLikeTopicMapper.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tourism.webadmin.back.dao.TourUserLikeTopicMapper">
+    <resultMap id="BaseResultMap" type="com.tourism.webadmin.back.model.TourUserLikeTopic">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="tour_user_id" jdbcType="BIGINT" property="tourUserId"/>
+        <result column="tour_travel_notes_topic_id" jdbcType="BIGINT" property="tourTravelNotesTopicId"/>
+        <result column="tour_travel_notes_topic_name" jdbcType="VARCHAR" property="tourTravelNotesTopicName"/>
+    </resultMap>
+
+    <insert id="insertList">
+        INSERT INTO tour_user_like_topic
+            (id,
+            tour_user_id,
+            tour_travel_notes_topic_id,
+            tour_travel_notes_topic_name)
+        VALUES
+        <foreach collection="list" index="index" item="item" separator="," >
+            (#{item.id},
+            #{item.tourUserId},
+            #{item.tourTravelNotesTopicId},
+            #{item.tourTravelNotesTopicName})
+        </foreach>
+    </insert>
+
+    <!-- 如果有逻辑删除字段过滤,请写到这里 -->
+    <sql id="filterRef">
+        <!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
+        <include refid="com.tourism.webadmin.back.dao.TourUserLikeTopicMapper.inputFilterRef"/>
+    </sql>
+
+    <!-- 这里仅包含调用接口输入的主表过滤条件 -->
+    <sql id="inputFilterRef">
+        <if test="tourUserLikeTopicFilter != null">
+            <if test="tourUserLikeTopicFilter.tourUserId != null">
+                AND tour_user_like_topic.tour_user_id = #{tourUserLikeTopicFilter.tourUserId}
+            </if>
+            <if test="tourUserLikeTopicFilter.tourTravelNotesTopicId != null">
+                AND tour_user_like_topic.tour_travel_notes_topic_id = #{tourUserLikeTopicFilter.tourTravelNotesTopicId}
+            </if>
+            <if test="tourUserLikeTopicFilter.tourTravelNotesTopicName != null and tourUserLikeTopicFilter.tourTravelNotesTopicName != ''">
+                AND tour_user_like_topic.tour_travel_notes_topic_name = #{tourUserLikeTopicFilter.tourTravelNotesTopicName}
+            </if>
+        </if>
+    </sql>
+
+    <select id="getTourUserLikeTopicList" resultMap="BaseResultMap" parameterType="com.tourism.webadmin.back.model.TourUserLikeTopic">
+        SELECT * FROM tour_user_like_topic
+        <where>
+            <include refid="filterRef"/>
+        </where>
+        <if test="orderBy != null and orderBy != ''">
+            ORDER BY ${orderBy}
+        </if>
+    </select>
+
+    <select id="getSpecialCollection" resultType="com.tourism.webadmin.app.website.vo.SpecialCollectionVo">
+        SELECT
+            t1.id,
+            t1.name,
+            t1.hot_value
+        FROM
+            tour_travel_notes_topic as t1
+        INNER JOIN
+            tour_user_like_topic as t2
+        ON t1.id = t2.tour_travel_notes_topic_id
+        where  t2.tour_user_id=#{userId}
+        ORDER BY t2.creat_time DESC
+    </select>
+</mapper>

+ 31 - 4
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourismProjectTravelNotesWriteMapper.xml

@@ -32,6 +32,8 @@
         <result column="auto_reject_reason" jdbcType="VARCHAR" property="autoRejectReason"/>
         <result column="travel_mode" jdbcType="TINYINT" property="travelMode"/>
         <result column="travel_number" jdbcType="VARCHAR" property="travelNumber"/>
+        <result column="tour_im_group_id" jdbcType="BIGINT" property="tourImGroupId"/>
+        <result column="visible_range" jdbcType="BIGINT" property="visibleRange"/>
     </resultMap>
 
     <insert id="insertList">
@@ -65,7 +67,9 @@
             auto_audit_status,
             auto_reject_reason,
             travel_mode,
-            travel_number)
+            travel_number,
+            tour_im_group_id,
+            visible_range)
         VALUES
         <foreach collection="list" index="index" item="item" separator="," >
             (#{item.id},
@@ -97,7 +101,9 @@
             #{item.autoAuditStatus},
             #{item.autoRejectReason},
             #{item.travelMode},
-            #{item.travelNumber})
+            #{item.travelNumber},
+            #{item.tourImGroupId},
+            #{item.visibleRange})
         </foreach>
     </insert>
 
@@ -158,6 +164,9 @@
             <if test="tourismProjectTravelNotesWriteFilter.isOriginal != null">
                 AND tour_tourism_project_travel_notes_writer.is_original = #{tourismProjectTravelNotesWriteFilter.isOriginal}
             </if>
+            <if test="tourismProjectTravelNotesWriteFilter.visibleRange != null">
+                AND tour_tourism_project_travel_notes_writer.visible_range = #{tourismProjectTravelNotesWriteFilter.visibleRange}
+            </if>
             <if test="tourismProjectTravelNotesWriteFilter.endPlace != null and tourismProjectTravelNotesWriteFilter.endPlace != ''">
                 AND tour_tourism_project_travel_notes_writer.end_place = #{tourismProjectTravelNotesWriteFilter.endPlace}
             </if>
@@ -165,10 +174,12 @@
                 <bind name = "safeTourismProjectTravelNotesWriteSearchString" value = "'%' + tourismProjectTravelNotesWriteFilter.searchString + '%'" />
                 AND CONCAT(IFNULL(tour_tourism_project_travel_notes_writer.project_title,''), IFNULL(tour_tourism_project_travel_notes_writer.count_times,''), IFNULL(tour_tourism_project_travel_notes_writer.role,''), IFNULL(tour_tourism_project_travel_notes_writer.average_cost,''), IFNULL(tour_tourism_project_travel_notes_writer.reason,'')) LIKE #{safeTourismProjectTravelNotesWriteSearchString}
             </if>
-
             <if test="tourismProjectTravelNotesWriteFilter.unmountState != null">
                 AND tour_tourism_project_travel_notes_writer.unmount_state = #{tourismProjectTravelNotesWriteFilter.unmountState}
             </if>
+            <if test="tourismProjectTravelNotesWriteFilter.tourImGroupId != null">
+                AND tour_tourism_project_travel_notes_writer.tour_im_group_id = #{tourismProjectTravelNotesWriteFilter.tourImGroupId}
+            </if>
             <if test="tourismProjectTravelNotesWriteFilter.directoryInfoIds != null and tourismProjectTravelNotesWriteFilter.directoryInfoIds.size() > 0">
                 AND tour_tourism_project_travel_notes_writer.end_place IN
                 <foreach item="id" index="index" collection="tourismProjectTravelNotesWriteFilter.directoryInfoIds" open="(" separator="," close=")">
@@ -178,6 +189,12 @@
             <if test="tourismProjectTravelNotesWriteFilter.travelMode != null">
                 AND tour_tourism_project_travel_notes_writer.travel_mode = #{tourismProjectTravelNotesWriteFilter.travelMode}
             </if>
+            <if test="tourismProjectTravelNotesWriteFilter.creatUserIdFilter!= null and tourismProjectTravelNotesWriteFilter.creatUserIdFilter.size() > 0">
+                AND tour_tourism_project_travel_notes_writer.create_user_id
+                <foreach collection="tourismProjectTravelNotesWriteFilter.creatUserIdFilter" index="index" item="id" open="IN(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
         </if>
     </sql>
 
@@ -207,7 +224,8 @@
             like_count = #{tourismProjectTravelNotesWriteFilter.likeCount},
             page_view_count = #{tourismProjectTravelNotesWriteFilter.pageViewCount},
             hot_value = #{tourismProjectTravelNotesWriteFilter.hotValue},
-            is_original = #{tourismProjectTravelNotesWriteFilter.isOriginal}
+            is_original = #{tourismProjectTravelNotesWriteFilter.isOriginal},
+            publish_time = NOW()
         </if>
     </sql>
 
@@ -220,4 +238,13 @@
             id = #{tourismProjectTravelNotesWriteFilter.id}
         </where>
     </update>
+
+    <select id="getLikeCount" resultType="java.lang.Long">
+        select SUM(like_count) as likeCount
+        FROM tour_tourism_project_travel_notes_writer
+        WHERE id
+        <foreach collection="list" item="id" open="IN(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
 </mapper>

+ 5 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/mapper/TourismTravelNotesContentWriteMapper.xml

@@ -62,4 +62,9 @@
             ORDER BY ${orderBy}
         </if>
     </select>
+
+    <delete id="deleteContById">
+        UPDATE tour_tourism_project_travel_notes_writer_content SET data_state=-1
+        WHERE data_state=1 AND association_id=#{associationId}
+    </delete>
 </mapper>

+ 45 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTourismProjectTravelNotesWriteContentDto.java

@@ -0,0 +1,45 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import jakarta.validation.constraints.*;
+import java.util.Date;
+
+/**
+ * 游记内容表Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记内容表Dto对象")
+@Data
+public class TourTourismProjectTravelNotesWriteContentDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 关联表id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "关联表id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,关联表id不能为空!", groups = {UpdateGroup.class})
+    private Long associationId;
+
+    /**
+     * 内容。
+     */
+    @Schema(description = "内容。")
+    private String content;
+
+    /**
+     * 游记发布时间。
+     */
+    @Schema(description = "游记发布时间。")
+    private Date publishTime;
+}

+ 80 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTourismSearchRecordsDto.java

@@ -0,0 +1,80 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+import java.util.Date;
+
+/**
+ * 游记列表搜索Dto对象。
+ *
+ * @author 奇幻之旅
+ * @date 2024-09-06
+ */
+@Schema(description = "游记列表搜索Dto对象")
+@Data
+public class TourTourismSearchRecordsDto {
+
+    /**
+     * 主键id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "主键id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 搜索关键词。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "搜索关键词。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "数据验证失败,搜索关键词不能为空!")
+    private String searchKeyword;
+
+    /**
+     * 搜索结果数量。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "搜索结果数量。可支持等于操作符的列表数据过滤。")
+    private Integer searchResultCount;
+
+    /**
+     * 搜索时间。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "搜索时间。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,搜索时间不能为空!")
+    private Date searchTime;
+
+    /**
+     * searchResultCount 范围过滤起始值(>=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "searchResultCount 范围过滤起始值(>=)。可支持范围操作符的列表数据过滤。")
+    private Integer searchResultCountStart;
+
+    /**
+     * searchResultCount 范围过滤结束值(<=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "searchResultCount 范围过滤结束值(<=)。可支持范围操作符的列表数据过滤。")
+    private Integer searchResultCountEnd;
+
+    /**
+     * searchTime 范围过滤起始值(>=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "searchTime 范围过滤起始值(>=)。可支持范围操作符的列表数据过滤。")
+    private String searchTimeStart;
+
+    /**
+     * searchTime 范围过滤结束值(<=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "searchTime 范围过滤结束值(<=)。可支持范围操作符的列表数据过滤。")
+    private String searchTimeEnd;
+}

+ 18 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesCommentDto.java

@@ -1,12 +1,18 @@
 package com.tourism.webadmin.back.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.tourism.common.core.annotation.RelationConstDict;
 import com.tourism.common.core.validator.UpdateGroup;
 
+import com.tourism.webadmin.back.model.constant.BannerType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import jakarta.validation.constraints.*;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 游记评论Dto对象。
  *
@@ -66,4 +72,16 @@ public class TourTravelNotesCommentDto {
      */
     @Schema(description = "评论楼层。")
     private String floor;
+
+    /**
+     * 是否为作者的评论(0,不是;1,是)。
+     */
+    @Schema(description = "是否为作者的评论(0,不是;1,是)。")
+    private Integer isAuthor;
+
+    /**
+     * 游记评论中提及的用户。
+     */
+    @Schema(description = "游记评论中提及的用户。")
+    private List<TourTravelNotesCommentMentionUserDto> tourTravelNotesCommentMentionUser;
 }

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesCommentMentionUserDto.java

@@ -0,0 +1,47 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 游记评论中提到的用户Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记评论中提到的用户Dto对象")
+@Data
+public class TourTravelNotesCommentMentionUserDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 评论id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "评论id。可支持等于操作符的列表数据过滤。")
+    private Long commentId;
+
+    /**
+     * 写游记提到的用户昵称。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "写游记提到的用户昵称。可支持等于操作符的列表数据过滤。")
+    private String userName;
+
+    /**
+     * 写游记提到的用户id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "写游记提到的用户id。可支持等于操作符的列表数据过滤。")
+    private Long userId;
+}

+ 39 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesImgDto.java

@@ -0,0 +1,39 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 游记中的图片Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记中的图片Dto对象")
+@Data
+public class TourTravelNotesImgDto {
+
+    /**
+     * id。
+     */
+    @Schema(description = "id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 图片地址。
+     */
+    @Schema(description = "图片地址。")
+    private String imgUrl;
+
+    /**
+     * 游记id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "游记id。可支持等于操作符的列表数据过滤。")
+    private Long travelNotesId;
+}

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesMentionUserDto.java

@@ -0,0 +1,47 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 游记提及的用户Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记提及的用户Dto对象")
+@Data
+public class TourTravelNotesMentionUserDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 游记id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "游记id。可支持等于操作符的列表数据过滤。")
+    private Long travelNotesId;
+
+    /**
+     * 写游记提到的用户昵称。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "写游记提到的用户昵称。可支持等于操作符的列表数据过滤。")
+    private String userName;
+
+    /**
+     * 写游记提到的用户id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "写游记提到的用户id。可支持等于操作符的列表数据过滤。")
+    private Long userId;
+}

+ 64 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesTopicDto.java

@@ -0,0 +1,64 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+import com.tourism.common.core.validator.ConstDictRef;
+import com.tourism.webadmin.back.model.constant.Enable;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 游记话题Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记话题Dto对象")
+@Data
+public class TourTravelNotesTopicDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 话题名称。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "话题名称。可支持等于操作符的列表数据过滤。")
+    private String name;
+
+    /**
+     * 是否启用,0否,1是。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "是否启用,0否,1是。可支持等于操作符的列表数据过滤。")
+    @ConstDictRef(constDictClass = Enable.class, message = "数据验证失败,是否启用,0否,1是为无效值!")
+    private Integer enable;
+
+    /**
+     * 热度值。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "热度值。可支持等于操作符的列表数据过滤。")
+    private Integer hotValue;
+
+    /**
+     * hotValue 范围过滤起始值(>=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "hotValue 范围过滤起始值(>=)。可支持范围操作符的列表数据过滤。")
+    private Integer hotValueStart;
+
+    /**
+     * hotValue 范围过滤结束值(<=)。
+     * NOTE: 可支持范围操作符的列表数据过滤。
+     */
+    @Schema(description = "hotValue 范围过滤结束值(<=)。可支持范围操作符的列表数据过滤。")
+    private Integer hotValueEnd;
+}

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourTravelNotesTopicRelationDto.java

@@ -0,0 +1,47 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 游记与话题关联Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "游记与话题关联Dto对象")
+@Data
+public class TourTravelNotesTopicRelationDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 游记id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "游记id。可支持等于操作符的列表数据过滤。")
+    private Long travelNotesId;
+
+    /**
+     * 话题id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "话题id。可支持等于操作符的列表数据过滤。")
+    private Long topicId;
+
+    /**
+     * 话题名称。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "话题名称。可支持等于操作符的列表数据过滤。")
+    private String topicName;
+}

+ 35 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserCommentCollectRelationDto.java

@@ -0,0 +1,35 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 用户与评论的收藏关系表Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "用户与评论的收藏关系表Dto对象")
+@Data
+public class TourUserCommentCollectRelationDto {
+
+    /**
+     * 用户Id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "用户Id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,用户Id不能为空!", groups = {UpdateGroup.class})
+    private Long userId;
+
+    /**
+     * 评论id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "评论id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,评论id不能为空!")
+    private Long commentId;
+}

+ 35 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserCommentLikeRelationDto.java

@@ -0,0 +1,35 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 用户与评论的点赞关系表Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "用户与评论的点赞关系表Dto对象")
+@Data
+public class TourUserCommentLikeRelationDto {
+
+    /**
+     * 用户Id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "用户Id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,用户Id不能为空!", groups = {UpdateGroup.class})
+    private Long userId;
+
+    /**
+     * 评论id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "评论id。可支持等于操作符的列表数据过滤。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,评论id不能为空!")
+    private Long commentId;
+}

+ 47 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourUserLikeTopicDto.java

@@ -0,0 +1,47 @@
+package com.tourism.webadmin.back.dto;
+
+import com.tourism.common.core.validator.UpdateGroup;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import jakarta.validation.constraints.*;
+
+/**
+ * 用户与话题的关联表Dto对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Schema(description = "用户与话题的关联表Dto对象")
+@Data
+public class TourUserLikeTopicDto {
+
+    /**
+     * 主键id。
+     */
+    @Schema(description = "主键id。", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "数据验证失败,主键id不能为空!", groups = {UpdateGroup.class})
+    private Long id;
+
+    /**
+     * 门户用户id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "门户用户id。可支持等于操作符的列表数据过滤。")
+    private Long tourUserId;
+
+    /**
+     * 游记话题id。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "游记话题id。可支持等于操作符的列表数据过滤。")
+    private Long tourTravelNotesTopicId;
+
+    /**
+     * 游记话题名称。
+     * NOTE: 可支持等于操作符的列表数据过滤。
+     */
+    @Schema(description = "游记话题名称。可支持等于操作符的列表数据过滤。")
+    private String tourTravelNotesTopicName;
+}

+ 18 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/dto/TourismProjectTravelNotesWriteDto.java

@@ -229,4 +229,22 @@ public class TourismProjectTravelNotesWriteDto {
     @Schema(description = "游玩人数。")
     private String travelNumber;
 
+    /**
+     * 群聊id。
+     */
+    @Schema(description = "群聊id。")
+    private Long tourImGroupId;
+
+    /**
+     * 提及的话题。
+     */
+    @Schema(description = "提及的话题。")
+    private String tourTravelNotesTopicRelationName;
+
+    /**
+     * 可见范围(0.全部可见;1.仅自己可见)。
+     */
+    @Schema(description = "可见范围(0.全部可见;1.仅自己可见)。")
+    private Integer visibleRange;
+
 }

+ 81 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTourismProjectSearchRecords.java

@@ -0,0 +1,81 @@
+package com.tourism.webadmin.back.model;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.tourism.common.core.base.model.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 游记列表搜索实体对象。
+ *
+ * @author 奇幻之旅
+ * @date 2024-09-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "tour_tourism_project_search_records")
+public class TourTourismProjectSearchRecords extends BaseModel {
+
+    /**
+     * 主键id。
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 搜索关键词。
+     */
+    @TableField(value = "search_keyword")
+    private String searchKeyword;
+
+    /**
+     * 搜索结果数量。
+     */
+    @TableField(value = "search_result_count")
+    private Integer searchResultCount;
+
+    /**
+     * 搜索类型。
+     */
+    @TableField(value = "search_type")
+    private Integer searchType;
+
+    /**
+     * 搜索时间。
+     */
+    @TableField(value = "search_time")
+    private Date searchTime;
+
+    /**
+     * 逻辑删除标记字段(1: 正常 -1: 已删除)。
+     */
+    @TableLogic
+    @TableField(value = "data_state")
+    private Integer dataState;
+
+    /**
+     * searchResultCount 范围过滤起始值(>=)。
+     */
+    @TableField(exist = false)
+    private Integer searchResultCountStart;
+
+    /**
+     * searchResultCount 范围过滤结束值(<=)。
+     */
+    @TableField(exist = false)
+    private Integer searchResultCountEnd;
+
+    /**
+     * searchTime 范围过滤起始值(>=)。
+     */
+    @TableField(exist = false)
+    private String searchTimeStart;
+
+    /**
+     * searchTime 范围过滤结束值(<=)。
+     */
+    @TableField(exist = false)
+    private String searchTimeEnd;
+}

+ 43 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTourismProjectTravelNotesWriteContent.java

@@ -0,0 +1,43 @@
+package com.tourism.webadmin.back.model;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.tourism.common.core.base.model.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 游记内容表实体对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "tour_tourism_project_travel_notes_writer_content")
+public class TourTourismProjectTravelNotesWriteContent extends BaseModel {
+
+    /**
+     * 主键id。
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 关联表id。
+     */
+    @TableField(value = "association_id")
+    private Long associationId;
+
+    /**
+     * 逻辑删除标记字段(1: 正常 -1: 已删除)。
+     */
+    @TableLogic
+    @TableField(value = "data_state")
+    private Integer dataState;
+
+    /**
+     * 内容。
+     */
+    @TableField(value = "content")
+    private String content;
+}

+ 29 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesComment.java

@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.tourism.common.core.annotation.RelationConstDict;
 import com.tourism.common.core.annotation.RelationDict;
-import com.tourism.common.core.annotation.RelationOneToMany;
 import com.tourism.common.core.base.model.BaseModel;
+import com.tourism.webadmin.back.dto.TourTravelNotesCommentMentionUserDto;
+import com.tourism.webadmin.back.model.constant.IsTrue;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -73,6 +76,12 @@ public class TourTravelNotesComment extends BaseModel {
     private Integer likeNum;
 
     /**
+     * 评论数。
+     */
+    @TableField(value = "collect_num")
+    private Integer collectNum;
+
+    /**
      * 头像
      */
 //    @TableField(value = "head_image_url")
@@ -135,4 +144,23 @@ public class TourTravelNotesComment extends BaseModel {
      */
     @TableField(exist = false)
     private String travelNoteUrl;
+
+    /**
+     * 是否为作者的评论(0,不是;1,是)。
+     */
+    @TableField(value = "is_author")
+    private Integer isAuthor;
+
+    @RelationConstDict(
+            masterIdField = "isAuthor",
+            constantDictClass = IsTrue.class)
+    @TableField(exist = false)
+    private Map<String, Object> isAuthorDictMap;
+
+    /**
+     * 游记评论中提及的用户。
+     */
+    @Schema(description = "游记评论中提及的用户。")
+    @TableField(exist = false)
+    private List<TourTravelNotesCommentMentionUser> tourTravelNotesCommentMentionUser;
 }

+ 39 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesCommentMentionUser.java

@@ -0,0 +1,39 @@
+package com.tourism.webadmin.back.model;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+
+/**
+ * 游记评论中提到的用户实体对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Data
+@TableName(value = "tour_travel_notes_comment_mention_user")
+public class TourTravelNotesCommentMentionUser {
+
+    /**
+     * 主键id。
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 评论id。
+     */
+    @TableField(value = "comment_id")
+    private Long commentId;
+
+    /**
+     * 写游记提到的用户昵称。
+     */
+    @TableField(value = "user_name")
+    private String userName;
+
+    /**
+     * 写游记提到的用户id。
+     */
+    @TableField(value = "user_id")
+    private Long userId;
+}

+ 33 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesImg.java

@@ -0,0 +1,33 @@
+package com.tourism.webadmin.back.model;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+
+/**
+ * 游记中的图片实体对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Data
+@TableName(value = "tour_travel_notes_img")
+public class TourTravelNotesImg {
+
+    /**
+     * id。
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 图片地址。
+     */
+    @TableField(value = "img_url")
+    private String imgUrl;
+
+    /**
+     * 游记id。
+     */
+    @TableField(value = "travel_notes_id")
+    private Long travelNotesId;
+}

+ 39 - 0
application-webadmin/src/main/java/com/tourism/webadmin/back/model/TourTravelNotesMentionUser.java

@@ -0,0 +1,39 @@
+package com.tourism.webadmin.back.model;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+
+/**
+ * 游记提及的用户实体对象。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Data
+@TableName(value = "tour_travel_notes_mention_user")
+public class TourTravelNotesMentionUser {
+
+    /**
+     * 主键id。
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 游记id。
+     */
+    @TableField(value = "travel_notes_id")
+    private Long travelNotesId;
+
+    /**
+     * 写游记提到的用户昵称。
+     */
+    @TableField(value = "user_name")
+    private String userName;
+
+    /**
+     * 写游记提到的用户id。
+     */
+    @TableField(value = "user_id")
+    private Long userId;
+}

Неке датотеке нису приказане због велике количине промена