Compare commits
18 Commits
5083e455ab
...
5eb778c21c
Author | SHA1 | Date |
---|---|---|
|
5eb778c21c | |
|
43b79969ee | |
|
8dca878499 | |
|
4e09f1055e | |
|
5d3857506d | |
|
e3a27c5199 | |
|
9c7e6ea4a1 | |
|
c3d1fba84a | |
|
906a56c431 | |
|
74ac63338a | |
|
d71f75bfe7 | |
|
70d3d32bc5 | |
|
81cfc52881 | |
|
23c8fb7410 | |
|
4b5187f5dc | |
|
8734ca0502 | |
|
67d1f6cc19 | |
|
1f85f77ca3 |
BIN
blob
BIN
blob
Binary file not shown.
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 1008 KiB |
|
@ -0,0 +1,43 @@
|
||||||
|
package com.mcwl.web.controller.communityCenter;
|
||||||
|
|
||||||
|
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
|
||||||
|
import com.mcwl.communityCenter.service.CommunityAdviceService;
|
||||||
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区通知
|
||||||
|
*/
|
||||||
|
@Api(tags = "社区通知")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("communityAdvice")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CommunityAdviceController {
|
||||||
|
|
||||||
|
private final CommunityAdviceService communityAdviceService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取通知列表")
|
||||||
|
@PostMapping("adviceList")
|
||||||
|
public TableDataInfo getCommunityAdviceList(@RequestBody CommunityAdvicePageRes communityAdvicePageRes) {
|
||||||
|
return communityAdviceService.getCommunityAdviceList(communityAdvicePageRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,18 +1,13 @@
|
||||||
package com.mcwl.web.controller.communityCenter;
|
package com.mcwl.web.controller.communityCenter;
|
||||||
|
|
||||||
|
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
|
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityRes;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
@ -20,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区
|
* 社区
|
||||||
|
@ -45,6 +39,28 @@ public class CommunityController {
|
||||||
return communityService.listByPage(communityListPageRes);
|
return communityService.listByPage(communityListPageRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "社区详情")
|
||||||
|
@GetMapping("detail")
|
||||||
|
public R<CommunityDetailVo> getCommunityDetail(@Valid
|
||||||
|
@ApiParam(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
Long communityId) {
|
||||||
|
|
||||||
|
CommunityDetailVo communityDetailVo = communityService.getCommunityDetail(communityId);
|
||||||
|
return R.ok(communityDetailVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑社区
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "编辑社区")
|
||||||
|
@PostMapping("edit")
|
||||||
|
public R<Object> editCommunity(@RequestBody @Valid EditCommunityRes editCommunityRes) {
|
||||||
|
|
||||||
|
communityService.editCommunity(editCommunityRes);
|
||||||
|
return R.ok("编辑成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我加入的社区
|
* 我加入的社区
|
||||||
|
@ -59,15 +75,12 @@ public class CommunityController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加社区
|
* 添加社区
|
||||||
*
|
|
||||||
* @param communityRes 社区参数
|
|
||||||
* @return 添加结果
|
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "添加社区")
|
@ApiOperation(value = "添加社区")
|
||||||
@PostMapping("add")
|
@PostMapping("addCommunity")
|
||||||
public R<Object> addCommunity(@RequestBody @Valid CommunityRes communityRes) {
|
public R<Object> addCommunity(@RequestBody @Valid AddCommunityRes addCommunityRes) {
|
||||||
communityService.addCommunity(communityRes);
|
communityService.addCommunity(addCommunityRes);
|
||||||
return R.ok();
|
return R.ok("社区添加成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,37 +98,32 @@ public class CommunityController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "退出社区")
|
@ApiOperation(value = "退出社区")
|
||||||
@PostMapping("quit")
|
@PostMapping("quit")
|
||||||
public R<Object> quitCommunity(@ApiParam(value = "租户id", required = true)
|
public R<Object> quitCommunity(@RequestBody @Valid QuitCommunityRes quitCommunityRes) {
|
||||||
@NotNull(message = "租户id不能为空")
|
Long tenantId = quitCommunityRes.getTenantId();
|
||||||
@Valid
|
Long communityId = quitCommunityRes.getCommunityId();
|
||||||
Long tenantId,
|
|
||||||
@ApiParam(value = "社区id", required = true)
|
|
||||||
@NotNull(message = "社区id不能为空")
|
|
||||||
@Valid
|
|
||||||
Long communityId) {
|
|
||||||
|
|
||||||
return communityService.quitCommunity(tenantId, communityId);
|
return communityService.quitCommunity(tenantId, communityId);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除社区
|
// * 删除社区
|
||||||
*
|
// *
|
||||||
* @param id 社区id
|
// * @param id 社区id
|
||||||
* @return 删除结果
|
// * @return 删除结果
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "删除社区")
|
// @ApiOperation(value = "删除社区")
|
||||||
@GetMapping("delete")
|
// @GetMapping("delete")
|
||||||
public R<Object> deleteCommunity(@NotNull(message = "id不能为空")
|
// public R<Object> deleteCommunity(@NotNull(message = "id不能为空")
|
||||||
@ApiParam(value = "id", required = true)
|
// @ApiParam(value = "id", required = true)
|
||||||
@Valid
|
// @Valid
|
||||||
Long id) {
|
// Long id) {
|
||||||
Community community = communityService.getById(id);
|
// Community community = communityService.getById(id);
|
||||||
if (Objects.isNull(community)) {
|
// if (Objects.isNull(community)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该社区不存在");
|
// return R.fail(HttpStatus.SHOW_ERROR_MSG, "该社区不存在");
|
||||||
}
|
// }
|
||||||
communityService.removeById(id);
|
// communityService.removeById(id);
|
||||||
return R.ok();
|
// return R.ok();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否加入社区
|
* 是否加入社区
|
||||||
|
|
|
@ -11,8 +11,10 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区文件
|
* 社区文件
|
||||||
|
@ -27,16 +29,6 @@ public class CommunityFileController {
|
||||||
|
|
||||||
private final CommunityFileLogService communityFileLogService;
|
private final CommunityFileLogService communityFileLogService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 社区文件上传
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "社区文件上传")
|
|
||||||
@PostMapping("/upload")
|
|
||||||
public R<Object> upload(@RequestBody @Valid CommunityUploadFileRes communityUploadFileRes) {
|
|
||||||
communityFileService.upload(communityUploadFileRes);
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区文件列表
|
* 社区文件列表
|
||||||
*/
|
*/
|
||||||
|
@ -47,5 +39,23 @@ public class CommunityFileController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区文件上传
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "社区文件上传")
|
||||||
|
@PostMapping("/upload")
|
||||||
|
public R<String> upload(@RequestBody @Valid CommunityUploadFileRes communityUploadFileRes) {
|
||||||
|
return communityFileService.upload(communityUploadFileRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区文件下载
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "社区文件下载")
|
||||||
|
@PostMapping("/download")
|
||||||
|
public R<String> download(@RequestBody @Valid CommunityDownloadFileRes communityDownloadFileRes) {
|
||||||
|
return communityFileService.download(communityDownloadFileRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,5 +50,25 @@ public class CommunityUserController {
|
||||||
return communityUserService.black(blackListRes);
|
return communityUserService.black(blackListRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消拉黑
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "取消拉黑")
|
||||||
|
@PostMapping("unBlack")
|
||||||
|
public R<Object> unBlack(@RequestBody @Valid UnBlackListRes unBlackListRes) {
|
||||||
|
|
||||||
|
return communityUserService.unBlack(unBlackListRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理/取消管理
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "管理/取消管理")
|
||||||
|
@PostMapping("manage")
|
||||||
|
public R<Object> manage(@RequestBody @Valid CommunityUserManageRes communityUserManageRes) {
|
||||||
|
|
||||||
|
return communityUserService.manage(communityUserManageRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.mcwl.web.controller.communityCenter;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.IncomeInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeInfoVo;
|
||||||
|
import com.mcwl.communityCenter.service.IncomeInfoService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishCollectService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishService;
|
||||||
|
import com.mcwl.communityCenter.service.QuestionService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益明细
|
||||||
|
*/
|
||||||
|
@Api(tags = "收益明细")
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("incomeInfo")
|
||||||
|
public class IncomeInfoController {
|
||||||
|
|
||||||
|
private final IncomeInfoService incomeInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "明细列表")
|
||||||
|
@PostMapping("incomeList")
|
||||||
|
public TableDataInfo incomeList(@Valid @RequestBody IncomeInfoListPageRes incomeInfoListPageRes) {
|
||||||
|
return incomeInfoService.incomeList(incomeInfoListPageRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区收益
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "社区收益")
|
||||||
|
@GetMapping("communityIncome")
|
||||||
|
public R<IncomeInfoVo> communityIncome() {
|
||||||
|
return incomeInfoService.communityIncome();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.mcwl.web.controller.communityCenter;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.MyPublishCollectPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.MyPublishPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PersonHomePageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.QuestionPageRes;
|
||||||
|
import com.mcwl.communityCenter.service.PublishCollectService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishService;
|
||||||
|
import com.mcwl.communityCenter.service.QuestionService;
|
||||||
|
import com.mcwl.communityCenter.service.impl.PublishCommentLikeServiceImpl;
|
||||||
|
import com.mcwl.communityCenter.service.impl.PublishServiceImpl;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人主页
|
||||||
|
*/
|
||||||
|
@Api(tags = "个人主页")
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("personHome")
|
||||||
|
public class PersonHomeController {
|
||||||
|
|
||||||
|
private final PublishService publishService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人主页列表
|
||||||
|
*/
|
||||||
|
@PostMapping("getPersonHomeList")
|
||||||
|
@ApiOperation(value = "个人主页列表")
|
||||||
|
public TableDataInfo getPersonHomeList(@RequestBody @Valid PersonHomePageRes personHomePageRes) {
|
||||||
|
|
||||||
|
return publishService.getPersonHomeList(personHomePageRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommentDelRes;
|
import com.mcwl.communityCenter.domain.dto.CommentDelRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommentDetailRes;
|
import com.mcwl.communityCenter.domain.dto.CommentDetailRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommentRes;
|
import com.mcwl.communityCenter.domain.dto.CommentRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.CommentVo;
|
||||||
import com.mcwl.communityCenter.service.PublishCommentService;
|
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社群评论
|
* 社群评论
|
||||||
|
@ -31,12 +33,12 @@ public class PublishCommentController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加评论
|
* 添加发布评论
|
||||||
*
|
*
|
||||||
* @param commentRes 评论请求参数
|
* @param commentRes 评论请求参数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "添加评论")
|
@ApiOperation(value = "添加发布评论")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R<Object> save(@RequestBody @Valid CommentRes commentRes) {
|
public R<Object> save(@RequestBody @Valid CommentRes commentRes) {
|
||||||
|
|
||||||
|
@ -52,7 +54,7 @@ public class PublishCommentController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取评论详情")
|
@ApiOperation(value = "获取评论详情")
|
||||||
@PostMapping("/detail")
|
@PostMapping("/detail")
|
||||||
public R<Object> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
public R<List<CommentVo>> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
||||||
|
|
||||||
return publishCommentService.getComment(commentDetailRes);
|
return publishCommentService.getComment(commentDetailRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
package com.mcwl.web.controller.communityCenter;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.controller.BaseController;
|
|
||||||
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**社群评论区点赞
|
|
||||||
* @Author:ChenYan
|
|
||||||
* @Project:mcwl-ai
|
|
||||||
* @Package:com.mcwl.web.controller.communityCenter
|
|
||||||
* @Filename:PublishCommissionLikeController
|
|
||||||
* @Description TODO
|
|
||||||
* @Date:2025/1/17 14:21
|
|
||||||
*/
|
|
||||||
@Api(tags = "社群评论区点赞")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("PublishCommissionLike")
|
|
||||||
public class PublishCommentLikeController extends BaseController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PublishCommentLikeService publishCommentLikeService;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,9 +5,7 @@ import com.mcwl.common.constant.HttpStatus;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishDetailRes;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishRes;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
import com.mcwl.communityCenter.service.PublishService;
|
import com.mcwl.communityCenter.service.PublishService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -106,4 +104,14 @@ public class PublishController {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏/取消收藏
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "收藏/取消收藏")
|
||||||
|
@PostMapping("collect")
|
||||||
|
public R<Object> collectPublish(@RequestBody @Valid PublishCollectRes publishCollectRes) {
|
||||||
|
publishService.collectPublish(publishCollectRes);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.mcwl.web.controller.communityCenter;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.controller.BaseController;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishLikeRes;
|
||||||
|
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishLikeService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社群发布点赞
|
||||||
|
*/
|
||||||
|
@Api(tags = "社群发布点赞")
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("PublishLike")
|
||||||
|
public class PublishLikeController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
private final PublishLikeService publishLikeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点赞/取消点赞
|
||||||
|
*/
|
||||||
|
@PostMapping("/like")
|
||||||
|
@ApiOperation(value = "点赞/取消点赞")
|
||||||
|
public R<Object> like(@RequestBody @Valid PublishLikeRes publishLikeRes) {
|
||||||
|
publishLikeService.like(publishLikeRes);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -57,6 +57,12 @@ public class QuestionController {
|
||||||
|
|
||||||
// 付费类型为1时,判断钱包余额是否充足
|
// 付费类型为1时,判断钱包余额是否充足
|
||||||
if (Objects.equals(type, 1)) {
|
if (Objects.equals(type, 1)) {
|
||||||
|
if (amount < 10) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"付费金额不能小于10");
|
||||||
|
}
|
||||||
|
if (amount > 1000) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"付费金额不能大于1000");
|
||||||
|
}
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||||
Double wallet = sysUser.getWallet();
|
Double wallet = sysUser.getWallet();
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.mcwl.memberCenter.domain.Benefit;
|
||||||
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
|
||||||
import com.mcwl.memberCenter.domain.dto.EditBenefitDto;
|
import com.mcwl.memberCenter.domain.dto.EditBenefitDto;
|
||||||
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
import com.mcwl.memberCenter.domain.vo.BenefitVo;
|
||||||
|
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
|
||||||
import com.mcwl.memberCenter.service.BenefitService;
|
import com.mcwl.memberCenter.service.BenefitService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
@ -52,6 +53,19 @@ public class BenefitController {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据权益名称id查询权益
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据权益名称id查询权益")
|
||||||
|
@GetMapping("getBenefitByBenefitId")
|
||||||
|
public R<List<Benefit>> getBenefitByBenefitId(@NotNull(message = "权益名称id不能为空") Long benefitNameId) {
|
||||||
|
List<Benefit> benefitList = benefitService.lambdaQuery()
|
||||||
|
.eq(Benefit::getBenefitNameId, benefitNameId)
|
||||||
|
.list();
|
||||||
|
return R.ok(benefitList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改权益
|
* 修改权益
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
package com.mcwl.web.controller.mqtt;
|
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.R;
|
|
||||||
import com.mcwl.myInvitation.domain.vo.CommissionRatioVo;
|
|
||||||
import com.mcwl.resource.util.MqttTemplate;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController()
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/mqtt")
|
|
||||||
public class MqttController {
|
|
||||||
|
|
||||||
private final MqttTemplate mqttTemplate;
|
|
||||||
|
|
||||||
@GetMapping("/send")
|
|
||||||
public void list(String topic, String msg) {
|
|
||||||
mqttTemplate.publish(topic, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -167,13 +167,6 @@ huawei:
|
||||||
upload:
|
upload:
|
||||||
endPoint: obs.cn-south-1.myhuaweicloud.com
|
endPoint: obs.cn-south-1.myhuaweicloud.com
|
||||||
|
|
||||||
mqtt:
|
|
||||||
broker-url: tcp://113.45.190.154:1883
|
|
||||||
client-id-prefix: emqx-client
|
|
||||||
connection-timeout: 30
|
|
||||||
keep-alive-interval: 60
|
|
||||||
max-reconnect-attempts: 5
|
|
||||||
clean-session: true
|
|
||||||
|
|
||||||
#用户头像与背景
|
#用户头像与背景
|
||||||
mcwl:
|
mcwl:
|
||||||
|
|
|
@ -108,14 +108,14 @@ token:
|
||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 43200
|
||||||
|
|
||||||
# 公众号配置
|
# 公众号配置
|
||||||
wechat:
|
wechat:
|
||||||
# 应用ID
|
# 应用ID
|
||||||
appid: wx82d4c3c96f0ffa5b
|
appid: wx0a72f196ec9c3a70
|
||||||
# 应用密钥
|
# 应用密钥
|
||||||
secret: abbabcf1da711a3bbd95387ec83edcac
|
secret: 11218568b79e2c5eb10459ef8c0374bd
|
||||||
|
|
||||||
# yml版(application.yml)
|
# yml版(application.yml)
|
||||||
aliyun:
|
aliyun:
|
||||||
|
@ -137,23 +137,23 @@ mall:
|
||||||
appId: 2021005119630093
|
appId: 2021005119630093
|
||||||
# 线上应用私钥
|
# 线上应用私钥
|
||||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLyKl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSKkFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5+l+W14k5AgMBAAECggEAHahkPjmivTPc5FC8NSCQI01GPxH6/Ky1OXfaMd4ifTgn+vvQzBeBlFOnt53jRZyUq/T/l1FMaqacZfyBwLw3hlDslXeLuksHv6qTEBEsYH/ad7oHmIzcnQEhvAPrMrIjakYvqGoYynC3SKEudUjjqoMSthCYF+2+bsuXUpBQlNQLqcJ03U+YhfLswwVVujKvAujoLRqDAWeaa0k0y/1Ua4fr5GJq5M+P8TTBRgZlSK5A7Ee6yxMUncZ9W3lTqZtyG0OQLbz9gkr0c63KPisigaOx9eKlCPWFWUWo+zGvQMVijHDTeoJ3dqNmsPtiIE3rDt8anx4a1R7YK6MQ520hAQKBgQDPFMNl4fRmLSOLNShJm/0mBMoIjPmS3+tPBtCiG4oH9F8vYMJWDA1Im0FdgRa2HlCv6hpiVvvQt824RaUYa7XR6aefXKVEWddHvl3utnghMohjK8o8fTmIxADtU5Q2OlWmPdp1v7yDg8yE5P1GlY+AZ3oggxXOIRVtQrNeL7E3iQKBgQCy6nEaUQUCDDts4o7Pn+N402g3/T9Vz/5JtKmDI01EndK5l/yE8CdgGwdiwN1k3la/Nv8P5kaaX2qVcCGoOIQmMNGOxuNfkKCi+bJKdxmFOI4E3iVYT2H6x27QJwNB6bik1i6b2OWT7ckxeB6xMjefNp1u8Qif+vab60OQZSqoMQKBgESRF3Hwsz/xykcZvtFAuT2RcGQMacbcJcnw87v5ambf33SMkUx0iSF1ZttTFvYOa6ET3tCZBKBDe/Z7+QJxB68NstbtkjtjlAjJW8ji2jwDw20y3q/QtvA2Fih++CBMiHeXG3LJnd3eEiYevE5Wz0ExAhspzFqIUdPvtfyFxiQhAoGBAKgc+iGMN3RxIfVx/FbDGe6SVr8lSrnLMlj3VMBQD26GDVcupKwVLCp1uz7jkiQRdtk9R/UcnwK23WOFdVqnoCRygrXx0/wb3ZTFou2tc2Fmfqu8QML19E67zjfwMHNitYjNaAYwi6ewKvg8sjo1wWXs34k7GquYGNjw+w9Wv/pBAoGAUlVHfZ4RncAiiH/x3EDgqmmVikFpLoM2xXxM16nplrjdBE6IzkpgWb/x2ZI6JCMDyoV2kvF6owW2+QEQ81MrHQMtBRpAvd8nI03gXA5VF3uwp4UjfGpoIAGDBrqQv9DM8vx6C6VJNTT5esZWZSw/+PZ4D19l0/n7gICGx3ugw0Q=
|
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLyKl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSKkFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5+l+W14k5AgMBAAECggEAHahkPjmivTPc5FC8NSCQI01GPxH6/Ky1OXfaMd4ifTgn+vvQzBeBlFOnt53jRZyUq/T/l1FMaqacZfyBwLw3hlDslXeLuksHv6qTEBEsYH/ad7oHmIzcnQEhvAPrMrIjakYvqGoYynC3SKEudUjjqoMSthCYF+2+bsuXUpBQlNQLqcJ03U+YhfLswwVVujKvAujoLRqDAWeaa0k0y/1Ua4fr5GJq5M+P8TTBRgZlSK5A7Ee6yxMUncZ9W3lTqZtyG0OQLbz9gkr0c63KPisigaOx9eKlCPWFWUWo+zGvQMVijHDTeoJ3dqNmsPtiIE3rDt8anx4a1R7YK6MQ520hAQKBgQDPFMNl4fRmLSOLNShJm/0mBMoIjPmS3+tPBtCiG4oH9F8vYMJWDA1Im0FdgRa2HlCv6hpiVvvQt824RaUYa7XR6aefXKVEWddHvl3utnghMohjK8o8fTmIxADtU5Q2OlWmPdp1v7yDg8yE5P1GlY+AZ3oggxXOIRVtQrNeL7E3iQKBgQCy6nEaUQUCDDts4o7Pn+N402g3/T9Vz/5JtKmDI01EndK5l/yE8CdgGwdiwN1k3la/Nv8P5kaaX2qVcCGoOIQmMNGOxuNfkKCi+bJKdxmFOI4E3iVYT2H6x27QJwNB6bik1i6b2OWT7ckxeB6xMjefNp1u8Qif+vab60OQZSqoMQKBgESRF3Hwsz/xykcZvtFAuT2RcGQMacbcJcnw87v5ambf33SMkUx0iSF1ZttTFvYOa6ET3tCZBKBDe/Z7+QJxB68NstbtkjtjlAjJW8ji2jwDw20y3q/QtvA2Fih++CBMiHeXG3LJnd3eEiYevE5Wz0ExAhspzFqIUdPvtfyFxiQhAoGBAKgc+iGMN3RxIfVx/FbDGe6SVr8lSrnLMlj3VMBQD26GDVcupKwVLCp1uz7jkiQRdtk9R/UcnwK23WOFdVqnoCRygrXx0/wb3ZTFou2tc2Fmfqu8QML19E67zjfwMHNitYjNaAYwi6ewKvg8sjo1wWXs34k7GquYGNjw+w9Wv/pBAoGAUlVHfZ4RncAiiH/x3EDgqmmVikFpLoM2xXxM16nplrjdBE6IzkpgWb/x2ZI6JCMDyoV2kvF6owW2+QEQ81MrHQMtBRpAvd8nI03gXA5VF3uwp4UjfGpoIAGDBrqQv9DM8vx6C6VJNTT5esZWZSw/+PZ4D19l0/n7gICGx3ugw0Q=
|
||||||
# # 线上应用公钥证书
|
# 线上应用公钥证书
|
||||||
# appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
|
appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
|
||||||
# # 线上支付宝公钥证书路径
|
# 线上支付宝公钥证书路径
|
||||||
# alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
||||||
# # 线上支付宝根证书路径
|
# 线上支付宝根证书路径
|
||||||
# alipayRootCertPath: /opt/cert/pro/alipayRootCert.crt
|
alipayRootCertPath: /opt/cert/pro/alipayRootCert.crt
|
||||||
# 沙箱应用公钥证书
|
# # 沙箱应用公钥证书
|
||||||
appCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
# appCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
||||||
# 沙箱支付宝公钥证书路径
|
# # 沙箱支付宝公钥证书路径
|
||||||
alipayCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
# alipayCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
||||||
# 沙箱支付宝根证书路径
|
# # 沙箱支付宝根证书路径
|
||||||
alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
|
# alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
|
||||||
notifyUrl: https://36072a51.r27.cpolar.top/ali/pay/notify
|
notifyUrl: http://113.45.9.111:8080/ali/pay/notify
|
||||||
# 线上支付宝网关
|
# 线上支付宝网关
|
||||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
gatewayUrl: https://openapi.alipay.com/gateway.do
|
||||||
# 绑定回调
|
# 绑定回调
|
||||||
bindUrl: https://36072a51.r27.cpolar.top/ali/pay/callback
|
bindUrl: http://113.45.9.111:8080/ali/pay/callback
|
||||||
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式 3、ALIPAY_OPEN_ID:支付宝openid
|
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式 3、ALIPAY_OPEN_ID:支付宝openid
|
||||||
identityType: ALIPAY_OPEN_ID
|
identityType: ALIPAY_OPEN_ID
|
||||||
# 授权url
|
# 授权url
|
||||||
|
@ -166,15 +166,6 @@ huawei:
|
||||||
bucketName: mcwl
|
bucketName: mcwl
|
||||||
upload:
|
upload:
|
||||||
endPoint: obs.cn-south-1.myhuaweicloud.com
|
endPoint: obs.cn-south-1.myhuaweicloud.com
|
||||||
|
|
||||||
mqtt:
|
|
||||||
broker-url: tcp://192.168.136.128:1883
|
|
||||||
client-id-prefix: emqx-client
|
|
||||||
connection-timeout: 30
|
|
||||||
keep-alive-interval: 60
|
|
||||||
max-reconnect-attempts: 5
|
|
||||||
clean-session: true
|
|
||||||
|
|
||||||
#用户头像与背景
|
#用户头像与背景
|
||||||
mcwl:
|
mcwl:
|
||||||
encryptUrl: http://113.45.9.111:9090/encryptAndUpload
|
encryptUrl: http://113.45.9.111:9090/encryptAndUpload
|
||||||
|
|
|
@ -84,7 +84,7 @@ mybatis-plus:
|
||||||
# NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
|
# NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
|
||||||
autoMappingBehavior: PARTIAL
|
autoMappingBehavior: PARTIAL
|
||||||
# MyBatis 自动映射时未知列或未知属性处理策
|
# MyBatis 自动映射时未知列或未知属性处理策
|
||||||
# NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
|
# NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息.
|
||||||
autoMappingUnknownColumnBehavior: NONE
|
autoMappingUnknownColumnBehavior: NONE
|
||||||
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
|
|
@ -178,7 +178,8 @@ public class Constants
|
||||||
public static final String[] JOB_WHITELIST_STR = {
|
public static final String[] JOB_WHITELIST_STR = {
|
||||||
"com.mcwl.quartz.task",
|
"com.mcwl.quartz.task",
|
||||||
"com.mcwl.memberCenter.task",
|
"com.mcwl.memberCenter.task",
|
||||||
"com.mcwl.pay.task"
|
"com.mcwl.pay.task",
|
||||||
|
"com.mcwl.communityCenter.task"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class ObsUtils {
|
||||||
map.put("path",putObjectResult.getObjectUrl());
|
map.put("path",putObjectResult.getObjectUrl());
|
||||||
map.put("objectKey",putObjectResult.getObjectKey());
|
map.put("objectKey",putObjectResult.getObjectKey());
|
||||||
map.put("size",multipartFile.getSize()+"");
|
map.put("size",multipartFile.getSize()+"");
|
||||||
|
map.put("fileName",multipartFile.getOriginalFilename());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.mcwl.communityCenter.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态常量
|
||||||
|
*/
|
||||||
|
public class AdviceConstant {
|
||||||
|
/**
|
||||||
|
* 社区通知
|
||||||
|
*/
|
||||||
|
public static final int COMMUNITY_NOTICE = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复我的
|
||||||
|
*/
|
||||||
|
public static final int REPLY_ME = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等我回答
|
||||||
|
*/
|
||||||
|
public static final int WAIT_ME_ANSWER = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点赞
|
||||||
|
*/
|
||||||
|
public static final int LIKE = 3;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -28,6 +28,14 @@ public class CommunityAdvice extends BaseEntity {
|
||||||
* 社区id
|
* 社区id
|
||||||
*/
|
*/
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
/**
|
||||||
|
* 发送人
|
||||||
|
*/
|
||||||
|
private Long sendUserId;
|
||||||
|
/**
|
||||||
|
* 通知类型 0社区通知 1回复我的 2待我回复 3点赞
|
||||||
|
*/
|
||||||
|
private Integer adviceType;
|
||||||
/**
|
/**
|
||||||
* 通知人
|
* 通知人
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,9 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.mcwl.common.core.domain.BaseEntity;
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Builder;
|
import lombok.*;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区文件表
|
* 社区文件表
|
||||||
|
@ -17,7 +15,8 @@ import lombok.EqualsAndHashCode;
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("cc_community_file")
|
@TableName("cc_community_file")
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class CommunityFile extends BaseEntity {
|
public class CommunityFile extends BaseEntity {
|
||||||
|
|
||||||
@TableId
|
@TableId
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class CommunityUser extends BaseEntity {
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户类型 0普通用户 1群主
|
* 用户类型 0成员 1管理员 2群主
|
||||||
*/
|
*/
|
||||||
private Integer userType;
|
private Integer userType;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class CommunityUser extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 是否拉黑 0否 1是
|
* 是否拉黑 0否 1是
|
||||||
*/
|
*/
|
||||||
private String isBlank;
|
private String isBlack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拉黑原因
|
* 拉黑原因
|
||||||
|
@ -80,6 +80,6 @@ public class CommunityUser extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 拉黑结束时间
|
* 拉黑结束时间
|
||||||
*/
|
*/
|
||||||
private Date blankEndTime;
|
private Date blackEndTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.mcwl.communityCenter.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("cc_income_info")
|
||||||
|
public class IncomeInfo extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 0付费加入 1付费问答
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
private Double amount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -46,10 +46,15 @@ public class Publish extends BaseEntity {
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布文件
|
* 文件url
|
||||||
*/
|
*/
|
||||||
private String fileUrl;
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布人
|
* 发布人
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.mcwl.communityCenter.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("cc_publish_collect")
|
||||||
|
public class PublishCollect extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
private Long publishId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
|
||||||
@ApiModel(description = "评论区评论")
|
@ApiModel(description = "评论区评论")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("cc_comment")
|
@TableName("cc_publish_comment")
|
||||||
public class PublishComment extends BaseEntity {
|
public class PublishComment extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
|
@ -32,10 +32,10 @@ public class PublishComment extends BaseEntity {
|
||||||
@ApiModelProperty(value = "社区id")
|
@ApiModelProperty(value = "社区id")
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
/**
|
/**
|
||||||
* 运营id
|
* 发布id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "运营id")
|
@ApiModelProperty(value = "发布id")
|
||||||
private Long operatorId;
|
private Long publishId;
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
|
||||||
@ApiModel(description = "评论点赞")
|
@ApiModel(description = "评论点赞")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("cc_comment_like")
|
@TableName("cc_publish_comment_like")
|
||||||
public class PublishCommentLike extends BaseEntity {
|
public class PublishCommentLike extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,18 +29,29 @@ public class PublishCommentLike extends BaseEntity {
|
||||||
@ApiModelProperty(value = "评论点赞id")
|
@ApiModelProperty(value = "评论点赞id")
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 租户id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "租户id")
|
||||||
private Long userId;
|
private Long tenantId;
|
||||||
/**
|
/**
|
||||||
* 社群id
|
* 社群id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "社群id")
|
@ApiModelProperty(value = "社群id")
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布id")
|
||||||
|
private Long publishId;
|
||||||
/**
|
/**
|
||||||
* 评论id
|
* 评论id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "评论id")
|
@ApiModelProperty(value = "评论id")
|
||||||
private Long publishCommentId;
|
private Long publishCommentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.mcwl.communityCenter.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布点赞
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@TableName("cc_publish_like")
|
||||||
|
public class PublishLike extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id - 租户id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
private Long publishId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
}
|
|
@ -53,18 +53,6 @@ public class Question extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String questionUrl;
|
private String questionUrl;
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 回复内容
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value = "答复内容")
|
|
||||||
// private String reply;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 回复时间
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value = "答复时间")
|
|
||||||
// private Date replyTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否匿名
|
* 是否匿名
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.mcwl.communityCenter.domain.dto;
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -13,7 +12,7 @@ import javax.validation.constraints.NotNull;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "社区请求参数")
|
@ApiModel(value = "社区请求参数")
|
||||||
public class CommunityRes {
|
public class AddCommunityRes {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,6 +56,12 @@ public class CommunityRes {
|
||||||
@NotNull(message = "有效期天数")
|
@NotNull(message = "有效期天数")
|
||||||
private Integer validityDay;
|
private Integer validityDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -14,6 +14,12 @@ import javax.validation.constraints.NotNull;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "拉黑请求参数")
|
@ApiModel(value = "拉黑请求参数")
|
||||||
public class BlackListRes {
|
public class BlackListRes {
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区id
|
* 社区id
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区通知列表分页请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "社区通知列表分页请求参数")
|
||||||
|
public class CommunityAdvicePageRes extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知类型 0社区通知 1回复我的 2待我回复 3点赞
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "通知类型 0社区通知 1回复我的 2待我回复 3点赞")
|
||||||
|
private Integer adviceType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区详情请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "社区详情请求参数")
|
||||||
|
public class CommunityDetailRes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区文件下载请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "社区文件下载请求参数")
|
||||||
|
public class CommunityDownloadFileRes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件id", required = true)
|
||||||
|
@NotNull(message = "文件id不能为空")
|
||||||
|
private Long fileId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -10,10 +10,10 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区请求参数
|
* 社区文件列表请求参数
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "社区请求参数")
|
@ApiModel(value = "社区文件列表请求参数")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CommunityFilePageListRes extends PageDomain {
|
public class CommunityFilePageListRes extends PageDomain {
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,11 +30,32 @@ public class CommunityUploadFileRes {
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件
|
* 文件url
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "文件", required = true)
|
@ApiModelProperty(value = "文件url", required = true)
|
||||||
@NotNull(message = "文件不能为空")
|
@NotBlank(message = "文件url不能为空")
|
||||||
private MultipartFile file;
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件对象key
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件对象key", required = true)
|
||||||
|
@NotBlank(message = "文件对象key不能为空")
|
||||||
|
private String objectKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件名", required = true)
|
||||||
|
@NotBlank(message = "文件名不能为空")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件大小", required = true)
|
||||||
|
@NotNull(message = "文件大小不能为空")
|
||||||
|
private Long fileSize;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,12 @@ import javax.validation.constraints.NotNull;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ApiModel(value = "社区用户列表分页请求参数")
|
@ApiModel(value = "社区用户列表分页请求参数")
|
||||||
public class CommunityUserListPageRes extends PageDomain {
|
public class CommunityUserListPageRes extends PageDomain {
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区id
|
* 社区id
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理/取消管理请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "管理/取消管理请求参数")
|
||||||
|
public class CommunityUserManageRes {
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
@NotNull(message = "用户id不能为空")
|
||||||
|
private Long userId;
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑社区参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "编辑社区参数")
|
||||||
|
public class EditCommunityRes {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区图片")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区名称", required = true)
|
||||||
|
@NotBlank(message = "社区名称不能为空")
|
||||||
|
private String communityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区标签id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区标签", required = true)
|
||||||
|
@NotNull(message = "社区标签不能为空")
|
||||||
|
private Integer communityTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区类型 0免费 1付费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区类型", required = true)
|
||||||
|
@NotNull(message = "社区类型不能为空")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "价格", required = true)
|
||||||
|
@NotNull(message = "价格不能为空")
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效期天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "有效期天数", required = true)
|
||||||
|
@NotNull(message = "有效期天数")
|
||||||
|
private Integer validityDay;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益明细请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "收益明细请求参数")
|
||||||
|
public class IncomeInfoListPageRes extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "搜索内容")
|
||||||
|
private String searchContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "收益类型")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益明细请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "收益明细请求参数")
|
||||||
|
public class IncomeInfoRes {
|
||||||
|
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,12 @@ import lombok.EqualsAndHashCode;
|
||||||
@ApiModel(value = "社区列表分页请求参数")
|
@ApiModel(value = "社区列表分页请求参数")
|
||||||
public class JoinCommunityListPageRes extends PageDomain {
|
public class JoinCommunityListPageRes extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含我创建的社区 0否 1是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否包含我创建的社区 0否 1是 默认0")
|
||||||
|
private Integer isMyCreate = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索内容
|
* 搜索内容
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的发布
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "我的发布分页请求参数")
|
||||||
|
public class MyPublishCollectPageRes extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的发布分页请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "我的发布分页请求参数")
|
||||||
|
public class MyPublishPageRes extends PageDomain {
|
||||||
|
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人主页分页请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "个人主页分页请求参数")
|
||||||
|
public class PersonHomePageRes extends PageDomain {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 0 我的发布 1 我的问答 2 我的收藏
|
||||||
|
*/
|
||||||
|
@NotNull(message = "类型不能为空")
|
||||||
|
@ApiModelProperty(value = "类型 0 我的发布 1 我的问答 2 我的收藏", required = true)
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏/取消收藏请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "收藏/取消收藏请求参数")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PublishCollectRes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
@NotNull(message = "用户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布id", required = true)
|
||||||
|
@NotNull(message = "发布id不能为空")
|
||||||
|
private Long publishId;
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点赞/取消点赞请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "点赞/取消点赞请求参数")
|
||||||
|
public class PublishCommentLikeRes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
@NotNull(message = "用户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布id", required = true)
|
||||||
|
@NotNull(message = "发布id不能为空")
|
||||||
|
private Long publishId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评论id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "评论id", required = true)
|
||||||
|
@NotNull(message = "评论id不能为空")
|
||||||
|
private Long commentId;
|
||||||
|
}
|
|
@ -2,25 +2,29 @@ package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布详情请求参数
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "发布详情请求参数")
|
@ApiModel(value = "发布详情请求参数")
|
||||||
public class PublishDetailRes {
|
public class PublishDetailRes {
|
||||||
|
|
||||||
@ApiParam(value = "发布id", required = true)
|
@ApiModelProperty(value = "发布id", required = true)
|
||||||
@NotNull(message = "发布id不能为空")
|
@NotNull(message = "发布id不能为空")
|
||||||
private Long id;
|
private Long publishId;
|
||||||
|
|
||||||
@ApiParam(value = "租户id", required = true)
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
@NotNull(message = "租户id不能为空")
|
@NotNull(message = "租户id不能为空")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
@ApiParam(value = "社区id", required = true)
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
@NotNull(message = "社区id不能为空")
|
@NotNull(message = "社区id不能为空")
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点赞/取消点赞请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "点赞/取消点赞请求参数")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PublishLikeRes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
@NotNull(message = "用户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布id", required = true)
|
||||||
|
@NotNull(message = "发布id不能为空")
|
||||||
|
private Long publishId;
|
||||||
|
}
|
|
@ -15,15 +15,14 @@ import javax.validation.constraints.NotNull;
|
||||||
public class PublishPageRes extends PageDomain {
|
public class PublishPageRes extends PageDomain {
|
||||||
|
|
||||||
@NotNull(message = "社区id不能为空")
|
@NotNull(message = "社区id不能为空")
|
||||||
@ApiParam(value = "社区id", required = true)
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
|
||||||
@NotNull(message = "租户id不能为空")
|
@NotNull(message = "租户id不能为空")
|
||||||
@ApiParam(value = "租户id", required = true)
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
@NotNull(message = "类型不能为空")
|
@ApiModelProperty(value = "类型 0只看星主 1精选", required = true)
|
||||||
@ApiParam(value = "类型 0只看星主 1精选 2问答", required = true)
|
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,17 @@ public class PublishRes {
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布文件
|
* 文件url
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "发布文件")
|
@ApiModelProperty(value = "文件url")
|
||||||
private String fileUrl;
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布时间 - 定时发布
|
* 发布时间 - 定时发布
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,6 +29,13 @@ public class QuestionRes {
|
||||||
@ApiModelProperty(value = "社区ID", required = true, position = 1)
|
@ApiModelProperty(value = "社区ID", required = true, position = 1)
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提问用户
|
||||||
|
*/
|
||||||
|
@NotNull(message = "提问用户id不能为空")
|
||||||
|
@ApiModelProperty(value = "提问用户id", required = true, position = 2)
|
||||||
|
private Long questionUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提问内容
|
* 提问内容
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退出社区请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "退出社区请求参数")
|
||||||
|
public class QuitCommunityRes {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.mcwl.communityCenter.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消拉黑请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "取消拉黑请求参数")
|
||||||
|
public class UnBlackListRes {
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id", required = true)
|
||||||
|
@NotNull(message = "租户id不能为空")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id", required = true)
|
||||||
|
@NotNull(message = "社区id不能为空")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉黑用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "拉黑用户id", required = true)
|
||||||
|
@NotNull(message = "拉黑用户id不能为空")
|
||||||
|
private Long userId;
|
||||||
|
}
|
|
@ -27,6 +27,18 @@ public class CommentVo {
|
||||||
@ApiModelProperty(value = "评论id")
|
@ApiModelProperty(value = "评论id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
@ -45,6 +57,12 @@ public class CommentVo {
|
||||||
@ApiModelProperty(value = "用户头像")
|
@ApiModelProperty(value = "用户头像")
|
||||||
private String userAvatar;
|
private String userAvatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父评论id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "父评论id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论内容
|
* 评论内容
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区通知返回数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "社区通知返回数据")
|
||||||
|
public class CommunityAdviceVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发送人")
|
||||||
|
private Long sendUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送人名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发送人名称")
|
||||||
|
private String sendUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送人头像
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发送人头像")
|
||||||
|
private String sendUserAvatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已读
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否已读")
|
||||||
|
private Integer isRead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -5,13 +5,65 @@ import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区返回数据
|
* 社区返回数据
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "社区详情返回数据")
|
@ApiModel(value = "社区详情返回数据")
|
||||||
public class CommunityDetailVo {
|
public class CommunityDetailVo {
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区图片")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区名称")
|
||||||
|
private String communityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区标签id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区标签")
|
||||||
|
@NotNull(message = "社区标签不能为空")
|
||||||
|
private Integer communityTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区类型 0免费 1付费")
|
||||||
|
@NotNull(message = "社区类型不能为空")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "价格")
|
||||||
|
@NotNull(message = "价格不能为空")
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效期天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "有效期天数")
|
||||||
|
@NotNull(message = "有效期天数")
|
||||||
|
private Integer validityDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,12 +34,6 @@ public class CommunityFileVo {
|
||||||
@ApiModelProperty(value = "社区id")
|
@ApiModelProperty(value = "社区id")
|
||||||
private Long communityId;
|
private Long communityId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件路径
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "文件路径")
|
|
||||||
private String fileUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件名称
|
* 文件名称
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,6 +39,12 @@ public class CommunityUserVo {
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型 0成员 1管理员 2群主
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户类型 0成员 1管理员 2群主")
|
||||||
|
private Integer userType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户头像
|
* 用户头像
|
||||||
*/
|
*/
|
||||||
|
@ -51,6 +57,12 @@ public class CommunityUserVo {
|
||||||
@ApiModelProperty(value = "用户昵称")
|
@ApiModelProperty(value = "用户昵称")
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否拉黑
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否拉黑")
|
||||||
|
private String isBlack;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加入类型
|
* 加入类型
|
||||||
|
@ -65,13 +77,6 @@ public class CommunityUserVo {
|
||||||
@ApiModelProperty(value = "首次加入时间")
|
@ApiModelProperty(value = "首次加入时间")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* 最后活动时间
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
@ApiModelProperty(value = "最后活动时间")
|
|
||||||
private Date loginDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 到期时间
|
* 到期时间
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,6 +21,18 @@ public class CommunityVo {
|
||||||
@ApiModelProperty(value = "社区id")
|
@ApiModelProperty(value = "社区id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户类型")
|
||||||
|
private Integer userType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区图片
|
* 社区图片
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "收益金额")
|
||||||
|
public class IncomeAmountVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日收益
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "今日收益")
|
||||||
|
private Double todayIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昨日收益
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "昨日收益")
|
||||||
|
private Double yesterdayIncome;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益列表vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@ApiModel(description = "收益列表vo")
|
||||||
|
public class IncomeInfoListVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户头像
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户头像")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区名称")
|
||||||
|
private String communityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "收益类型")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益金额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "收益金额")
|
||||||
|
private Double amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "收益时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@ApiModel(description = "收益vo")
|
||||||
|
public class IncomeInfoVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区收益
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区收益")
|
||||||
|
private IncomeAmountVo communityIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问答收益
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问答收益")
|
||||||
|
private IncomeAmountVo questionIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 累计收益
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "累计收益")
|
||||||
|
private Double totalIncome;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.mcwl.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中心vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "个人中心vo")
|
||||||
|
public class PersonHomeVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区id")
|
||||||
|
private Long communityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件url
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件url")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片url")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点赞数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "点赞数")
|
||||||
|
private Integer likeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否收藏
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否收藏")
|
||||||
|
private Integer isCollect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评论
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "评论")
|
||||||
|
private List<CommentVo> commentList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.mcwl.communityCenter.domain.vo;
|
package com.mcwl.communityCenter.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -63,16 +64,22 @@ public class PublishVo {
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布文件
|
* 文件url
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "发布文件")
|
@ApiModelProperty(value = "文件url")
|
||||||
private String fileUrl;
|
private String fileUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布时间 - 定时发布
|
* 文件名
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "发布时间 - 定时发布")
|
@ApiModelProperty(value = "文件名")
|
||||||
private Date publishTime;
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否点赞
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否点赞")
|
||||||
|
private Integer isLike;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点赞数
|
* 点赞数
|
||||||
|
@ -92,6 +99,16 @@ public class PublishVo {
|
||||||
@ApiModelProperty(value = "精选")
|
@ApiModelProperty(value = "精选")
|
||||||
private Integer isElite;
|
private Integer isElite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "收藏")
|
||||||
|
private Integer isCollect;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,36 @@ public class CustomTenantHandler implements TenantLineHandler {
|
||||||
* 需要根据业务需要进行调整.需要多租户的表名
|
* 需要根据业务需要进行调整.需要多租户的表名
|
||||||
*/
|
*/
|
||||||
static {
|
static {
|
||||||
|
// 通知表
|
||||||
|
tables.add("cc_advice");
|
||||||
// 发布评论表
|
// 发布评论表
|
||||||
tables.add("cc_comment");
|
tables.add("cc_comment");
|
||||||
|
// 评论点赞表
|
||||||
|
tables.add("cc_comment_like");
|
||||||
// 社区表
|
// 社区表
|
||||||
tables.add("cc_community");
|
tables.add("cc_community");
|
||||||
|
// 社区文件表
|
||||||
|
tables.add("cc_community_file");
|
||||||
|
// 社区文件下载记录表
|
||||||
|
tables.add("cc_community_file_log");
|
||||||
|
// 社区用户表
|
||||||
|
tables.add("cc_community_user");
|
||||||
|
// 收益明细
|
||||||
|
tables.add("cc_income_info");
|
||||||
// 邀请表
|
// 邀请表
|
||||||
tables.add("cc_invite");
|
tables.add("cc_invite");
|
||||||
// 发布表
|
// 发布表
|
||||||
tables.add("cc_publish");
|
tables.add("cc_publish");
|
||||||
|
// 收藏表
|
||||||
|
tables.add("cc_publish_collect");
|
||||||
|
// 发布点赞表
|
||||||
|
tables.add("cc_publish_like");
|
||||||
// 提问表
|
// 提问表
|
||||||
tables.add("cc_question");
|
tables.add("cc_question");
|
||||||
// 提问评论表
|
// 提问评论表
|
||||||
tables.add("cc_question_comment");
|
tables.add("cc_question_comment");
|
||||||
// 社区用户表
|
|
||||||
tables.add("cc_community_user");
|
|
||||||
|
|
||||||
// 输出表名
|
// 输出表名
|
||||||
log.info("多租户表:{}", tables);
|
log.info("多租户表:{}", tables);
|
||||||
|
|
|
@ -1,10 +1,20 @@
|
||||||
package com.mcwl.communityCenter.mapper;
|
package com.mcwl.communityCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.CommunityAdvicePageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.CommunityAdviceVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CommunityAdviceMapper extends BaseMapper<CommunityAdvice> {
|
public interface CommunityAdviceMapper extends BaseMapper<CommunityAdvice> {
|
||||||
|
|
||||||
|
List<CommunityAdviceVo> getCommunityAdviceList(Page<CommunityAdvice> page,
|
||||||
|
@Param("communityAdvicePageRes") CommunityAdvicePageRes communityAdvicePageRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,5 +21,10 @@ public interface CommunityFileLogMapper extends BaseMapper<CommunityFileLog> {
|
||||||
Long communityFileId);
|
Long communityFileId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
|
Integer getDownloadCount(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("communityFileId") Long communityFileId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void saveCommunityFileLog(@Param("communityFileLog") CommunityFileLog communityFileLog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,9 @@ public interface CommunityFileMapper extends BaseMapper<CommunityFile> {
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
List<CommunityFileVo> getCommunityFileList(Page<CommunityFile> page, @Param("communityFilePageListRes") CommunityFilePageListRes communityFilePageListRes);
|
List<CommunityFileVo> getCommunityFileList(Page<CommunityFile> page, @Param("communityFilePageListRes") CommunityFilePageListRes communityFilePageListRes);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
CommunityFile selectCommunityFile(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("fileId") Long fileId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.EditCommunityRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
|
||||||
import org.apache.ibatis.annotations.MapKey;
|
import org.apache.ibatis.annotations.MapKey;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -53,12 +55,14 @@ public interface CommunityMapper extends BaseMapper<Community> {
|
||||||
Page<Community> page,
|
Page<Community> page,
|
||||||
@Param("userId")
|
@Param("userId")
|
||||||
Long userId,
|
Long userId,
|
||||||
@Param("searchContent")
|
@Param("joinCommunityListPageRes")
|
||||||
String searchContent);
|
JoinCommunityListPageRes joinCommunityListPageRes);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
void quitCommunity(Long tenantId, Long communityId, Long userId);
|
void quitCommunity(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
void deleteCommunity(Long tenantId, Long communityId);
|
void deleteCommunity(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.CommunityUser;
|
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityUserVo;
|
import com.mcwl.communityCenter.domain.vo.CommunityUserVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -23,7 +24,7 @@ public interface CommunityUserMapper extends BaseMapper<CommunityUser> {
|
||||||
@Param("userId") Long userId);
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
Integer getJoinNum(Long tenantId, Long communityId);
|
Integer getJoinNum(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
int isJoinCommunity(@Param("tenantId")
|
int isJoinCommunity(@Param("tenantId")
|
||||||
|
@ -37,4 +38,17 @@ public interface CommunityUserMapper extends BaseMapper<CommunityUser> {
|
||||||
List<CommunityUserVo> getCommunityUserList(Page<CommunityUser> page,
|
List<CommunityUserVo> getCommunityUserList(Page<CommunityUser> page,
|
||||||
@Param("communityUserListPageRes")
|
@Param("communityUserListPageRes")
|
||||||
CommunityUserListPageRes communityUserListPageRes);
|
CommunityUserListPageRes communityUserListPageRes);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
CommunityUser selectCommunityUser(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void updateBlackCommunityUser(@Param("blackCommunityUser") CommunityUser blackCommunityUser);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
List<CommunityUser> getAllCommunityUser();
|
||||||
|
|
||||||
|
void updateManageCommunityUser(@Param("manageCommunityUser") CommunityUser manageCommunityUser);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.mcwl.communityCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mcwl.communityCenter.domain.IncomeInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCollect;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.IncomeInfoListPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.IncomeInfoRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.MyPublishCollectPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeAmountVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeInfoListVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface IncomeInfoMapper extends BaseMapper<IncomeInfo> {
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
IncomeAmountVo communityIncome(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
IncomeAmountVo questionIncome(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
Double totalIncome();
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
List<IncomeInfoListVo> incomeList(Page<IncomeInfo> page,
|
||||||
|
@Param("incomeInfoListPageRes") IncomeInfoListPageRes incomeInfoListPageRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
}
|
|
@ -38,5 +38,7 @@ public interface InviteMapper extends BaseMapper<Invite> {
|
||||||
* @return 邀请记录
|
* @return 邀请记录
|
||||||
*/
|
*/
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
Invite selectByTenantIdAndCommunityIdAndInviteeUserId(Long tenantId, Long communityId, Long inviteeUserId);
|
Invite selectByTenantIdAndCommunityIdAndInviteeUserId(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("inviteeUserId") Long inviteeUserId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.mcwl.communityCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCollect;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.MyPublishCollectPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCollectRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface PublishCollectMapper extends BaseMapper<PublishCollect> {
|
||||||
|
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
List<PublishVo> myCollectList(Page<PublishCollect> page,
|
||||||
|
@Param("myPublishCollectPageRes") MyPublishCollectPageRes myPublishCollectPageRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void savePublishCollect(@Param("publishCollect") PublishCollect publishCollect);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
PublishCollect getPublishCollect(@Param("publishCollectRes") PublishCollectRes publishCollectRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void updatePublishCollect(@Param("publishCollect") PublishCollect publishCollect);
|
||||||
|
}
|
|
@ -1,8 +1,13 @@
|
||||||
package com.mcwl.communityCenter.mapper;
|
package com.mcwl.communityCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:ChenYan
|
* @Author:ChenYan
|
||||||
|
@ -14,4 +19,16 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PublishCommentLikeMapper extends BaseMapper<PublishCommentLike> {
|
public interface PublishCommentLikeMapper extends BaseMapper<PublishCommentLike> {
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
PublishCommentLike selectByTenantIdAndCommunityIdAndCommentId(@Param("tenantId") Long tenantId,
|
||||||
|
@Param("communityId") Long communityId,
|
||||||
|
@Param("commentId") Long commentId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void updateDelFlagById(@Param("publishCommentLike") PublishCommentLike publishCommentLike);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
PublishCommentLike selectLike(@Param("publishCommentLikeRes") PublishCommentLikeRes publishCommentLikeRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.mcwl.communityCenter.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishLike;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishLikeRes;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface PublishLikeMapper extends BaseMapper<PublishLike> {
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
PublishLike selectPublishLike(@Param("publishLikeRes") PublishLikeRes publishLikeRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void updateDelFlagById(@Param("publishLike") PublishLike publishLike);
|
||||||
|
}
|
|
@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Publish;
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.MyPublishPageRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.security.core.parameters.P;
|
import org.springframework.security.core.parameters.P;
|
||||||
|
@ -44,5 +46,13 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
||||||
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
List<Publish> publishList(Page<Publish> page,@Param("publishPageRes") PublishPageRes publishPageRes);
|
List<Publish> publishList(Page<Publish> page, @Param("publishPageRes") PublishPageRes publishPageRes);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
List<PublishVo> myPublishList(Page<Publish> page,
|
||||||
|
@Param("myPublishPageRes") MyPublishPageRes myPublishPageRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void insertPublish(@Param("publish") Publish publish);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.Question;
|
import com.mcwl.communityCenter.domain.Question;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.QuestionPageRes;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface QuestionMapper extends BaseMapper<Question> {
|
public interface QuestionMapper extends BaseMapper<Question> {
|
||||||
|
@ -37,4 +39,9 @@ public interface QuestionMapper extends BaseMapper<Question> {
|
||||||
@NotNull(message = "社区不能为空")
|
@NotNull(message = "社区不能为空")
|
||||||
@Param("communityId")
|
@Param("communityId")
|
||||||
Long communityId);
|
Long communityId);
|
||||||
|
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
List<Question> myQuestionList(Page<Question> page,
|
||||||
|
@Param("questionPageRes") QuestionPageRes questionPageRes,
|
||||||
|
@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.mcwl.communityCenter.service;
|
package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.CommunityAdvicePageRes;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
public interface CommunityAdviceService extends IService<CommunityAdvice> {
|
public interface CommunityAdviceService extends IService<CommunityAdvice> {
|
||||||
|
TableDataInfo getCommunityAdviceList(@Valid CommunityAdvicePageRes communityAdvicePageRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,6 @@ public interface CommunityFileLogService extends IService<CommunityFileLog> {
|
||||||
List<String> getUserAvatarList(Long tenantId, Long communityId, Long communityFileId);
|
List<String> getUserAvatarList(Long tenantId, Long communityId, Long communityFileId);
|
||||||
|
|
||||||
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
|
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
|
||||||
|
|
||||||
|
void saveCommunityFileLog(CommunityFileLog communityFileLog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
package com.mcwl.communityCenter.service;
|
package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
import com.mcwl.communityCenter.domain.CommunityFile;
|
||||||
import com.mcwl.communityCenter.domain.dto.*;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
public interface CommunityFileService extends IService<CommunityFile> {
|
public interface CommunityFileService extends IService<CommunityFile> {
|
||||||
|
|
||||||
void upload(CommunityUploadFileRes communityUploadFileRes);
|
R<String> upload(CommunityUploadFileRes communityUploadFileRes);
|
||||||
|
|
||||||
TableDataInfo getCommunityFileList(CommunityFilePageListRes communityFilePageListRes);
|
TableDataInfo getCommunityFileList(CommunityFilePageListRes communityFilePageListRes);
|
||||||
|
|
||||||
|
R<String> download(@Valid CommunityDownloadFileRes communityDownloadFileRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,25 +2,21 @@ package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityRes;
|
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityRes;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
public interface CommunityService extends IService<Community> {
|
public interface CommunityService extends IService<Community> {
|
||||||
TableDataInfo listByPage(CommunityListPageRes communityListPageRes);
|
TableDataInfo listByPage(CommunityListPageRes communityListPageRes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加社区
|
* 添加社区
|
||||||
* @param communityRes 社区信息
|
* @param addCommunityRes 社区信息
|
||||||
*/
|
*/
|
||||||
void addCommunity(CommunityRes communityRes);
|
void addCommunity(AddCommunityRes addCommunityRes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加入社区
|
* 加入社区
|
||||||
|
@ -44,4 +40,8 @@ public interface CommunityService extends IService<Community> {
|
||||||
* 判断是否加入社区
|
* 判断是否加入社区
|
||||||
*/
|
*/
|
||||||
R<Object> isJoinCommunity(JoinCommunityRes joinCommunityRes);
|
R<Object> isJoinCommunity(JoinCommunityRes joinCommunityRes);
|
||||||
|
|
||||||
|
CommunityDetailVo getCommunityDetail(Long communityId);
|
||||||
|
|
||||||
|
void editCommunity(@Valid EditCommunityRes editCommunityRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,14 @@ package com.mcwl.communityCenter.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityUser;
|
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||||
import com.mcwl.communityCenter.domain.dto.BlackListRes;
|
import com.mcwl.communityCenter.domain.dto.BlackListRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.CommunityUserManageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface CommunityUserService extends IService<CommunityUser> {
|
public interface CommunityUserService extends IService<CommunityUser> {
|
||||||
|
|
||||||
|
@ -23,4 +23,12 @@ public interface CommunityUserService extends IService<CommunityUser> {
|
||||||
* 拉黑
|
* 拉黑
|
||||||
*/
|
*/
|
||||||
R<Object> black(@Valid BlackListRes blackListRes);
|
R<Object> black(@Valid BlackListRes blackListRes);
|
||||||
|
|
||||||
|
List<CommunityUser> getAllCommunityUser();
|
||||||
|
|
||||||
|
void updateBlankCommunityUser(CommunityUser communityUser);
|
||||||
|
|
||||||
|
R<Object> unBlack(@Valid UnBlackListRes unBlackListRes);
|
||||||
|
|
||||||
|
R<Object> manage(@Valid CommunityUserManageRes communityUserManageRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.IncomeInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeInfoVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
public interface IncomeInfoService extends IService<IncomeInfo> {
|
||||||
|
|
||||||
|
|
||||||
|
R<IncomeInfoVo> communityIncome();
|
||||||
|
|
||||||
|
TableDataInfo incomeList(@Valid IncomeInfoListPageRes incomeInfoListPageRes);
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCollect;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
public interface PublishCollectService extends IService<PublishCollect> {
|
||||||
|
|
||||||
|
|
||||||
|
TableDataInfo myCollectList(@Valid MyPublishCollectPageRes myPublishCollectPageRes);
|
||||||
|
|
||||||
|
|
||||||
|
void savePublishCollect(PublishCollect publishCollect);
|
||||||
|
|
||||||
|
PublishCollect getPublishCollect(PublishCollectRes publishCollectRes, Long userId);
|
||||||
|
|
||||||
|
void updatePublishCollect(PublishCollect publishCollect);
|
||||||
|
}
|
|
@ -2,8 +2,12 @@ package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:ChenYan
|
* @Author:ChenYan
|
||||||
* @Project:mcwl-ai
|
* @Project:mcwl-ai
|
||||||
|
@ -15,4 +19,5 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public interface PublishCommentLikeService extends IService<PublishCommentLike> {
|
public interface PublishCommentLikeService extends IService<PublishCommentLike> {
|
||||||
|
|
||||||
|
void like(PublishCommentLikeRes publishCommentLikeRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public interface PublishCommentService extends IService<PublishComment> {
|
||||||
* @param commentDetailRes 评论详情参数
|
* @param commentDetailRes 评论详情参数
|
||||||
* @return 评论详情
|
* @return 评论详情
|
||||||
*/
|
*/
|
||||||
R<Object> getComment(CommentDetailRes commentDetailRes);
|
R<List<CommentVo>> getComment(CommentDetailRes commentDetailRes);
|
||||||
|
|
||||||
R<Object> addComment(CommentRes commentRes);
|
R<Object> addComment(CommentRes commentRes);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.mcwl.communityCenter.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishLike;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishLikeRes;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:ChenYan
|
||||||
|
* @Project:mcwl-ai
|
||||||
|
* @Package:com.mcwl.communityCenter.service
|
||||||
|
* @Filename:PublishCommissionLikeService
|
||||||
|
* @Description TODO
|
||||||
|
* @Date:2025/1/17 14:23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public interface PublishLikeService extends IService<PublishLike> {
|
||||||
|
|
||||||
|
|
||||||
|
void like(@Valid PublishLikeRes publishLikeRes);
|
||||||
|
}
|
|
@ -7,9 +7,7 @@ import com.mcwl.common.core.page.PageDomain;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.Publish;
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishDetailRes;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.PublishRes;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
@ -35,4 +33,10 @@ public interface PublishService extends IService<Publish> {
|
||||||
void elitePublish(Long communityId, Long publishId);
|
void elitePublish(Long communityId, Long publishId);
|
||||||
|
|
||||||
TableDataInfo publishList(PublishPageRes publishPageRes);
|
TableDataInfo publishList(PublishPageRes publishPageRes);
|
||||||
|
|
||||||
|
TableDataInfo myPublishList(MyPublishPageRes myPublishPageRes);
|
||||||
|
|
||||||
|
void collectPublish(@Valid PublishCollectRes publishCollectRes);
|
||||||
|
|
||||||
|
TableDataInfo getPersonHomeList(@Valid PersonHomePageRes personHomePageRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,4 +34,6 @@ public interface QuestionService extends IService<Question> {
|
||||||
// AjaxResult reply(QuestionReplyRes questionReplyRes);
|
// AjaxResult reply(QuestionReplyRes questionReplyRes);
|
||||||
|
|
||||||
TableDataInfo listImage(@Valid QuestionPageRes questionPageRes);
|
TableDataInfo listImage(@Valid QuestionPageRes questionPageRes);
|
||||||
|
|
||||||
|
TableDataInfo myQuestionList(@Valid QuestionPageRes questionPageRes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,38 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.CommunityAdvicePageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.CommunityAdviceVo;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
|
import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
||||||
import com.mcwl.communityCenter.service.CommunityAdviceService;
|
import com.mcwl.communityCenter.service.CommunityAdviceService;
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CommunityAdviceServiceImpl extends ServiceImpl<CommunityAdviceMapper, CommunityAdvice>
|
public class CommunityAdviceServiceImpl extends ServiceImpl<CommunityAdviceMapper, CommunityAdvice>
|
||||||
implements CommunityAdviceService {
|
implements CommunityAdviceService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo getCommunityAdviceList(CommunityAdvicePageRes communityAdvicePageRes) {
|
||||||
|
Page<CommunityAdvice> page = new Page<>(communityAdvicePageRes.getPageNum(), communityAdvicePageRes.getPageSize());
|
||||||
|
List<CommunityAdviceVo> communityAdviceList = baseMapper.getCommunityAdviceList(page, communityAdvicePageRes);
|
||||||
|
|
||||||
|
|
||||||
|
// 封装分页信息
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(communityAdviceList);
|
||||||
|
rspData.setTotal(page.getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,9 @@ public class CommunityFileLogServiceImpl extends ServiceImpl<CommunityFileLogMap
|
||||||
return baseMapper.getDownloadCount(tenantId, communityId, communityFileId);
|
return baseMapper.getDownloadCount(tenantId, communityId, communityFileId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveCommunityFileLog(CommunityFileLog communityFileLog) {
|
||||||
|
baseMapper.saveCommunityFileLog(communityFileLog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,29 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.Hutool;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.io.file.FileNameUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.obs.ObsUtils;
|
import com.mcwl.common.utils.obs.ObsUtils;
|
||||||
import com.mcwl.communityCenter.domain.CommunityFile;
|
import com.mcwl.communityCenter.domain.CommunityFile;
|
||||||
|
import com.mcwl.communityCenter.domain.CommunityFileLog;
|
||||||
|
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||||
import com.mcwl.communityCenter.domain.dto.*;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityFileVo;
|
import com.mcwl.communityCenter.domain.vo.CommunityFileVo;
|
||||||
import com.mcwl.communityCenter.domain.vo.DownloadFileUserVo;
|
import com.mcwl.communityCenter.domain.vo.DownloadFileUserVo;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityFileMapper;
|
import com.mcwl.communityCenter.mapper.CommunityFileMapper;
|
||||||
|
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||||
import com.mcwl.communityCenter.service.CommunityFileLogService;
|
import com.mcwl.communityCenter.service.CommunityFileLogService;
|
||||||
import com.mcwl.communityCenter.service.CommunityFileService;
|
import com.mcwl.communityCenter.service.CommunityFileService;
|
||||||
|
import com.mcwl.communityCenter.service.CommunityUserService;
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -33,26 +41,35 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
|
||||||
|
|
||||||
private final CommunityFileLogService communityFileLogService;
|
private final CommunityFileLogService communityFileLogService;
|
||||||
|
|
||||||
|
private final CommunityUserMapper communityUserMapper;
|
||||||
|
|
||||||
|
private static final String[] UN_UPLOAD_FILE_TYPE = new String[]{
|
||||||
|
"bmp", "dib",
|
||||||
|
"jpg", "jpeg", "jpe", "jfif",
|
||||||
|
"gif",
|
||||||
|
"tif", "tiff",
|
||||||
|
"png",
|
||||||
|
"heic",
|
||||||
|
"webp"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void upload(CommunityUploadFileRes communityUploadFileRes) {
|
public R<String> upload(CommunityUploadFileRes communityUploadFileRes) {
|
||||||
Long tenantId = communityUploadFileRes.getTenantId();
|
Long tenantId = communityUploadFileRes.getTenantId();
|
||||||
Long communityId = communityUploadFileRes.getCommunityId();
|
Long communityId = communityUploadFileRes.getCommunityId();
|
||||||
MultipartFile file = communityUploadFileRes.getFile();
|
Long currentUserId = SecurityUtils.getUserId();
|
||||||
Map<String, String> map = obsUtils.uploadFile(file);
|
|
||||||
String filename = file.getOriginalFilename();
|
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
||||||
long fileSize = file.getSize();
|
if (Objects.isNull(communityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityFile communityFile = BeanUtil.toBean(communityUploadFileRes, CommunityFile.class);
|
||||||
|
communityFile.setUserId(currentUserId);
|
||||||
|
|
||||||
CommunityFile communityFile = CommunityFile.builder()
|
|
||||||
.tenantId(tenantId)
|
|
||||||
.communityId(communityId)
|
|
||||||
.userId(SecurityUtils.getUserId())
|
|
||||||
.fileUrl(map.get("path"))
|
|
||||||
.objectKey(map.get("objectKey"))
|
|
||||||
.fileName(filename)
|
|
||||||
.fileSize(fileSize)
|
|
||||||
.build();
|
|
||||||
baseMapper.insert(communityFile);
|
baseMapper.insert(communityFile);
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,17 +79,14 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
|
||||||
for (CommunityFileVo communityFileVo : communityFileList) {
|
for (CommunityFileVo communityFileVo : communityFileList) {
|
||||||
DownloadFileUserVo downloadFileUserVo = new DownloadFileUserVo();
|
DownloadFileUserVo downloadFileUserVo = new DownloadFileUserVo();
|
||||||
|
|
||||||
List<String> avatarList = communityFileLogService.getUserAvatarList(communityFileVo.getTenantId(),
|
Long tenantId = communityFileVo.getTenantId();
|
||||||
communityFileVo.getCommunityId(),
|
Long communityId = communityFileVo.getCommunityId();
|
||||||
communityFileVo.getId());
|
Long fileId = communityFileVo.getId();
|
||||||
Integer count = communityFileLogService.getDownloadCount(communityFileVo.getTenantId(),
|
List<String> avatarList = communityFileLogService.getUserAvatarList(tenantId, communityId, fileId);
|
||||||
communityFileVo.getCommunityId(),
|
Integer count = communityFileLogService.getDownloadCount(tenantId, communityId, fileId);
|
||||||
communityFileVo.getId());
|
|
||||||
|
|
||||||
downloadFileUserVo.setAvatarList(avatarList);
|
downloadFileUserVo.setAvatarList(avatarList);
|
||||||
downloadFileUserVo.setCount(count);
|
downloadFileUserVo.setCount(count);
|
||||||
|
|
||||||
|
|
||||||
communityFileVo.setDownloadFileUser(downloadFileUserVo);
|
communityFileVo.setDownloadFileUser(downloadFileUserVo);
|
||||||
}
|
}
|
||||||
// 封装返回
|
// 封装返回
|
||||||
|
@ -83,4 +97,35 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
|
||||||
tableDataInfo.setMsg("查询成功");
|
tableDataInfo.setMsg("查询成功");
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<String> download(CommunityDownloadFileRes communityDownloadFileRes) {
|
||||||
|
|
||||||
|
Long tenantId = communityDownloadFileRes.getTenantId();
|
||||||
|
Long communityId = communityDownloadFileRes.getCommunityId();
|
||||||
|
Long fileId = communityDownloadFileRes.getFileId();
|
||||||
|
Long currentUserId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
||||||
|
if (Objects.isNull(communityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityFile communityFile = baseMapper.selectCommunityFile(tenantId, communityId, fileId);
|
||||||
|
|
||||||
|
if (Objects.isNull(communityFile)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "文件不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityFileLog communityFileLog = new CommunityFileLog();
|
||||||
|
communityFileLog.setTenantId(tenantId);
|
||||||
|
communityFileLog.setCommunityId(communityId);
|
||||||
|
communityFileLog.setCommunityFileId(fileId);
|
||||||
|
communityFileLog.setDownloadUserId(currentUserId);
|
||||||
|
|
||||||
|
|
||||||
|
communityFileLogService.saveCommunityFileLog(communityFileLog);
|
||||||
|
|
||||||
|
return R.ok(communityFile.getFileUrl());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,19 +8,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.domain.entity.SysUser;
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
import com.mcwl.common.core.page.PageDomain;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
import com.mcwl.common.core.redis.RedisCache;
|
||||||
import com.mcwl.common.exception.ServiceException;
|
import com.mcwl.common.exception.ServiceException;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
|
import com.mcwl.communityCenter.constant.AdviceConstant;
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
|
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
||||||
import com.mcwl.communityCenter.domain.CommunityUser;
|
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityRes;
|
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.JoinCommunityRes;
|
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityVo;
|
import com.mcwl.communityCenter.domain.vo.CommunityVo;
|
||||||
|
import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
||||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
import com.mcwl.communityCenter.service.CommunityService;
|
||||||
|
@ -46,6 +46,9 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
private final RedisCache redisCache;
|
private final RedisCache redisCache;
|
||||||
|
|
||||||
|
private final CommunityAdviceMapper communityAdviceMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
|
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
|
||||||
|
|
||||||
|
@ -68,11 +71,11 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void addCommunity(CommunityRes communityRes) {
|
public void addCommunity(AddCommunityRes addCommunityRes) {
|
||||||
try {
|
try {
|
||||||
Community community = new Community();
|
Community community = new Community();
|
||||||
BeanUtil.copyProperties(communityRes, community);
|
BeanUtil.copyProperties(addCommunityRes, community);
|
||||||
if (Objects.equals(communityRes.getType(), 0)) {
|
if (Objects.equals(addCommunityRes.getType(), 0)) {
|
||||||
community.setPrice(0.0);
|
community.setPrice(0.0);
|
||||||
}
|
}
|
||||||
baseMapper.insert(community);
|
baseMapper.insert(community);
|
||||||
|
@ -82,7 +85,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
.tenantId(SecurityUtils.getUserId())
|
.tenantId(SecurityUtils.getUserId())
|
||||||
.communityId(community.getId())
|
.communityId(community.getId())
|
||||||
.userId(SecurityUtils.getUserId())
|
.userId(SecurityUtils.getUserId())
|
||||||
.userType(1)
|
.userType(2)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -129,7 +132,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
Calendar now = Calendar.getInstance();
|
Calendar now = Calendar.getInstance();
|
||||||
Date startTime = now.getTime();
|
Date startTime = now.getTime();
|
||||||
now.add(Calendar.DAY_OF_YEAR, community.getValidityDay());
|
now.add(Calendar.YEAR, community.getValidityDay());
|
||||||
Date endTime = now.getTime();
|
Date endTime = now.getTime();
|
||||||
|
|
||||||
CommunityUser cu = CommunityUser.builder()
|
CommunityUser cu = CommunityUser.builder()
|
||||||
|
@ -144,6 +147,19 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
communityUserMapper.insert(cu);
|
communityUserMapper.insert(cu);
|
||||||
|
|
||||||
|
if (price <= 0) {
|
||||||
|
return R.ok("加入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||||
|
communityAdvice.setTenantId(tenantId);
|
||||||
|
communityAdvice.setCommunityId(communityId);
|
||||||
|
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||||
|
communityAdvice.setAdviceType(AdviceConstant.COMMUNITY_NOTICE);
|
||||||
|
communityAdvice.setUserId(tenantId);
|
||||||
|
communityAdvice.setContent(StringUtils.format("{}加入{}社区,金币+{}",
|
||||||
|
SecurityUtils.getLoginUser().getUser().getNickName(), community.getCommunityName(), price));
|
||||||
|
communityAdviceMapper.insert(communityAdvice);
|
||||||
|
|
||||||
return R.ok("加入成功");
|
return R.ok("加入成功");
|
||||||
}
|
}
|
||||||
|
@ -151,11 +167,9 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo getMyJoinCommunity(JoinCommunityListPageRes joinCommunityListPageRes) {
|
public TableDataInfo getMyJoinCommunity(JoinCommunityListPageRes joinCommunityListPageRes) {
|
||||||
Page<Community> page = new Page<>(joinCommunityListPageRes.getPageNum(), joinCommunityListPageRes.getPageSize());
|
Page<Community> page = new Page<>(joinCommunityListPageRes.getPageNum(), joinCommunityListPageRes.getPageSize());
|
||||||
OrderItem orderItem = new OrderItem("create_time", false);
|
page.addOrder(new OrderItem("create_time", false));
|
||||||
page.addOrder(orderItem);
|
|
||||||
|
|
||||||
String searchContent = joinCommunityListPageRes.getSearchContent();
|
List<Community> communityList = baseMapper.getMyJoinCommunity(page, SecurityUtils.getUserId(), joinCommunityListPageRes);
|
||||||
List<Community> communityList = baseMapper.getMyJoinCommunity(page, SecurityUtils.getUserId(), searchContent);
|
|
||||||
|
|
||||||
|
|
||||||
return this.getCommunityVoTableDataInfo(communityList, page.getTotal());
|
return this.getCommunityVoTableDataInfo(communityList, page.getTotal());
|
||||||
|
@ -169,9 +183,27 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public R<Object> quitCommunity(Long tenantId, Long communityId) {
|
public R<Object> quitCommunity(Long tenantId, Long communityId) {
|
||||||
|
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
Community community = baseMapper.getByTenantIdAndCommunityId(tenantId, communityId);
|
||||||
|
|
||||||
|
if (Objects.isNull(community)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "社区不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, userId);
|
||||||
|
if (Objects.isNull(communityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您不是该社区成员");
|
||||||
|
}
|
||||||
|
|
||||||
Integer communityJoinNum = communityUserMapper.getJoinNum(tenantId, communityId);
|
Integer communityJoinNum = communityUserMapper.getJoinNum(tenantId, communityId);
|
||||||
|
|
||||||
baseMapper.quitCommunity(tenantId, communityId, SecurityUtils.getUserId());
|
if (communityUser.getUserType() == 2 && communityJoinNum > 1) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"社区还有成员,无法退出");
|
||||||
|
}
|
||||||
|
|
||||||
|
baseMapper.quitCommunity(tenantId, communityId, userId);
|
||||||
|
|
||||||
if (communityJoinNum == 1) {
|
if (communityJoinNum == 1) {
|
||||||
baseMapper.deleteCommunity(tenantId, communityId);
|
baseMapper.deleteCommunity(tenantId, communityId);
|
||||||
|
@ -186,6 +218,18 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
return R.ok(isJoinCommunity);
|
return R.ok(isJoinCommunity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommunityDetailVo getCommunityDetail(Long communityId) {
|
||||||
|
Community community = baseMapper.selectById(communityId);
|
||||||
|
return BeanUtil.toBean(community, CommunityDetailVo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editCommunity(EditCommunityRes editCommunityRes) {
|
||||||
|
Community community = BeanUtil.toBean(editCommunityRes, Community.class);
|
||||||
|
baseMapper.updateById(community);
|
||||||
|
}
|
||||||
|
|
||||||
private TableDataInfo getCommunityVoTableDataInfo(List<Community> communityList, Long total) {
|
private TableDataInfo getCommunityVoTableDataInfo(List<Community> communityList, Long total) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,8 +268,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
|
|
||||||
LocalDate currentLocalDate = LocalDate.now(ZoneId.systemDefault());
|
LocalDate currentLocalDate = LocalDate.now(ZoneId.systemDefault());
|
||||||
for (Community community : communityList) {
|
for (Community community : communityList) {
|
||||||
CommunityVo communityVo = new CommunityVo();
|
CommunityVo communityVo = BeanUtil.toBean(community, CommunityVo.class);
|
||||||
BeanUtil.copyProperties(community, communityVo);
|
|
||||||
// 当前时间和创建时间差
|
// 当前时间和创建时间差
|
||||||
Date createTime = community.getCreateTime();
|
Date createTime = community.getCreateTime();
|
||||||
LocalDate createLocalDate = createTime.toInstant()
|
LocalDate createLocalDate = createTime.toInstant()
|
||||||
|
@ -233,6 +276,10 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
||||||
.toLocalDate();
|
.toLocalDate();
|
||||||
long daysBetween = ChronoUnit.DAYS.between(createLocalDate, currentLocalDate);
|
long daysBetween = ChronoUnit.DAYS.between(createLocalDate, currentLocalDate);
|
||||||
SysUser sysUser = sysUserService.selectUserById(community.getTenantId());
|
SysUser sysUser = sysUserService.selectUserById(community.getTenantId());
|
||||||
|
CommunityUser communityUser = communityUserMapper.selectCommunityUser(community.getTenantId(), community.getId(), SecurityUtils.getUserId());
|
||||||
|
if (Objects.nonNull(communityUser)) {
|
||||||
|
communityVo.setUserType(communityUser.getUserType());
|
||||||
|
}
|
||||||
communityVo.setUserId(community.getTenantId());
|
communityVo.setUserId(community.getTenantId());
|
||||||
communityVo.setAvatar(sysUser.getAvatar());
|
communityVo.setAvatar(sysUser.getAvatar());
|
||||||
communityVo.setNickName(sysUser.getNickName());
|
communityVo.setNickName(sysUser.getNickName());
|
||||||
|
|
|
@ -1,35 +1,24 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.constant.HttpStatus;
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.domain.entity.SysUser;
|
|
||||||
import com.mcwl.common.core.page.TableDataInfo;
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
|
||||||
import com.mcwl.communityCenter.domain.Community;
|
|
||||||
import com.mcwl.communityCenter.domain.CommunityUser;
|
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||||
import com.mcwl.communityCenter.domain.dto.BlackListRes;
|
import com.mcwl.communityCenter.domain.dto.BlackListRes;
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityRes;
|
|
||||||
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.CommunityUserManageRes;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityUserVo;
|
import com.mcwl.communityCenter.domain.vo.CommunityUserVo;
|
||||||
import com.mcwl.communityCenter.domain.vo.CommunityVo;
|
|
||||||
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
|
||||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||||
import com.mcwl.communityCenter.service.CommunityService;
|
|
||||||
import com.mcwl.communityCenter.service.CommunityUserService;
|
import com.mcwl.communityCenter.service.CommunityUserService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -43,7 +32,7 @@ public class CommunityUserServiceImpl extends ServiceImpl<CommunityUserMapper, C
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo getCommunityUserList(CommunityUserListPageRes communityUserListPageRes) {
|
public TableDataInfo getCommunityUserList(CommunityUserListPageRes communityUserListPageRes) {
|
||||||
Page<CommunityUser> page = new Page<>(communityUserListPageRes.getPageNum(), communityUserListPageRes.getPageSize());
|
Page<CommunityUser> page = new Page<>(communityUserListPageRes.getPageNum(), communityUserListPageRes.getPageSize());
|
||||||
page.addOrder(new OrderItem("create_time", false));
|
// page.addOrder(new OrderItem("cu.create_time", false));
|
||||||
|
|
||||||
List<CommunityUserVo> communityUserList = baseMapper.getCommunityUserList(page, communityUserListPageRes);
|
List<CommunityUserVo> communityUserList = baseMapper.getCommunityUserList(page, communityUserListPageRes);
|
||||||
|
|
||||||
|
@ -57,26 +46,128 @@ public class CommunityUserServiceImpl extends ServiceImpl<CommunityUserMapper, C
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Object> black(BlackListRes blackListRes) {
|
public R<Object> black(BlackListRes blackListRes) {
|
||||||
|
Long tenantId = blackListRes.getTenantId();
|
||||||
Long communityId = blackListRes.getCommunityId();
|
Long communityId = blackListRes.getCommunityId();
|
||||||
Long userId = blackListRes.getUserId();
|
Long userId = blackListRes.getUserId();
|
||||||
Integer blackDay = blackListRes.getBlackDay();
|
Integer blackDay = blackListRes.getBlackDay();
|
||||||
String blackReason = blackListRes.getBlackReason();
|
String blackReason = blackListRes.getBlackReason();
|
||||||
|
|
||||||
CommunityUser communityUser = baseMapper.selectOne(new LambdaQueryWrapper<CommunityUser>()
|
// 拉黑用户
|
||||||
.eq(CommunityUser::getCommunityId, communityId)
|
CommunityUser blackCommunityUser = baseMapper.selectCommunityUser(
|
||||||
.eq(CommunityUser::getUserId, userId));
|
tenantId, communityId, userId
|
||||||
if (Objects.isNull(communityUser)) {
|
);
|
||||||
|
|
||||||
|
// 当前用户
|
||||||
|
CommunityUser currentCommunityUser = baseMapper.selectCommunityUser(
|
||||||
|
tenantId, communityId, SecurityUtils.getUserId()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (currentCommunityUser.getUserType() == 0) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主/管理员,无法拉黑");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(blackCommunityUser)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户不在该社区中");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户不在该社区中");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("1".equals(blackCommunityUser.getIsBlack())) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户已拉黑");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blackCommunityUser.getUserType() != 0) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户是群主/管理员,无法拉黑");
|
||||||
|
}
|
||||||
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.add(Calendar.DATE, blackDay);
|
calendar.add(Calendar.DATE, blackDay);
|
||||||
|
|
||||||
communityUser.setIsBlank("1");
|
blackCommunityUser.setIsBlack("1");
|
||||||
communityUser.setBlankEndTime(calendar.getTime());
|
blackCommunityUser.setBlackEndTime(calendar.getTime());
|
||||||
communityUser.setBlackReason(blackReason);
|
blackCommunityUser.setBlackReason(blackReason);
|
||||||
|
|
||||||
|
baseMapper.updateBlackCommunityUser(blackCommunityUser);
|
||||||
|
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CommunityUser> getAllCommunityUser() {
|
||||||
|
return baseMapper.getAllCommunityUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateBlankCommunityUser(CommunityUser communityUser) {
|
||||||
|
baseMapper.updateBlackCommunityUser(communityUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Object> unBlack(UnBlackListRes unBlackListRes) {
|
||||||
|
Long tenantId = unBlackListRes.getTenantId();
|
||||||
|
Long communityId = unBlackListRes.getCommunityId();
|
||||||
|
Long unBlankUserId = unBlackListRes.getUserId();
|
||||||
|
Long currentUserId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
|
||||||
|
// 当前用户
|
||||||
|
CommunityUser currentCommunityUser = baseMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
||||||
|
if (Objects.isNull(currentCommunityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区用户");
|
||||||
|
}
|
||||||
|
if (Objects.equals(currentCommunityUser.getUserType(), 0)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主/管理员,无法取消拉黑");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 被取消拉黑的用户
|
||||||
|
CommunityUser unBlackCommunityUser = baseMapper.selectCommunityUser(tenantId, communityId, unBlankUserId);
|
||||||
|
|
||||||
|
if (Objects.isNull(unBlackCommunityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户不在该社区中");
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityUser communityUser = BeanUtil.toBean(unBlackCommunityUser, CommunityUser.class);
|
||||||
|
communityUser.setIsBlack("0");
|
||||||
|
communityUser.setBlackReason(null);
|
||||||
|
communityUser.setBlackEndTime(null);
|
||||||
|
baseMapper.updateBlackCommunityUser(communityUser);
|
||||||
|
return R.ok("取消成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Object> manage(CommunityUserManageRes communityUserManageRes) {
|
||||||
|
Long tenantId = communityUserManageRes.getTenantId();
|
||||||
|
Long communityId = communityUserManageRes.getCommunityId();
|
||||||
|
Long manageUserId = communityUserManageRes.getUserId();
|
||||||
|
Long currentUserId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
// 当前用户
|
||||||
|
CommunityUser currentCommunityUser = baseMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
||||||
|
if (Objects.isNull(currentCommunityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区用户");
|
||||||
|
}
|
||||||
|
if (!Objects.equals(currentCommunityUser.getUserType(), 2)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主,无法设置管理");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置管理的用户
|
||||||
|
CommunityUser manageCommunityUser = baseMapper.selectCommunityUser(tenantId, communityId, manageUserId);
|
||||||
|
|
||||||
|
if (Objects.isNull(manageCommunityUser)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户不在该社区中");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Objects.equals(manageCommunityUser.getUserType(), 2)) {
|
||||||
|
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该用户已经是群主");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Objects.equals(manageCommunityUser.getUserType(), 1)) {
|
||||||
|
manageCommunityUser.setUserType(0);
|
||||||
|
} else {
|
||||||
|
manageCommunityUser.setUserType(1);
|
||||||
|
}
|
||||||
|
baseMapper.updateManageCommunityUser(manageCommunityUser);
|
||||||
|
|
||||||
|
return R.ok("设置成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.common.utils.StringUtils;
|
||||||
|
import com.mcwl.communityCenter.constant.AdviceConstant;
|
||||||
|
import com.mcwl.communityCenter.domain.*;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeAmountVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeInfoListVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.IncomeInfoVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||||
|
import com.mcwl.communityCenter.mapper.*;
|
||||||
|
import com.mcwl.communityCenter.service.IncomeInfoService;
|
||||||
|
import com.mcwl.communityCenter.service.QuestionService;
|
||||||
|
import com.mcwl.system.service.ISysUserService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class IncomeInfoServiceImpl extends ServiceImpl<IncomeInfoMapper, IncomeInfo> implements IncomeInfoService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区收益
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<IncomeInfoVo> communityIncome() {
|
||||||
|
|
||||||
|
// 社区收益
|
||||||
|
IncomeAmountVo communityIncome = baseMapper.communityIncome(SecurityUtils.getUserId());
|
||||||
|
|
||||||
|
// 问答收益
|
||||||
|
IncomeAmountVo questionIncome = baseMapper.questionIncome(SecurityUtils.getUserId());
|
||||||
|
|
||||||
|
// 累计收益
|
||||||
|
Double totalIncome = baseMapper.totalIncome();
|
||||||
|
|
||||||
|
IncomeInfoVo incomeInfoVo = IncomeInfoVo.builder()
|
||||||
|
.communityIncome(communityIncome)
|
||||||
|
.questionIncome(questionIncome)
|
||||||
|
.totalIncome(totalIncome)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
return R.ok(incomeInfoVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo incomeList(IncomeInfoListPageRes incomeInfoListPageRes) {
|
||||||
|
Page<IncomeInfo> page = this.initPage(incomeInfoListPageRes);
|
||||||
|
List<IncomeInfoListVo> incomeInfoList = baseMapper.incomeList(page, incomeInfoListPageRes, SecurityUtils.getUserId());
|
||||||
|
|
||||||
|
|
||||||
|
// 封装分页信息
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(incomeInfoList);
|
||||||
|
rspData.setTotal(page.getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Page<IncomeInfo> initPage(PageDomain pageDomain) {
|
||||||
|
return new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -120,7 +120,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteMapper, Invite> impleme
|
||||||
|
|
||||||
Calendar now = Calendar.getInstance();
|
Calendar now = Calendar.getInstance();
|
||||||
Date startTime = now.getTime();
|
Date startTime = now.getTime();
|
||||||
now.add(Calendar.DAY_OF_YEAR, community.getValidityDay());
|
now.add(Calendar.YEAR, community.getValidityDay());
|
||||||
Date endTime = now.getTime();
|
Date endTime = now.getTime();
|
||||||
|
|
||||||
communityUserMapper.insert(CommunityUser
|
communityUserMapper.insert(CommunityUser
|
||||||
|
@ -128,7 +128,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteMapper, Invite> impleme
|
||||||
.tenantId(userId)
|
.tenantId(userId)
|
||||||
.communityId(communityId)
|
.communityId(communityId)
|
||||||
.userId(SecurityUtils.getUserId())
|
.userId(SecurityUtils.getUserId())
|
||||||
.userType(0)
|
.userType(1)
|
||||||
.inviteId(invite.getId())
|
.inviteId(invite.getId())
|
||||||
.startTime(startTime)
|
.startTime(startTime)
|
||||||
.endTime(endTime)
|
.endTime(endTime)
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.core.domain.R;
|
||||||
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
|
import com.mcwl.common.core.page.PageDomain;
|
||||||
|
import com.mcwl.common.core.page.TableDataInfo;
|
||||||
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.communityCenter.domain.Community;
|
||||||
|
import com.mcwl.communityCenter.domain.Publish;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishCollect;
|
||||||
|
import com.mcwl.communityCenter.domain.Question;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.*;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.CommentVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PersonHomeVo;
|
||||||
|
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||||
|
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
||||||
|
import com.mcwl.communityCenter.mapper.InviteMapper;
|
||||||
|
import com.mcwl.communityCenter.mapper.PublishCollectMapper;
|
||||||
|
import com.mcwl.communityCenter.mapper.PublishMapper;
|
||||||
|
import com.mcwl.communityCenter.service.PublishCollectService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||||
|
import com.mcwl.communityCenter.service.PublishService;
|
||||||
|
import com.mcwl.system.service.ISysUserService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PublishCollectServiceImpl extends ServiceImpl<PublishCollectMapper, PublishCollect> implements PublishCollectService {
|
||||||
|
|
||||||
|
private final PublishCommentService publishCommentService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo myCollectList(MyPublishCollectPageRes myPublishCollectPageRes) {
|
||||||
|
Page<PublishCollect> page = initPage(myPublishCollectPageRes);
|
||||||
|
page.addOrder(new OrderItem("p.create_time", false));
|
||||||
|
List<PublishVo> publishVoList = baseMapper.myCollectList(page, myPublishCollectPageRes, SecurityUtils.getUserId());
|
||||||
|
List<PersonHomeVo> personHomeVoList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (PublishVo publishVo : publishVoList) {
|
||||||
|
PersonHomeVo personHomeVo = BeanUtil.toBean(publishVo, PersonHomeVo.class);
|
||||||
|
|
||||||
|
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
||||||
|
commentDetailRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
||||||
|
commentDetailRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
||||||
|
commentDetailRes.setOperatorId(publishVo.getId());
|
||||||
|
|
||||||
|
List<CommentVo> commentVoList = publishCommentService.getComment(commentDetailRes).getData();
|
||||||
|
personHomeVo.setCommentList(commentVoList);
|
||||||
|
personHomeVoList.add(personHomeVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 封装分页信息
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(personHomeVoList);
|
||||||
|
rspData.setTotal(page.getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void savePublishCollect(PublishCollect publishCollect) {
|
||||||
|
baseMapper.savePublishCollect(publishCollect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PublishCollect getPublishCollect(PublishCollectRes publishCollectRes, Long userId) {
|
||||||
|
return baseMapper.getPublishCollect(publishCollectRes, userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updatePublishCollect(PublishCollect publishCollect) {
|
||||||
|
baseMapper.updatePublishCollect(publishCollect);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Page<PublishCollect> initPage(PageDomain pageDomain) {
|
||||||
|
return new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,12 +1,27 @@
|
||||||
package com.mcwl.communityCenter.service.impl;
|
package com.mcwl.communityCenter.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.exception.ServiceException;
|
||||||
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
|
import com.mcwl.common.utils.StringUtils;
|
||||||
|
import com.mcwl.communityCenter.constant.AdviceConstant;
|
||||||
|
import com.mcwl.communityCenter.domain.CommunityAdvice;
|
||||||
|
import com.mcwl.communityCenter.domain.PublishComment;
|
||||||
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||||
|
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||||
import com.mcwl.communityCenter.mapper.PublishCommentLikeMapper;
|
import com.mcwl.communityCenter.mapper.PublishCommentLikeMapper;
|
||||||
|
import com.mcwl.communityCenter.mapper.PublishCommentMapper;
|
||||||
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**评论区点赞业务层
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评论区点赞业务层
|
||||||
|
*
|
||||||
* @Author:ChenYan
|
* @Author:ChenYan
|
||||||
* @Project:mcwl-ai
|
* @Project:mcwl-ai
|
||||||
* @Package:com.mcwl.communityCenter.service.impl
|
* @Package:com.mcwl.communityCenter.service.impl
|
||||||
|
@ -15,5 +30,18 @@ import org.springframework.stereotype.Service;
|
||||||
* @Date:2025/1/17 14:25
|
* @Date:2025/1/17 14:25
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PublishCommentLikeServiceImpl extends ServiceImpl<PublishCommentLikeMapper, PublishCommentLike>implements PublishCommentLikeService {
|
@RequiredArgsConstructor
|
||||||
|
public class PublishCommentLikeServiceImpl extends ServiceImpl<PublishCommentLikeMapper, PublishCommentLike> implements PublishCommentLikeService {
|
||||||
|
|
||||||
|
|
||||||
|
private final PublishCommentMapper publishCommentMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void like(PublishCommentLikeRes publishCommentLikeRes) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue