Compare commits

..

No commits in common. "5eb778c21cea69caba05ffd847bc2ce68e77e0fd" and "5083e455aba118686c9efc84e3d245303cd9ba37" have entirely different histories.

138 changed files with 1492 additions and 3133 deletions

BIN
blob

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1008 KiB

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

@ -1,43 +0,0 @@
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);
}
}

View File

@ -1,13 +1,18 @@
package com.mcwl.web.controller.communityCenter;
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.TableDataInfo;
import com.mcwl.communityCenter.domain.dto.*;
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
import com.mcwl.communityCenter.domain.Community;
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
@ -15,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Objects;
/**
*
@ -39,28 +45,6 @@ public class CommunityController {
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("编辑成功");
}
/**
*
@ -75,12 +59,15 @@ public class CommunityController {
/**
*
*
* @param communityRes
* @return
*/
@ApiOperation(value = "添加社区")
@PostMapping("addCommunity")
public R<Object> addCommunity(@RequestBody @Valid AddCommunityRes addCommunityRes) {
communityService.addCommunity(addCommunityRes);
return R.ok("社区添加成功");
@PostMapping("add")
public R<Object> addCommunity(@RequestBody @Valid CommunityRes communityRes) {
communityService.addCommunity(communityRes);
return R.ok();
}
/**
@ -98,32 +85,37 @@ public class CommunityController {
*/
@ApiOperation(value = "退出社区")
@PostMapping("quit")
public R<Object> quitCommunity(@RequestBody @Valid QuitCommunityRes quitCommunityRes) {
Long tenantId = quitCommunityRes.getTenantId();
Long communityId = quitCommunityRes.getCommunityId();
public R<Object> quitCommunity(@ApiParam(value = "租户id", required = true)
@NotNull(message = "租户id不能为空")
@Valid
Long tenantId,
@ApiParam(value = "社区id", required = true)
@NotNull(message = "社区id不能为空")
@Valid
Long communityId) {
return communityService.quitCommunity(tenantId, communityId);
}
//
// /**
// * 删除社区
// *
// * @param id 社区id
// * @return 删除结果
// */
// @ApiOperation(value = "删除社区")
// @GetMapping("delete")
// public R<Object> deleteCommunity(@NotNull(message = "id不能为空")
// @ApiParam(value = "id", required = true)
// @Valid
// Long id) {
// Community community = communityService.getById(id);
// if (Objects.isNull(community)) {
// return R.fail(HttpStatus.SHOW_ERROR_MSG, "该社区不存在");
// }
// communityService.removeById(id);
// return R.ok();
// }
/**
*
*
* @param id id
* @return
*/
@ApiOperation(value = "删除社区")
@GetMapping("delete")
public R<Object> deleteCommunity(@NotNull(message = "id不能为空")
@ApiParam(value = "id", required = true)
@Valid
Long id) {
Community community = communityService.getById(id);
if (Objects.isNull(community)) {
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该社区不存在");
}
communityService.removeById(id);
return R.ok();
}
/**
*

View File

@ -11,10 +11,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
/**
*
@ -29,6 +27,16 @@ public class CommunityFileController {
private final CommunityFileLogService communityFileLogService;
/**
*
*/
@ApiOperation(value = "社区文件上传")
@PostMapping("/upload")
public R<Object> upload(@RequestBody @Valid CommunityUploadFileRes communityUploadFileRes) {
communityFileService.upload(communityUploadFileRes);
return R.ok();
}
/**
*
*/
@ -39,23 +47,5 @@ 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);
}
}

View File

@ -50,25 +50,5 @@ public class CommunityUserController {
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);
}
}

View File

@ -1,52 +0,0 @@
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();
}
}

View File

@ -1,46 +0,0 @@
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);
}
}

View File

@ -6,7 +6,6 @@ import com.mcwl.common.core.domain.R;
import com.mcwl.communityCenter.domain.dto.CommentDelRes;
import com.mcwl.communityCenter.domain.dto.CommentDetailRes;
import com.mcwl.communityCenter.domain.dto.CommentRes;
import com.mcwl.communityCenter.domain.vo.CommentVo;
import com.mcwl.communityCenter.service.PublishCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -17,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.List;
/**
*
@ -33,12 +31,12 @@ public class PublishCommentController extends BaseController {
/**
*
*
*
* @param commentRes
* @return
*/
@ApiOperation(value = "添加发布评论")
@ApiOperation(value = "添加评论")
@PostMapping("/save")
public R<Object> save(@RequestBody @Valid CommentRes commentRes) {
@ -54,7 +52,7 @@ public class PublishCommentController extends BaseController {
*/
@ApiOperation(value = "获取评论详情")
@PostMapping("/detail")
public R<List<CommentVo>> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
public R<Object> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
return publishCommentService.getComment(commentDetailRes);
}

View File

@ -0,0 +1,28 @@
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;
/**
* @AuthorChenYan
* @Projectmcwl-ai
* @Packagecom.mcwl.web.controller.communityCenter
* @FilenamePublishCommissionLikeController
* @Description TODO
* @Date2025/1/17 14:21
*/
@Api(tags = "社群评论区点赞")
@RestController
@RequestMapping("PublishCommissionLike")
public class PublishCommentLikeController extends BaseController {
@Autowired
private PublishCommentLikeService publishCommentLikeService;
}

View File

@ -5,7 +5,9 @@ import com.mcwl.common.constant.HttpStatus;
import com.mcwl.common.core.domain.AjaxResult;
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.dto.PublishDetailRes;
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.service.PublishService;
import io.swagger.annotations.Api;
@ -104,14 +106,4 @@ public class PublishController {
return R.ok();
}
/**
* /
*/
@ApiOperation(value = "收藏/取消收藏")
@PostMapping("collect")
public R<Object> collectPublish(@RequestBody @Valid PublishCollectRes publishCollectRes) {
publishService.collectPublish(publishCollectRes);
return R.ok();
}
}

View File

@ -1,42 +0,0 @@
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();
}
}

View File

@ -57,12 +57,6 @@ public class QuestionController {
// 付费类型为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();
SysUser sysUser = sysUserService.selectUserById(userId);
Double wallet = sysUser.getWallet();

View File

@ -6,7 +6,6 @@ import com.mcwl.memberCenter.domain.Benefit;
import com.mcwl.memberCenter.domain.dto.AddBenefitDto;
import com.mcwl.memberCenter.domain.dto.EditBenefitDto;
import com.mcwl.memberCenter.domain.vo.BenefitVo;
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
import com.mcwl.memberCenter.service.BenefitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -53,19 +52,6 @@ public class BenefitController {
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);
}
/**
*
*/

View File

@ -0,0 +1,26 @@
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);
}
}

View File

@ -167,6 +167,13 @@ huawei:
upload:
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:

View File

@ -108,14 +108,14 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 43200
expireTime: 30
# 公众号配置
wechat:
# 应用ID
appid: wx0a72f196ec9c3a70
appid: wx82d4c3c96f0ffa5b
# 应用密钥
secret: 11218568b79e2c5eb10459ef8c0374bd
secret: abbabcf1da711a3bbd95387ec83edcac
# yml版(application.yml)
aliyun:
@ -137,23 +137,23 @@ mall:
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=
# 线上应用公钥证书
appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
# 线上支付宝公钥证书路径
alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
# 线上支付宝根证书路径
alipayRootCertPath: /opt/cert/pro/alipayRootCert.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
# # 沙箱支付宝根证书路径
# alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
notifyUrl: http://113.45.9.111:8080/ali/pay/notify
# # 线上应用公钥证书
# appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
# # 线上支付宝公钥证书路径
# alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
# # 线上支付宝根证书路径
# alipayRootCertPath: /opt/cert/pro/alipayRootCert.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
# 沙箱支付宝根证书路径
alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
notifyUrl: https://36072a51.r27.cpolar.top/ali/pay/notify
# 线上支付宝网关
gatewayUrl: https://openapi.alipay.com/gateway.do
# 绑定回调
bindUrl: http://113.45.9.111:8080/ali/pay/callback
bindUrl: https://36072a51.r27.cpolar.top/ali/pay/callback
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID支付宝登录号支持邮箱和手机号格式 3、ALIPAY_OPEN_ID支付宝openid
identityType: ALIPAY_OPEN_ID
# 授权url
@ -166,6 +166,15 @@ huawei:
bucketName: mcwl
upload:
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:
encryptUrl: http://113.45.9.111:9090/encryptAndUpload

View File

@ -84,7 +84,7 @@ mybatis-plus:
# NONE不启用 PARTIAL只对非嵌套 resultMap 自动映射 FULL对所有 resultMap 自动映射
autoMappingBehavior: PARTIAL
# MyBatis 自动映射时未知列或未知属性处理策
# NONE不做处理 WARNING打印相关警告 FAILING抛出异常和详细信息.
# NONE不做处理 WARNING打印相关警告 FAILING抛出异常和详细信息
autoMappingUnknownColumnBehavior: NONE
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl

View File

@ -178,8 +178,7 @@ public class Constants
public static final String[] JOB_WHITELIST_STR = {
"com.mcwl.quartz.task",
"com.mcwl.memberCenter.task",
"com.mcwl.pay.task",
"com.mcwl.communityCenter.task"
"com.mcwl.pay.task"
};
/**

View File

@ -51,7 +51,6 @@ public class ObsUtils {
map.put("path",putObjectResult.getObjectUrl());
map.put("objectKey",putObjectResult.getObjectKey());
map.put("size",multipartFile.getSize()+"");
map.put("fileName",multipartFile.getOriginalFilename());
} catch (IOException e) {
throw new RuntimeException(e);
}

View File

@ -1,29 +0,0 @@
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;
}

View File

@ -28,14 +28,6 @@ public class CommunityAdvice extends BaseEntity {
* id
*/
private Long communityId;
/**
*
*/
private Long sendUserId;
/**
* 0 1 2 3
*/
private Integer adviceType;
/**
*
*/

View File

@ -7,7 +7,9 @@ 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.*;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
@ -15,8 +17,7 @@ import lombok.*;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cc_community_file")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CommunityFile extends BaseEntity {
@TableId

View File

@ -43,7 +43,7 @@ public class CommunityUser extends BaseEntity {
private Long userId;
/**
* 0 1 2
* 0 1
*/
private Integer userType;
@ -70,7 +70,7 @@ public class CommunityUser extends BaseEntity {
/**
* 0 1
*/
private String isBlack;
private String isBlank;
/**
*
@ -80,6 +80,6 @@ public class CommunityUser extends BaseEntity {
/**
*
*/
private Date blackEndTime;
private Date blankEndTime;
}

View File

@ -1,44 +0,0 @@
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;
}

View File

@ -46,15 +46,10 @@ public class Publish extends BaseEntity {
private String imageUrl;
/**
* url
*
*/
private String fileUrl;
/**
*
*/
private String fileName;
/**
*
*/

View File

@ -1,44 +0,0 @@
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;
}

View File

@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
@ApiModel(description = "评论区评论")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cc_publish_comment")
@TableName("cc_comment")
public class PublishComment extends BaseEntity {
/**
* id
@ -32,10 +32,10 @@ public class PublishComment extends BaseEntity {
@ApiModelProperty(value = "社区id")
private Long communityId;
/**
* id
* id
*/
@ApiModelProperty(value = "发布id")
private Long publishId;
@ApiModelProperty(value = "运营id")
private Long operatorId;
/**
* id
*/

View File

@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
@ApiModel(description = "评论点赞")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("cc_publish_comment_like")
@TableName("cc_comment_like")
public class PublishCommentLike extends BaseEntity {
/**
@ -29,29 +29,18 @@ public class PublishCommentLike extends BaseEntity {
@ApiModelProperty(value = "评论点赞id")
private Long id;
/**
* id
* id
*/
@ApiModelProperty(value = "户id")
private Long tenantId;
@ApiModelProperty(value = "户id")
private Long userId;
/**
* id
*/
@ApiModelProperty(value = "社群id")
private Long communityId;
/**
* id
*/
@ApiModelProperty(value = "发布id")
private Long publishId;
/**
* id
*/
@ApiModelProperty(value = "评论id")
private Long publishCommentId;
/**
* id
*/
@ApiModelProperty(value = "用户id")
private Long userId;
}

View File

@ -1,49 +0,0 @@
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;
}

View File

@ -53,6 +53,18 @@ public class Question extends BaseEntity {
*/
private String questionUrl;
// /**
// * 回复内容
// */
// @ApiModelProperty(value = "答复内容")
// private String reply;
//
// /**
// * 回复时间
// */
// @ApiModelProperty(value = "答复时间")
// private Date replyTime;
/**
*
*/

View File

@ -14,12 +14,6 @@ import javax.validation.constraints.NotNull;
@Data
@ApiModel(value = "拉黑请求参数")
public class BlackListRes {
/**
* id
*/
@ApiModelProperty(value = "租户id", required = true)
@NotNull(message = "租户id不能为空")
private Long tenantId;
/**
* id

View File

@ -1,24 +0,0 @@
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;
}

View File

@ -1,33 +0,0 @@
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;
}

View File

@ -1,41 +0,0 @@
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;
}

View File

@ -10,10 +10,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
/**
*
*
*/
@Data
@ApiModel(value = "社区文件列表请求参数")
@ApiModel(value = "社区请求参数")
@EqualsAndHashCode(callSuper = true)
public class CommunityFilePageListRes extends PageDomain {

View File

@ -1,5 +1,6 @@
package com.mcwl.communityCenter.domain.dto;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -12,7 +13,7 @@ import javax.validation.constraints.NotNull;
*/
@Data
@ApiModel(value = "社区请求参数")
public class AddCommunityRes {
public class CommunityRes {
/**
@ -56,12 +57,6 @@ public class AddCommunityRes {
@NotNull(message = "有效期天数")
private Integer validityDay;
/**
*
*/
@ApiModelProperty(value = "描述")
private String description;
}

View File

@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
@ -30,32 +29,11 @@ public class CommunityUploadFileRes {
private Long communityId;
/**
* url
*
*/
@ApiModelProperty(value = "文件url", required = true)
@NotBlank(message = "文件url不能为空")
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;
@ApiModelProperty(value = "文件", required = true)
@NotNull(message = "文件不能为空")
private MultipartFile file;

View File

@ -15,12 +15,6 @@ import javax.validation.constraints.NotNull;
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "社区用户列表分页请求参数")
public class CommunityUserListPageRes extends PageDomain {
/**
* id
*/
@ApiModelProperty(value = "租户id", required = true)
@NotNull(message = "租户id不能为空")
private Long tenantId;
/**
* id

View File

@ -1,35 +0,0 @@
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;
}

View File

@ -1,74 +0,0 @@
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;
}

View File

@ -1,32 +0,0 @@
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;
}

View File

@ -1,27 +0,0 @@
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;
}

View File

@ -14,12 +14,6 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "社区列表分页请求参数")
public class JoinCommunityListPageRes extends PageDomain {
/**
* 0 1
*/
@ApiModelProperty(value = "是否包含我创建的社区 0否 1是 默认0")
private Integer isMyCreate = 0;
/**
*
*/

View File

@ -1,40 +0,0 @@
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;
}

View File

@ -1,28 +0,0 @@
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;
}

View File

@ -1,41 +0,0 @@
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;
}

View File

@ -1,40 +0,0 @@
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;
}

View File

@ -1,44 +0,0 @@
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;
}

View File

@ -2,29 +2,25 @@ 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 PublishDetailRes {
@ApiModelProperty(value = "发布id", required = true)
@ApiParam(value = "发布id", required = true)
@NotNull(message = "发布id不能为空")
private Long publishId;
private Long id;
@ApiModelProperty(value = "租户id", required = true)
@ApiParam(value = "租户id", required = true)
@NotNull(message = "租户id不能为空")
private Long tenantId;
@ApiModelProperty(value = "社区id", required = true)
@ApiParam(value = "社区id", required = true)
@NotNull(message = "社区id不能为空")
private Long communityId;

View File

@ -1,40 +0,0 @@
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;
}

View File

@ -15,14 +15,15 @@ import javax.validation.constraints.NotNull;
public class PublishPageRes extends PageDomain {
@NotNull(message = "社区id不能为空")
@ApiModelProperty(value = "社区id", required = true)
@ApiParam(value = "社区id", required = true)
private Long communityId;
@NotNull(message = "租户id不能为空")
@ApiModelProperty(value = "租户id", required = true)
@ApiParam(value = "租户id", required = true)
private Long tenantId;
@ApiModelProperty(value = "类型 0只看星主 1精选", required = true)
@NotNull(message = "类型不能为空")
@ApiParam(value = "类型 0只看星主 1精选 2问答", required = true)
private Integer type;
}

View File

@ -39,17 +39,11 @@ public class PublishRes {
private String imageUrl;
/**
* url
*
*/
@ApiModelProperty(value = "文件url")
@ApiModelProperty(value = "发布文件")
private String fileUrl;
/**
*
*/
@ApiModelProperty(value = "文件名")
private String fileName;
/**
* -
*/

View File

@ -29,13 +29,6 @@ public class QuestionRes {
@ApiModelProperty(value = "社区ID", required = true, position = 1)
private Long communityId;
/**
*
*/
@NotNull(message = "提问用户id不能为空")
@ApiModelProperty(value = "提问用户id", required = true, position = 2)
private Long questionUserId;
/**
*
*/

View File

@ -1,29 +0,0 @@
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;
}

View File

@ -1,36 +0,0 @@
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;
}

View File

@ -27,18 +27,6 @@ public class CommentVo {
@ApiModelProperty(value = "评论id")
private Long id;
/**
* id
*/
@ApiModelProperty(value = "租户id")
private Long tenantId;
/**
* id
*/
@ApiModelProperty(value = "社区id")
private Long communityId;
/**
* id
*/
@ -57,12 +45,6 @@ public class CommentVo {
@ApiModelProperty(value = "用户头像")
private String userAvatar;
/**
* id
*/
@ApiModelProperty(value = "父评论id")
private Long parentId;
/**
*
*/

View File

@ -1,74 +0,0 @@
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;
}

View File

@ -5,65 +5,13 @@ 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 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;
}

View File

@ -34,6 +34,12 @@ public class CommunityFileVo {
@ApiModelProperty(value = "社区id")
private Long communityId;
/**
*
*/
@ApiModelProperty(value = "文件路径")
private String fileUrl;
/**
*
*/

View File

@ -39,12 +39,6 @@ public class CommunityUserVo {
@ApiModelProperty(value = "用户id")
private Long userId;
/**
* 0 1 2
*/
@ApiModelProperty(value = "用户类型 0成员 1管理员 2群主")
private Integer userType;
/**
*
*/
@ -57,12 +51,6 @@ public class CommunityUserVo {
@ApiModelProperty(value = "用户昵称")
private String nickName;
/**
*
*/
@ApiModelProperty(value = "是否拉黑")
private String isBlack;
/**
*
@ -77,6 +65,13 @@ public class CommunityUserVo {
@ApiModelProperty(value = "首次加入时间")
private Date startTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@ApiModelProperty(value = "最后活动时间")
private Date loginDate;
/**
*
*/

View File

@ -21,18 +21,6 @@ public class CommunityVo {
@ApiModelProperty(value = "社区id")
private Long id;
/**
* id
*/
@ApiModelProperty(value = "租户id")
private Long tenantId;
/**
*
*/
@ApiModelProperty(value = "用户类型")
private Integer userType;
/**
*
*/

View File

@ -1,28 +0,0 @@
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;
}

View File

@ -1,58 +0,0 @@
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;
}

View File

@ -1,38 +0,0 @@
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;
}

View File

@ -1,92 +0,0 @@
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;
}

View File

@ -1,6 +1,5 @@
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;
@ -64,22 +63,16 @@ public class PublishVo {
private String imageUrl;
/**
* url
*
*/
@ApiModelProperty(value = "文件url")
@ApiModelProperty(value = "发布文件")
private String fileUrl;
/**
*
* -
*/
@ApiModelProperty(value = "文件名")
private String fileName;
/**
*
*/
@ApiModelProperty(value = "是否点赞")
private Integer isLike;
@ApiModelProperty(value = "发布时间 - 定时发布")
private Date publishTime;
/**
*
@ -99,16 +92,6 @@ public class PublishVo {
@ApiModelProperty(value = "精选")
private Integer isElite;
/**
*
*/
@ApiModelProperty(value = "收藏")
private Integer isCollect;
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
}

View File

@ -21,36 +21,20 @@ public class CustomTenantHandler implements TenantLineHandler {
* .
*/
static {
// 通知表
tables.add("cc_advice");
// 发布评论表
tables.add("cc_comment");
// 评论点赞表
tables.add("cc_comment_like");
// 社区表
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_publish");
// 收藏表
tables.add("cc_publish_collect");
// 发布点赞表
tables.add("cc_publish_like");
// 提问表
tables.add("cc_question");
// 提问评论表
tables.add("cc_question_comment");
// 社区用户表
tables.add("cc_community_user");
// 输出表名
log.info("多租户表:{}", tables);

View File

@ -1,20 +1,10 @@
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.Community;
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.Param;
import java.util.List;
@Mapper
public interface CommunityAdviceMapper extends BaseMapper<CommunityAdvice> {
List<CommunityAdviceVo> getCommunityAdviceList(Page<CommunityAdvice> page,
@Param("communityAdvicePageRes") CommunityAdvicePageRes communityAdvicePageRes);
}

View File

@ -21,10 +21,5 @@ public interface CommunityFileLogMapper extends BaseMapper<CommunityFileLog> {
Long communityFileId);
@InterceptorIgnore(tenantLine = "true")
Integer getDownloadCount(@Param("tenantId") Long tenantId,
@Param("communityId") Long communityId,
@Param("communityFileId") Long communityFileId);
@InterceptorIgnore(tenantLine = "true")
void saveCommunityFileLog(@Param("communityFileLog") CommunityFileLog communityFileLog);
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
}

View File

@ -20,9 +20,4 @@ public interface CommunityFileMapper extends BaseMapper<CommunityFile> {
@InterceptorIgnore(tenantLine = "true")
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);
}

View File

@ -4,8 +4,6 @@ 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.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.Mapper;
import org.apache.ibatis.annotations.Param;
@ -55,14 +53,12 @@ public interface CommunityMapper extends BaseMapper<Community> {
Page<Community> page,
@Param("userId")
Long userId,
@Param("joinCommunityListPageRes")
JoinCommunityListPageRes joinCommunityListPageRes);
@Param("searchContent")
String searchContent);
@InterceptorIgnore(tenantLine = "true")
void quitCommunity(@Param("tenantId") Long tenantId,
@Param("communityId") Long communityId,
@Param("userId") Long userId);
void quitCommunity(Long tenantId, Long communityId, Long userId);
@InterceptorIgnore(tenantLine = "true")
void deleteCommunity(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
void deleteCommunity(Long tenantId, Long communityId);
}

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcwl.communityCenter.domain.Community;
import com.mcwl.communityCenter.domain.CommunityUser;
import com.mcwl.communityCenter.domain.dto.CommunityUserListPageRes;
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
import com.mcwl.communityCenter.domain.vo.CommunityUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -24,7 +23,7 @@ public interface CommunityUserMapper extends BaseMapper<CommunityUser> {
@Param("userId") Long userId);
@InterceptorIgnore(tenantLine = "true")
Integer getJoinNum(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
Integer getJoinNum(Long tenantId, Long communityId);
@InterceptorIgnore(tenantLine = "true")
int isJoinCommunity(@Param("tenantId")
@ -38,17 +37,4 @@ public interface CommunityUserMapper extends BaseMapper<CommunityUser> {
List<CommunityUserVo> getCommunityUserList(Page<CommunityUser> page,
@Param("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);
}

View File

@ -1,34 +0,0 @@
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);
}

View File

@ -38,7 +38,5 @@ public interface InviteMapper extends BaseMapper<Invite> {
* @return
*/
@InterceptorIgnore(tenantLine = "true")
Invite selectByTenantIdAndCommunityIdAndInviteeUserId(@Param("tenantId") Long tenantId,
@Param("communityId") Long communityId,
@Param("inviteeUserId") Long inviteeUserId);
Invite selectByTenantIdAndCommunityIdAndInviteeUserId(Long tenantId, Long communityId, Long inviteeUserId);
}

View File

@ -1,35 +0,0 @@
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);
}

View File

@ -1,13 +1,8 @@
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.dto.PublishCommentLikeRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import javax.validation.constraints.NotNull;
/**
* @AuthorChenYan
@ -19,16 +14,4 @@ import javax.validation.constraints.NotNull;
*/
@Mapper
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);
}

View File

@ -1,24 +0,0 @@
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);
}

View File

@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.dto.MyPublishPageRes;
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 org.springframework.security.core.parameters.P;
@ -46,13 +44,5 @@ public interface PublishMapper extends BaseMapper<Publish> {
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
@InterceptorIgnore(tenantLine = "true")
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);
List<Publish> publishList(Page<Publish> page,@Param("publishPageRes") PublishPageRes publishPageRes);
}

View File

@ -5,12 +5,10 @@ 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.Question;
import com.mcwl.communityCenter.domain.dto.QuestionPageRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import javax.validation.constraints.NotNull;
import java.util.List;
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {
@ -39,9 +37,4 @@ public interface QuestionMapper extends BaseMapper<Question> {
@NotNull(message = "社区不能为空")
@Param("communityId")
Long communityId);
@InterceptorIgnore(tenantLine = "true")
List<Question> myQuestionList(Page<Question> page,
@Param("questionPageRes") QuestionPageRes questionPageRes,
@Param("userId") Long userId);
}

View File

@ -1,13 +1,8 @@
package com.mcwl.communityCenter.service;
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.CommunityAdvice;
import com.mcwl.communityCenter.domain.dto.CommunityAdvicePageRes;
import javax.validation.Valid;
public interface CommunityAdviceService extends IService<CommunityAdvice> {
TableDataInfo getCommunityAdviceList(@Valid CommunityAdvicePageRes communityAdvicePageRes);
}

View File

@ -11,6 +11,4 @@ public interface CommunityFileLogService extends IService<CommunityFileLog> {
List<String> getUserAvatarList(Long tenantId, Long communityId, Long communityFileId);
Integer getDownloadCount(Long tenantId, Long communityId, Long communityFileId);
void saveCommunityFileLog(CommunityFileLog communityFileLog);
}

View File

@ -1,20 +1,14 @@
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.PageDomain;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.communityCenter.domain.CommunityFile;
import com.mcwl.communityCenter.domain.dto.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
public interface CommunityFileService extends IService<CommunityFile> {
R<String> upload(CommunityUploadFileRes communityUploadFileRes);
void upload(CommunityUploadFileRes communityUploadFileRes);
TableDataInfo getCommunityFileList(CommunityFilePageListRes communityFilePageListRes);
R<String> download(@Valid CommunityDownloadFileRes communityDownloadFileRes);
}

View File

@ -2,21 +2,25 @@ 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.PageDomain;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.communityCenter.domain.Community;
import com.mcwl.communityCenter.domain.dto.*;
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
import com.mcwl.communityCenter.domain.dto.CommunityRes;
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
import com.mcwl.communityCenter.domain.dto.JoinCommunityRes;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
public interface CommunityService extends IService<Community> {
TableDataInfo listByPage(CommunityListPageRes communityListPageRes);
/**
*
* @param addCommunityRes
* @param communityRes
*/
void addCommunity(AddCommunityRes addCommunityRes);
void addCommunity(CommunityRes communityRes);
/**
*
@ -40,8 +44,4 @@ public interface CommunityService extends IService<Community> {
*
*/
R<Object> isJoinCommunity(JoinCommunityRes joinCommunityRes);
CommunityDetailVo getCommunityDetail(Long communityId);
void editCommunity(@Valid EditCommunityRes editCommunityRes);
}

View File

@ -3,14 +3,14 @@ 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.Community;
import com.mcwl.communityCenter.domain.CommunityUser;
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.CommunityUserManageRes;
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
import javax.validation.Valid;
import java.util.List;
public interface CommunityUserService extends IService<CommunityUser> {
@ -23,12 +23,4 @@ public interface CommunityUserService extends IService<CommunityUser> {
*
*/
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);
}

View File

@ -1,20 +0,0 @@
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);
}

View File

@ -1,24 +0,0 @@
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);
}

View File

@ -2,12 +2,8 @@ package com.mcwl.communityCenter.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mcwl.communityCenter.domain.PublishCommentLike;
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
import org.springframework.stereotype.Service;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
/**
* @AuthorChenYan
* @Projectmcwl-ai
@ -19,5 +15,4 @@ import javax.validation.constraints.NotNull;
@Service
public interface PublishCommentLikeService extends IService<PublishCommentLike> {
void like(PublishCommentLikeRes publishCommentLikeRes);
}

View File

@ -28,7 +28,7 @@ public interface PublishCommentService extends IService<PublishComment> {
* @param commentDetailRes
* @return
*/
R<List<CommentVo>> getComment(CommentDetailRes commentDetailRes);
R<Object> getComment(CommentDetailRes commentDetailRes);
R<Object> addComment(CommentRes commentRes);

View File

@ -1,25 +0,0 @@
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;
/**
* @AuthorChenYan
* @Projectmcwl-ai
* @Packagecom.mcwl.communityCenter.service
* @FilenamePublishCommissionLikeService
* @Description TODO
* @Date2025/1/17 14:23
*/
@Service
public interface PublishLikeService extends IService<PublishLike> {
void like(@Valid PublishLikeRes publishLikeRes);
}

View File

@ -7,7 +7,9 @@ import com.mcwl.common.core.page.PageDomain;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.communityCenter.domain.Community;
import com.mcwl.communityCenter.domain.Publish;
import com.mcwl.communityCenter.domain.dto.*;
import com.mcwl.communityCenter.domain.dto.PublishDetailRes;
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
import com.mcwl.communityCenter.domain.dto.PublishRes;
import com.mcwl.communityCenter.domain.vo.PublishVo;
import javax.validation.Valid;
@ -33,10 +35,4 @@ public interface PublishService extends IService<Publish> {
void elitePublish(Long communityId, Long publishId);
TableDataInfo publishList(PublishPageRes publishPageRes);
TableDataInfo myPublishList(MyPublishPageRes myPublishPageRes);
void collectPublish(@Valid PublishCollectRes publishCollectRes);
TableDataInfo getPersonHomeList(@Valid PersonHomePageRes personHomePageRes);
}

View File

@ -34,6 +34,4 @@ public interface QuestionService extends IService<Question> {
// AjaxResult reply(QuestionReplyRes questionReplyRes);
TableDataInfo listImage(@Valid QuestionPageRes questionPageRes);
TableDataInfo myQuestionList(@Valid QuestionPageRes questionPageRes);
}

View File

@ -1,38 +1,17 @@
package com.mcwl.communityCenter.service.impl;
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.page.TableDataInfo;
import com.mcwl.communityCenter.domain.Community;
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.CommunityMapper;
import com.mcwl.communityCenter.service.CommunityAdviceService;
import com.mcwl.communityCenter.service.CommunityService;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CommunityAdviceServiceImpl extends ServiceImpl<CommunityAdviceMapper, CommunityAdvice>
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;
}
}

View File

@ -28,9 +28,4 @@ public class CommunityFileLogServiceImpl extends ServiceImpl<CommunityFileLogMap
return baseMapper.getDownloadCount(tenantId, communityId, communityFileId);
}
@Override
public void saveCommunityFileLog(CommunityFileLog communityFileLog) {
baseMapper.saveCommunityFileLog(communityFileLog);
}
}

View File

@ -1,29 +1,21 @@
package com.mcwl.communityCenter.service.impl;
import cn.hutool.Hutool;
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.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.page.PageDomain;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.common.utils.SecurityUtils;
import com.mcwl.common.utils.obs.ObsUtils;
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.vo.CommunityFileVo;
import com.mcwl.communityCenter.domain.vo.DownloadFileUserVo;
import com.mcwl.communityCenter.mapper.CommunityFileMapper;
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
import com.mcwl.communityCenter.service.CommunityFileLogService;
import com.mcwl.communityCenter.service.CommunityFileService;
import com.mcwl.communityCenter.service.CommunityUserService;
import com.mcwl.system.service.ISysUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@ -41,35 +33,26 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
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
public R<String> upload(CommunityUploadFileRes communityUploadFileRes) {
public void upload(CommunityUploadFileRes communityUploadFileRes) {
Long tenantId = communityUploadFileRes.getTenantId();
Long communityId = communityUploadFileRes.getCommunityId();
Long currentUserId = SecurityUtils.getUserId();
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, currentUserId);
if (Objects.isNull(communityUser)) {
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
}
CommunityFile communityFile = BeanUtil.toBean(communityUploadFileRes, CommunityFile.class);
communityFile.setUserId(currentUserId);
MultipartFile file = communityUploadFileRes.getFile();
Map<String, String> map = obsUtils.uploadFile(file);
String filename = file.getOriginalFilename();
long fileSize = file.getSize();
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);
return R.ok();
}
@Override
@ -79,14 +62,17 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
for (CommunityFileVo communityFileVo : communityFileList) {
DownloadFileUserVo downloadFileUserVo = new DownloadFileUserVo();
Long tenantId = communityFileVo.getTenantId();
Long communityId = communityFileVo.getCommunityId();
Long fileId = communityFileVo.getId();
List<String> avatarList = communityFileLogService.getUserAvatarList(tenantId, communityId, fileId);
Integer count = communityFileLogService.getDownloadCount(tenantId, communityId, fileId);
List<String> avatarList = communityFileLogService.getUserAvatarList(communityFileVo.getTenantId(),
communityFileVo.getCommunityId(),
communityFileVo.getId());
Integer count = communityFileLogService.getDownloadCount(communityFileVo.getTenantId(),
communityFileVo.getCommunityId(),
communityFileVo.getId());
downloadFileUserVo.setAvatarList(avatarList);
downloadFileUserVo.setCount(count);
communityFileVo.setDownloadFileUser(downloadFileUserVo);
}
// 封装返回
@ -97,35 +83,4 @@ public class CommunityFileServiceImpl extends ServiceImpl<CommunityFileMapper, C
tableDataInfo.setMsg("查询成功");
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());
}
}

View File

@ -8,19 +8,19 @@ 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.core.redis.RedisCache;
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.Community;
import com.mcwl.communityCenter.domain.CommunityAdvice;
import com.mcwl.communityCenter.domain.CommunityUser;
import com.mcwl.communityCenter.domain.dto.*;
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
import com.mcwl.communityCenter.domain.dto.CommunityListPageRes;
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.domain.vo.CommunityVo;
import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
import com.mcwl.communityCenter.mapper.CommunityMapper;
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
import com.mcwl.communityCenter.service.CommunityService;
@ -46,9 +46,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
private final RedisCache redisCache;
private final CommunityAdviceMapper communityAdviceMapper;
@Override
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
@ -71,11 +68,11 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
@Override
@Transactional(rollbackFor = Exception.class)
public void addCommunity(AddCommunityRes addCommunityRes) {
public void addCommunity(CommunityRes communityRes) {
try {
Community community = new Community();
BeanUtil.copyProperties(addCommunityRes, community);
if (Objects.equals(addCommunityRes.getType(), 0)) {
BeanUtil.copyProperties(communityRes, community);
if (Objects.equals(communityRes.getType(), 0)) {
community.setPrice(0.0);
}
baseMapper.insert(community);
@ -85,7 +82,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
.tenantId(SecurityUtils.getUserId())
.communityId(community.getId())
.userId(SecurityUtils.getUserId())
.userType(2)
.userType(1)
.build());
} catch (Exception e) {
@ -132,7 +129,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
Calendar now = Calendar.getInstance();
Date startTime = now.getTime();
now.add(Calendar.YEAR, community.getValidityDay());
now.add(Calendar.DAY_OF_YEAR, community.getValidityDay());
Date endTime = now.getTime();
CommunityUser cu = CommunityUser.builder()
@ -147,19 +144,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
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("加入成功");
}
@ -167,9 +151,11 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
@Override
public TableDataInfo getMyJoinCommunity(JoinCommunityListPageRes joinCommunityListPageRes) {
Page<Community> page = new Page<>(joinCommunityListPageRes.getPageNum(), joinCommunityListPageRes.getPageSize());
page.addOrder(new OrderItem("create_time", false));
OrderItem orderItem = new OrderItem("create_time", false);
page.addOrder(orderItem);
List<Community> communityList = baseMapper.getMyJoinCommunity(page, SecurityUtils.getUserId(), joinCommunityListPageRes);
String searchContent = joinCommunityListPageRes.getSearchContent();
List<Community> communityList = baseMapper.getMyJoinCommunity(page, SecurityUtils.getUserId(), searchContent);
return this.getCommunityVoTableDataInfo(communityList, page.getTotal());
@ -183,27 +169,9 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
@Override
@Transactional(rollbackFor = Exception.class)
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);
if (communityUser.getUserType() == 2 && communityJoinNum > 1) {
return R.fail(HttpStatus.SHOW_ERROR_MSG,"社区还有成员,无法退出");
}
baseMapper.quitCommunity(tenantId, communityId, userId);
baseMapper.quitCommunity(tenantId, communityId, SecurityUtils.getUserId());
if (communityJoinNum == 1) {
baseMapper.deleteCommunity(tenantId, communityId);
@ -218,18 +186,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
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) {
@ -268,7 +224,8 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
LocalDate currentLocalDate = LocalDate.now(ZoneId.systemDefault());
for (Community community : communityList) {
CommunityVo communityVo = BeanUtil.toBean(community, CommunityVo.class);
CommunityVo communityVo = new CommunityVo();
BeanUtil.copyProperties(community, communityVo);
// 当前时间和创建时间差
Date createTime = community.getCreateTime();
LocalDate createLocalDate = createTime.toInstant()
@ -276,10 +233,6 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
.toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(createLocalDate, currentLocalDate);
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.setAvatar(sysUser.getAvatar());
communityVo.setNickName(sysUser.getNickName());

View File

@ -1,24 +1,35 @@
package com.mcwl.communityCenter.service.impl;
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.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.TableDataInfo;
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.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.CommunityUserManageRes;
import com.mcwl.communityCenter.domain.dto.UnBlackListRes;
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.service.CommunityService;
import com.mcwl.communityCenter.service.CommunityUserService;
import lombok.RequiredArgsConstructor;
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.*;
@Service
@ -32,7 +43,7 @@ public class CommunityUserServiceImpl extends ServiceImpl<CommunityUserMapper, C
@Override
public TableDataInfo getCommunityUserList(CommunityUserListPageRes communityUserListPageRes) {
Page<CommunityUser> page = new Page<>(communityUserListPageRes.getPageNum(), communityUserListPageRes.getPageSize());
// page.addOrder(new OrderItem("cu.create_time", false));
page.addOrder(new OrderItem("create_time", false));
List<CommunityUserVo> communityUserList = baseMapper.getCommunityUserList(page, communityUserListPageRes);
@ -46,128 +57,26 @@ public class CommunityUserServiceImpl extends ServiceImpl<CommunityUserMapper, C
@Override
public R<Object> black(BlackListRes blackListRes) {
Long tenantId = blackListRes.getTenantId();
Long communityId = blackListRes.getCommunityId();
Long userId = blackListRes.getUserId();
Integer blackDay = blackListRes.getBlackDay();
String blackReason = blackListRes.getBlackReason();
// 拉黑用户
CommunityUser blackCommunityUser = baseMapper.selectCommunityUser(
tenantId, communityId, userId
);
// 当前用户
CommunityUser currentCommunityUser = baseMapper.selectCommunityUser(
tenantId, communityId, SecurityUtils.getUserId()
);
if (currentCommunityUser.getUserType() == 0) {
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主/管理员,无法拉黑");
}
if (Objects.isNull(blackCommunityUser)) {
CommunityUser communityUser = baseMapper.selectOne(new LambdaQueryWrapper<CommunityUser>()
.eq(CommunityUser::getCommunityId, communityId)
.eq(CommunityUser::getUserId, userId));
if (Objects.isNull(communityUser)) {
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.add(Calendar.DATE, blackDay);
blackCommunityUser.setIsBlack("1");
blackCommunityUser.setBlackEndTime(calendar.getTime());
blackCommunityUser.setBlackReason(blackReason);
baseMapper.updateBlackCommunityUser(blackCommunityUser);
communityUser.setIsBlank("1");
communityUser.setBlankEndTime(calendar.getTime());
communityUser.setBlackReason(blackReason);
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("设置成功");
}
}

View File

@ -1,82 +0,0 @@
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());
}
}

View File

@ -120,7 +120,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteMapper, Invite> impleme
Calendar now = Calendar.getInstance();
Date startTime = now.getTime();
now.add(Calendar.YEAR, community.getValidityDay());
now.add(Calendar.DAY_OF_YEAR, community.getValidityDay());
Date endTime = now.getTime();
communityUserMapper.insert(CommunityUser
@ -128,7 +128,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteMapper, Invite> impleme
.tenantId(userId)
.communityId(communityId)
.userId(SecurityUtils.getUserId())
.userType(1)
.userType(0)
.inviteId(invite.getId())
.startTime(startTime)
.endTime(endTime)

View File

@ -1,91 +0,0 @@
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());
}
}

View File

@ -1,27 +1,12 @@
package com.mcwl.communityCenter.service.impl;
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.dto.PublishCommentLikeRes;
import com.mcwl.communityCenter.mapper.PublishCommentLikeMapper;
import com.mcwl.communityCenter.mapper.PublishCommentMapper;
import com.mcwl.communityCenter.service.PublishCommentLikeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Objects;
/**
*
*
/**
* @AuthorChenYan
* @Projectmcwl-ai
* @Packagecom.mcwl.communityCenter.service.impl
@ -30,18 +15,5 @@ import java.util.Objects;
* @Date2025/1/17 14:25
*/
@Service
@RequiredArgsConstructor
public class PublishCommentLikeServiceImpl extends ServiceImpl<PublishCommentLikeMapper, PublishCommentLike> implements PublishCommentLikeService {
private final PublishCommentMapper publishCommentMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public void like(PublishCommentLikeRes publishCommentLikeRes) {
}
public class PublishCommentLikeServiceImpl extends ServiceImpl<PublishCommentLikeMapper, PublishCommentLike>implements PublishCommentLikeService {
}

Some files were not shown because too many files have changed in this diff Show More