Compare commits
61 Commits
master
...
feature/ad
Author | SHA1 | Date |
---|---|---|
|
0673ebba1f | |
|
96c68ed485 | |
|
7ded966355 | |
|
0eca5db854 | |
|
452ec60d17 | |
|
376f462db0 | |
|
7b7154f532 | |
|
50e667f95b | |
|
6723b3654a | |
|
43a94d4664 | |
|
849000ca3f | |
|
f4c0374375 | |
|
9311866a61 | |
|
4d57150d2b | |
|
e6562cf49c | |
|
6395fc7260 | |
|
7cc8cf3c03 | |
|
1b11e5fbe6 | |
|
43a6bc98b8 | |
|
f8a0749cb0 | |
|
5f354654ab | |
|
1a63064cf9 | |
|
de719be03d | |
|
4422835035 | |
|
b3a4d1b2f2 | |
|
1f37a1f899 | |
|
2dd6233339 | |
|
09222c3e22 | |
|
ce879336fa | |
|
ed6a00a312 | |
|
b3340340bd | |
|
d460b542ce | |
|
ef376535ea | |
|
ab059c7dde | |
|
162779bf92 | |
|
3d680d5a68 | |
|
74641eb59b | |
|
1f50a33c78 | |
|
f432697d94 | |
|
80fcfd12ea | |
|
89b2c58938 | |
|
5f1dd1f99f | |
|
2a906fd248 | |
|
da620e00e3 | |
|
29a2200c77 | |
|
0eb2a1ec23 | |
|
10e2bd322e | |
|
fd2d1d62ef | |
|
fadfd8058f | |
|
c951baedd5 | |
|
dfa4f4d245 | |
|
e2dd7d81bd | |
|
87f259cd6f | |
|
d09f89c827 | |
|
a0f21fc32c | |
|
01b4f6c535 | |
|
31b5a89329 | |
|
27593d84d0 | |
|
64979345f5 | |
|
5639d54a5f | |
|
516aebfba0 |
|
@ -107,12 +107,6 @@
|
|||
<artifactId>mcwl-pay</artifactId>
|
||||
<version>3.8.8</version>
|
||||
</dependency>
|
||||
<!-- 资源中心模块-->
|
||||
<dependency>
|
||||
<groupId>com.mcwl</groupId>
|
||||
<artifactId>mcwl-resource</artifactId>
|
||||
<version>3.8.8</version>
|
||||
</dependency>
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.mcwl</groupId>
|
||||
|
|
|
@ -42,11 +42,15 @@ public class CommunityController {
|
|||
@ApiOperation(value = "社区详情")
|
||||
@GetMapping("detail")
|
||||
public R<CommunityDetailVo> getCommunityDetail(@Valid
|
||||
@ApiParam(value = "社区id", required = true)
|
||||
@NotNull(message = "社区id不能为空")
|
||||
Long tenantId,
|
||||
@Valid
|
||||
@ApiParam(value = "社区id", required = true)
|
||||
@NotNull(message = "社区id不能为空")
|
||||
Long communityId) {
|
||||
|
||||
CommunityDetailVo communityDetailVo = communityService.getCommunityDetail(communityId);
|
||||
CommunityDetailVo communityDetailVo = communityService.getCommunityDetail(tenantId, communityId);
|
||||
return R.ok(communityDetailVo);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.validation.Valid;
|
|||
/**
|
||||
* 个人主页
|
||||
*/
|
||||
@Api(tags = "个人主页")
|
||||
@Api(tags = "社区个人主页")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("personHome")
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package com.mcwl.web.controller.communityCenter;
|
||||
|
||||
import com.mcwl.common.core.controller.BaseController;
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
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.dto.PublishCommentLikeRes;
|
||||
import com.mcwl.communityCenter.domain.vo.CommentVo;
|
||||
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
||||
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
@ -30,6 +31,17 @@ import java.util.List;
|
|||
public class PublishCommentController extends BaseController {
|
||||
|
||||
private final PublishCommentService publishCommentService;
|
||||
private final PublishCommentLikeService publishCommentLikeService;
|
||||
|
||||
/**
|
||||
* 获取评论
|
||||
*/
|
||||
@ApiOperation(value = "获取评论")
|
||||
@PostMapping("/list")
|
||||
public R<List<CommentVo>> list(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
||||
|
||||
return publishCommentService.getComment(commentDetailRes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -46,33 +58,31 @@ public class PublishCommentController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取评论详情
|
||||
*
|
||||
* @param commentDetailRes 评论详情请求参数
|
||||
* @return 评论详情
|
||||
*/
|
||||
@ApiOperation(value = "获取评论详情")
|
||||
@PostMapping("/detail")
|
||||
public R<List<CommentVo>> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
||||
|
||||
return publishCommentService.getComment(commentDetailRes);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 点赞或取消点赞评论
|
||||
// * @param commentDetailRes 评论请求参数
|
||||
// * @return 更新后的点赞数
|
||||
// * 获取评论详情
|
||||
// *
|
||||
// * @param commentDetailRes 评论详情请求参数
|
||||
// * @return 评论详情
|
||||
// */
|
||||
// @ApiOperation(value = "点赞或取消点赞评论")
|
||||
// @PostMapping("/like")
|
||||
// public AjaxResult like(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
||||
// @ApiOperation(value = "获取评论详情")
|
||||
// @PostMapping("/detail")
|
||||
// public R<List<CommentVo>> getComment(@RequestBody @Valid CommentDetailRes commentDetailRes) {
|
||||
//
|
||||
// return publishCommentService.like(commentDetailRes);
|
||||
// return publishCommentService.getComment(commentDetailRes);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 点赞或取消点赞评论
|
||||
*/
|
||||
@ApiOperation(value = "点赞或取消点赞评论")
|
||||
@PostMapping("/like")
|
||||
public R<Integer> like(@RequestBody @Valid PublishCommentLikeRes publishCommentLikeRes) {
|
||||
|
||||
return publishCommentLikeService.like(publishCommentLikeRes);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "删除评论")
|
||||
@PostMapping("/delete")
|
||||
public R<Object> delete(@RequestBody @Valid CommentDelRes commentDelRes) {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package com.mcwl.web.controller.communityCenter;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.Publish;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
import com.mcwl.communityCenter.service.PublishService;
|
||||
|
@ -83,10 +85,10 @@ public class PublishController {
|
|||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除")
|
||||
@GetMapping("remove")
|
||||
public R<Object> deletePublish(@NotNull(message = "id不能为空") @ApiParam(value = "id") @Valid Long id) {
|
||||
publishService.removeById(id);
|
||||
return R.ok();
|
||||
@PostMapping("remove")
|
||||
public R<Object> deletePublish(@RequestBody @Valid PublishRemoveRes publishRemoveRes) {
|
||||
|
||||
return publishService.removePublish(publishRemoveRes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,14 +96,17 @@ public class PublishController {
|
|||
*/
|
||||
@ApiOperation(value = "精选/取消精选")
|
||||
@GetMapping("elite")
|
||||
public R<Object> elitePublish(@NotNull(message = "社区id不能为空")
|
||||
public R<Object> elitePublish(@NotNull(message = "租户id不能为空")
|
||||
@ApiParam(value = "租户id")
|
||||
@Valid Long tenantId,
|
||||
@NotNull(message = "社区id不能为空")
|
||||
@ApiParam(value = "社区id")
|
||||
@Valid Long communityId,
|
||||
@NotNull(message = "发布文章id不能为空")
|
||||
@ApiParam(value = "发布文章id")
|
||||
@Valid Long publishId) {
|
||||
publishService.elitePublish(communityId, publishId);
|
||||
return R.ok();
|
||||
|
||||
return publishService.elitePublish(tenantId, communityId, publishId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,4 +119,15 @@ public class PublishController {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 举报
|
||||
*/
|
||||
@ApiOperation(value = "举报")
|
||||
@PostMapping("report")
|
||||
public R<Object> reportPublish(@RequestBody @Valid PublishReportRes publishReportRes) {
|
||||
publishService.reportPublish(publishReportRes);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.mcwl.web.controller.communityCenter;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.mcwl.common.constant.HttpStatus;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
import com.mcwl.communityCenter.domain.PublishLabel;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
import com.mcwl.communityCenter.service.CommunityUserService;
|
||||
import com.mcwl.communityCenter.service.PublishLabelService;
|
||||
import com.mcwl.communityCenter.service.PublishService;
|
||||
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;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发布标签
|
||||
*/
|
||||
@Api(tags = "发布标签")
|
||||
@RestController
|
||||
@RequestMapping("publishLabel")
|
||||
@RequiredArgsConstructor
|
||||
public class PublishLabelController {
|
||||
|
||||
private final PublishLabelService publishLabelService;
|
||||
|
||||
/**
|
||||
* 获取发布标签列表
|
||||
*/
|
||||
@ApiOperation("获取发布标签列表")
|
||||
@PostMapping("list")
|
||||
public R<List<String>> listPublishLabel(@RequestBody @Valid PublishLabelListRes publishLabelListRes) {
|
||||
|
||||
return R.ok(publishLabelService.listPublishLabel(publishLabelListRes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发布标签
|
||||
*/
|
||||
@ApiOperation("新增发布标签")
|
||||
@PostMapping("add")
|
||||
public R<String> addPublishLabel(@RequestBody @Valid PublishLabelAddRes publishLabelAddRes) {
|
||||
|
||||
publishLabelService.addPublishLabel(publishLabelAddRes);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.mcwl.web.controller.communityCenter;
|
||||
|
||||
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.EditPublishReportStatusRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishReportRes;
|
||||
import com.mcwl.communityCenter.service.PublishReportService;
|
||||
import com.mcwl.communityCenter.service.PublishService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 发布举报
|
||||
*/
|
||||
@Api(tags = "发布举报")
|
||||
@RestController
|
||||
@RequestMapping("publishReport")
|
||||
@RequiredArgsConstructor
|
||||
public class PublishReportController {
|
||||
|
||||
private final PublishReportService publishReportService;
|
||||
|
||||
/**
|
||||
* 获取举报列表
|
||||
*/
|
||||
@ApiOperation(value = "获取举报列表")
|
||||
@PostMapping("list")
|
||||
public TableDataInfo getReportList(@RequestBody @Valid PageDomain pageDomain) {
|
||||
return publishReportService.getReportList(pageDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
@ApiOperation(value = "修改状态")
|
||||
@PostMapping("updateStatus")
|
||||
public R<Object> updateStatus(@RequestBody @Valid EditPublishReportStatusRes editPublishReportStatusRes) {
|
||||
publishReportService.updateStatus(editPublishReportStatusRes);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除举报
|
||||
*/
|
||||
@ApiOperation(value = "删除举报")
|
||||
@GetMapping("delete")
|
||||
public R<Object> delete(@Valid @NotNull(message = "举报id不能为空") Long id) {
|
||||
publishReportService.removeReportById(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -189,7 +189,7 @@ public class AliPayController extends BaseController {
|
|||
@ApiOperation(value = "提现")
|
||||
public R<String> fetch(@Valid
|
||||
@NotNull(message = "提现金额不能为空")
|
||||
@Pattern(regexp = "^(0|(?!0\\d)[1-9]\\d*)(\\.\\d{2})?$", message = "金额格式错误(必须保留两位小数)")
|
||||
@Pattern(regexp = "^(0|(?!0\\d)[1-9]\\d*)(\\.\\d{1,2})?$", message = "金额格式错误(必须保留两位小数)")
|
||||
String amount) throws Exception {
|
||||
|
||||
SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery()
|
||||
|
|
|
@ -145,9 +145,9 @@ public class PersonalCenterController {
|
|||
|
||||
|
||||
/**
|
||||
* 获取金币消费记录
|
||||
* 获取金币收入支出消费记录
|
||||
*/
|
||||
@ApiOperation(value = "获取金币消费记录")
|
||||
@ApiOperation(value = "获取金币收入支出消费记录")
|
||||
@PostMapping("/getWalletRecord")
|
||||
public TableDataInfo getWalletRecord(@Valid @RequestBody PageDomain pageDomain) {
|
||||
return consumeService.getWalletRecord(pageDomain);
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.rabbitmq.client.Channel;
|
|||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
@ -30,6 +31,9 @@ import java.util.concurrent.TimeUnit;
|
|||
@Component
|
||||
public class CodeConsumer {
|
||||
|
||||
@Value("${mcwl.templateCode}")
|
||||
private String templateCode;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
|
@ -54,7 +58,7 @@ public class CodeConsumer {
|
|||
// 构建 sendDataMap
|
||||
Map<String, String> sendDataMap = new HashMap<>();
|
||||
sendDataMap.put("code", phoneLoginBody.getCode());
|
||||
String s1 = TelSmsUtils.sendSms(phoneLoginBody.getPhone(), "SMS_478520014", sendDataMap);
|
||||
String s1 = TelSmsUtils.sendSms(phoneLoginBody.getPhone(), templateCode, sendDataMap);
|
||||
|
||||
|
||||
//手动确认
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.mcwl.web.controller.resource;
|
||||
|
||||
import com.mcwl.common.annotation.RepeatSubmit;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.resource.domain.DownloadRecord;
|
||||
import com.mcwl.resource.domain.request.RequestDownload;
|
||||
|
@ -36,6 +37,7 @@ public class DownloadRecordController {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增下载记录")
|
||||
@RepeatSubmit(interval = 1000)
|
||||
@PostMapping("/addDownloadRecord")
|
||||
public R addDownloadRecord(@RequestBody DownloadRecord downloadRecord){
|
||||
|
||||
|
@ -85,4 +87,11 @@ public class DownloadRecordController {
|
|||
return downloadRecordService.selectByFileName(requestDownload);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据文件名删除数据")
|
||||
@PostMapping("/deleteDownloadRecordByFileName")
|
||||
public R deleteDownloadRecordByFileName(@RequestBody DownloadRecord downloadRecord){
|
||||
|
||||
return downloadRecordService.deleteDownloadRecordByFileName(downloadRecord);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -166,15 +166,19 @@ public class MallProductController extends BaseController {
|
|||
R<ModelProduct> modelProductR = modelService.selectModelById(id);
|
||||
ModelProduct data = modelProductR.getData();
|
||||
if (Objects.nonNull(data)) {
|
||||
LambdaQueryWrapper<ModelPurchaseRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ModelPurchaseRecord::getUserId, SecurityUtils.getUserId())
|
||||
.eq(ModelPurchaseRecord::getProductId, id)
|
||||
.eq(ModelPurchaseRecord::getProductType, 0);
|
||||
ModelPurchaseRecord modelPurchaseRecord = modelPurchaseRecordMapper.selectOne(wrapper);
|
||||
data.setIsBuy(1);
|
||||
if (Objects.isNull(modelPurchaseRecord)) {
|
||||
data.setIsBuy(0);
|
||||
Long userIdMax = SecurityUtils.getUserIdMax();
|
||||
if (userIdMax != 0){
|
||||
LambdaQueryWrapper<ModelPurchaseRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ModelPurchaseRecord::getUserId, userIdMax)
|
||||
.eq(ModelPurchaseRecord::getProductId, id)
|
||||
.eq(ModelPurchaseRecord::getProductType, 0);
|
||||
ModelPurchaseRecord modelPurchaseRecord = modelPurchaseRecordMapper.selectOne(wrapper);
|
||||
data.setIsBuy(1);
|
||||
if (Objects.isNull(modelPurchaseRecord)) {
|
||||
data.setIsBuy(0);
|
||||
}
|
||||
}
|
||||
data.setIsBuy(0);
|
||||
modelProductR.setData(data);
|
||||
}
|
||||
return modelProductR;
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package com.mcwl.web.controller.resource;
|
||||
|
||||
import com.mcwl.common.constant.HttpStatus;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.resource.domain.PcVersion;
|
||||
import com.mcwl.resource.service.impl.PcVersionServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pc端版本
|
||||
*
|
||||
* @author DaiZibo
|
||||
* @date 2025/5/9
|
||||
* @apiNote
|
||||
*/
|
||||
|
||||
@Api(tags = "pc端版本")
|
||||
@RequestMapping("/version")
|
||||
@RestController
|
||||
public class PcVersionController {
|
||||
|
||||
@Autowired
|
||||
private PcVersionServiceImpl pcVersionService;
|
||||
|
||||
@ApiOperation(value = "查看pc版本列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<PcVersion>> selectList(){
|
||||
|
||||
List<PcVersion> pcVersionList = pcVersionService.selectList();
|
||||
return R.ok(pcVersionList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改版本")
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody PcVersion pcVersion){
|
||||
|
||||
pcVersionService.update(pcVersion);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "根据版本号查询版本")
|
||||
@PostMapping("/selectVersion")
|
||||
public R selectVersion(@RequestParam String versionNumber){
|
||||
|
||||
PcVersion pcVersion = pcVersionService.selectVersion(versionNumber);
|
||||
|
||||
return R.ok(pcVersion);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增版本")
|
||||
@PostMapping("/addVersion")
|
||||
public R addVersion(@RequestBody PcVersion pcVersion){
|
||||
|
||||
//校验版本号
|
||||
PcVersion pcVersion1 = pcVersionService.selectVersion(pcVersion.getVersionNumber());
|
||||
if (pcVersion1 != null){
|
||||
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"版本号重复");
|
||||
}
|
||||
pcVersionService.addVersion(pcVersion);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.mcwl.web.controller.resource;
|
||||
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.resource.domain.SyncFile;
|
||||
import com.mcwl.resource.service.impl.SyncFileServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* comfyui文件加密同步表
|
||||
*
|
||||
* @author DaiZibo
|
||||
* @date 2025/6/10
|
||||
* @apiNote
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/SyncFile")
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "comfyui文件加密同步表")
|
||||
public class SyncFileController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SyncFileServiceImpl syncFileService;
|
||||
|
||||
@ApiOperation(value = "查看列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<SyncFile>> syncFileList() {
|
||||
|
||||
List<SyncFile> syncFileList = syncFileService.syncFileList();
|
||||
|
||||
return R.ok(syncFileList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "新增版本数据")
|
||||
@PostMapping("/insert")
|
||||
public R syncFileInsert(@RequestBody SyncFile syncFile) {
|
||||
|
||||
syncFileService.syncFileInsert(syncFile);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "根据ID删除数据")
|
||||
@GetMapping("/delete")
|
||||
public R syncFileDelete(@RequestParam Long id) {
|
||||
|
||||
syncFileService.syncFileDelete(id);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改数据")
|
||||
@PostMapping("/update")
|
||||
public R syncFileUpdate(@RequestBody SyncFile syncFile) {
|
||||
|
||||
syncFileService.syncFileUpdate(syncFile);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据发布时间查询")
|
||||
@PostMapping("/selectByTime")
|
||||
public R selectByTime(@RequestBody SyncFile syncFile) {
|
||||
|
||||
return syncFileService.selectByTime(syncFile);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.mcwl.web.controller.system;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mcwl.common.constant.HttpStatus;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.system.domain.SysEmail;
|
||||
import com.mcwl.system.domain.dto.AddEmailRes;
|
||||
import com.mcwl.system.domain.dto.EditEmailRes;
|
||||
import com.mcwl.system.domain.vo.EmailVo;
|
||||
import com.mcwl.system.service.ISysEmailService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/***
|
||||
* 邮箱
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sys/email")
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "邮箱")
|
||||
public class SysEmailController {
|
||||
|
||||
private final ISysEmailService sysEmailService;
|
||||
|
||||
/**
|
||||
* 查询邮箱
|
||||
*/
|
||||
@GetMapping("listEmail")
|
||||
@ApiOperation(value = "查询邮箱列表")
|
||||
public R<List<EmailVo>> listEmail() {
|
||||
|
||||
List<SysEmail> sysEmailList = sysEmailService.list(new LambdaQueryWrapper<SysEmail>().orderByDesc(SysEmail::getCreateTime));
|
||||
|
||||
return R.ok(BeanUtil.copyToList(sysEmailList, EmailVo.class));
|
||||
}
|
||||
|
||||
@GetMapping("getEmail")
|
||||
@ApiOperation(value = "查询邮箱")
|
||||
public R<EmailVo> getEmail(@Valid @NotNull(message = "邮箱id不能为空") Long emailId) {
|
||||
|
||||
SysEmail sysEmail = sysEmailService.getById(emailId);
|
||||
|
||||
return R.ok(BeanUtil.toBean(sysEmail, EmailVo.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新建邮箱
|
||||
*/
|
||||
@PostMapping("createEmail")
|
||||
@ApiOperation(value = "新建邮箱")
|
||||
public R<Object> createEmail(@RequestBody AddEmailRes addEmailRes) {
|
||||
|
||||
sysEmailService.save(BeanUtil.toBean(addEmailRes, SysEmail.class));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除邮箱
|
||||
*/
|
||||
@GetMapping("deleteEmail")
|
||||
@ApiOperation(value = "删除邮箱")
|
||||
public R<Object> deleteEmail(@Valid @NotNull(message = "邮箱id不能为空") Long emailId) {
|
||||
|
||||
List<SysEmail> sysEmailList = sysEmailService.list();
|
||||
if (sysEmailList.size() == 1) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "至少需要一个邮箱");
|
||||
}
|
||||
|
||||
SysEmail sysEmail = sysEmailService.getById(emailId);
|
||||
if (Objects.isNull(sysEmail)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "邮箱不存在");
|
||||
}
|
||||
|
||||
sysEmailService.removeById(emailId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("updateEmail")
|
||||
@ApiOperation(value = "修改邮箱")
|
||||
public R<Object> updateEmail(@RequestBody EditEmailRes editEmailRes) {
|
||||
|
||||
SysEmail sysEmail = sysEmailService.getById(editEmailRes.getId());
|
||||
if (Objects.isNull(sysEmail)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "邮箱不存在");
|
||||
}
|
||||
|
||||
sysEmailService.updateById(BeanUtil.toBean(editEmailRes, SysEmail.class));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package com.mcwl.web.controller.system;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mcwl.common.constant.HttpStatus;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.system.domain.SysEmail;
|
||||
import com.mcwl.system.domain.SysTool;
|
||||
import com.mcwl.system.domain.dto.AddEmailRes;
|
||||
import com.mcwl.system.domain.dto.AddToolRes;
|
||||
import com.mcwl.system.domain.dto.EditEmailRes;
|
||||
import com.mcwl.system.domain.dto.EditToolRes;
|
||||
import com.mcwl.system.domain.vo.EmailVo;
|
||||
import com.mcwl.system.domain.vo.ToolVo;
|
||||
import com.mcwl.system.service.ISysEmailService;
|
||||
import com.mcwl.system.service.ISysToolService;
|
||||
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.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/***
|
||||
* 工具
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sys/tool")
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "工具")
|
||||
public class SysToolController {
|
||||
|
||||
private final ISysToolService sysToolService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询工具列表
|
||||
*/
|
||||
@GetMapping("listTool")
|
||||
@ApiOperation(value = "查询工具列表")
|
||||
public R<List<ToolVo>> listTool(@ApiParam(value = "工具类型") @RequestParam(required = false) Integer type) {
|
||||
List<SysTool> sysToolList = sysToolService.list(new LambdaQueryWrapper<SysTool>()
|
||||
.eq(type != null, SysTool::getType, type)
|
||||
.orderByDesc(SysTool::getStatus)
|
||||
.orderByDesc(SysTool::getCreateTime));
|
||||
List<ToolVo> toolVoList = new ArrayList<>();
|
||||
for (SysTool sysTool : sysToolList) {
|
||||
ToolVo toolVo = BeanUtil.toBean(sysTool, ToolVo.class);
|
||||
if (sysTool.getType() == 0) {
|
||||
toolVo.setTypeName("文本");
|
||||
} else if (sysTool.getType() == 1) {
|
||||
toolVo.setTypeName("图片");
|
||||
} else if (sysTool.getType() == 2) {
|
||||
toolVo.setTypeName("视频");
|
||||
}
|
||||
toolVoList.add(toolVo);
|
||||
}
|
||||
|
||||
return R.ok(toolVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按id查询工具
|
||||
*/
|
||||
@GetMapping("getTool")
|
||||
@ApiOperation(value = "按id查询工具")
|
||||
public R<ToolVo> getTool(@Valid @NotNull(message = "工具id不能为空") Long toolId) {
|
||||
SysTool sysTool = sysToolService.getById(toolId);
|
||||
ToolVo toolVo = BeanUtil.toBean(sysTool, ToolVo.class);
|
||||
if (sysTool.getType() == 0) {
|
||||
toolVo.setTypeName("文本");
|
||||
} else if (sysTool.getType() == 1) {
|
||||
toolVo.setTypeName("图片");
|
||||
} else if (sysTool.getType() == 2) {
|
||||
toolVo.setTypeName("视频");
|
||||
}
|
||||
return R.ok(toolVo);
|
||||
}
|
||||
|
||||
@PostMapping("addTool")
|
||||
@ApiOperation(value = "添加工具")
|
||||
public R<String> addTool(@Valid @RequestBody AddToolRes addToolRes) {
|
||||
|
||||
SysTool sysTool = BeanUtil.toBean(addToolRes, SysTool.class);
|
||||
return sysToolService.save(sysTool) ? R.ok(null, "添加成功") : R.fail(null, "添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑工具
|
||||
*/
|
||||
@PostMapping("editTool")
|
||||
@ApiOperation(value = "编辑工具")
|
||||
public R<String> editTool(@Valid @RequestBody EditToolRes editToolRes) {
|
||||
SysTool sysTool = BeanUtil.toBean(editToolRes, SysTool.class);
|
||||
return sysToolService.updateById(sysTool) ? R.ok(null, "编辑成功") : R.fail(null, "编辑失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工具
|
||||
*/
|
||||
@GetMapping("delTool")
|
||||
@ApiOperation(value = "删除工具")
|
||||
public R<String> delTool(@Valid @NotNull(message = "工具id不能为空") Long toolId) {
|
||||
return sysToolService.removeById(toolId) ? R.ok(null, "删除成功") : R.fail(null, "删除失败");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -134,15 +134,15 @@ mall:
|
|||
gatewayHost: openapi-sandbox.dl.alipaydev.com
|
||||
signType: RSA2
|
||||
# 沙箱应用id
|
||||
appId: 9021000135682614
|
||||
appId: 2021005145615438
|
||||
# 沙箱应用私钥
|
||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQxmQGcaiKjOhayWi+zNTvpp8B5YT8jFFkjLzrD+W+T2Dwf2GfFR4p95zsCJxYeoLWdghMPA6/GMFrLbuVFpaEjuTm4icqA9N8n5d3W0j7gh+wMjZoqyJclAIeb09ut7rY6mWzilA9kWmZnUG7MOWIU70RVRYrfJectCFw/odM9lG4XIVe13X2h+1ecTQyQzLWmnvKFCfo7dQjE7fIYiWfud1ZGUneNs3u73pNWMB6ThGTTCbs0atcgM3fYOg3q7fTxIu9VcaUCJiJ/kNbL9sVEyOrSyx2f2o6w06zdEaOiQFsuDeS8QPYGMg7pf42wAfqCO6hqxQiQT5vp1hvB0o1AgMBAAECggEAIhaEYLwMSispXo8D2cES9iaOU/z91hUX6Qv2Q4anuqqoEZh8nN91Db6etTjFz1NxURvTklelxTsH97t56n26DRY0MWTYgd0Kw9Iz8MeOpKGb4nnAM97vpUq4QQBGfLRIC2ENdzu+7vA5JBFR88hsky/cWaNmJ/EbJauIIDneE7GigMR2HF7kfzdZzOBN4ZEh/ef5NKeCnEieRJJhWRgrgNXVZ44Tqi67AM7ey9pyUtBe7fgzxXtrWXBN9yKaVxxSXm3KJXFQqA6mcilFVZaxMNlAySc4MPTW8lq0ozOCOCunoeIphNz/OVIxGu3/voXFXlBfOKqOkYMVZxMY6OrvtQKBgQD0nIlXK4VW72VaGpz9kxQkRNzJV/yqaqet1GOSlPM2l0RCRFOVVdnvbQdHGPe6+HxHL1dh5MP8T/aHoP+4UXkkQCc8moS2FZxJvFH2QTSZBcSSdGL7GMpROqs38J+XlJzrhNcB20lrW6D7yMeQa4YEcXwdbD8Er/YaIqODBWYYewKBgQCXg+16RLDArciwwhf0TBWZPor2iYFDdwU5UPu7CKOhU1MLfQhG85gGpXHjB6G8cMUi/ezxh/FEl+sWOZegpkPwL5/BQS9tNYWIaC4kipPF/a5Up4DMYUHVAuuPwNqqXpvgU+rGjCns0wtPRnjrkghLkc3oTSID7o7pzUwIk2whDwKBgAys3+EIfExY82OL5X6uVGjcuKQmTw11oWK8krxRw5iclgjpCXu/ix+BAtOIU634mlgF9/02oYE9k4TLrvSaJDDgsifNyfq1e/fGLmkYT+VuCxWbulVQn4s+AwlPCrYMGWWK6KlL9638fYcOjGjLaZJpXwkXRtyzUYlhKh/r87JpAoGBAIavRp2mi/xrPvgpQQPv0k9L8llfOCHRnjoqC+thrZsNp8eRmJcBmMVnskofEZ2iHQuS71pw/n58EQTLo0ayJbhPjVJL8K3CovXzrfjbmqqoa5xi3bJQTiXdF6rMw1QpD6Uk05E1LVuQ6v/IZFr7kBYlAQWb8z3NhQq+bPU+nyLvAoGAGpBbSM8gPzdWQqkHoos0icu3cj0GhN3MU7+1Eb/rsXyh/lk5wtZTEnHjwhdUOUtwVNjvrv7CzA7unhOoaM6YcE/Zpd4zt8pjqH1Mhds7UHf4Xg+A+J4G6meYnhSwfBpOub02ncsqfBlXE0qhFv6AvcMewWndyLb8EYaUUXTYkG0=
|
||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCBNioz1hn7JBdjKHWDVnPbqJyqZAHCsOQmb/fKug3yvJgJix6W5jpYdbA3EE7iohO6yba8ZnHI8XYjcHoZvetfxBhQjcwTOM9yvNs6YqNwN3+LLhvKr5OpqsZ43FRwdnhr1AHSGOdGCCWbJILxDyOzK6pIZTQ8dFpeUk0/p+nhX89e3AnXi9fURgAfgZSXOQ7nCNrfY0QVcqzR00LY8s74AsuMrQ4gEfkNGm7izUEo+2l3tcfUbqueEPsOGwRf9I2rUBznhGzEq/98xhY5b6IrgduwNwuclwtH0YAgi+YV/1ev9jHbvyP932UptOh2dRHGznUtBO+wyhDSms/3r2NZAgMBAAECggEAAtpWTjSw+CmQ1qCjD5ZOEpCDfQOeQlUzhGG+f9xhyHU/ih5nO3+z1BYtINocU8auVtZzUW+VnZEvQZMPLxhRZRjoTIcE9XuwoODomj5pS2X+S+1lsbD0uq9JmIuM1brX59GThLcGDDbL1cQVnArwh9kz9ks9vwP2ptR8XiZv9IjnklVuujnwdpGnhUZi592unCTGxXJa3cIPJBrPBifbmHZnYBcZfVwT3IJN043ifPFxAyuApREfDRIjMyjgZnC8343Jfg//SXp8BJ4yrtSpzwT1ratza82sft+RGFiaFAmKJAbxbK6azivHWvEals3bBPvu4b6B+AaNeL3XUgfSAQKBgQD6WTbecYRizVhdFzzY6T3uWH3ku7NtAkzt9smkCBLe1qtxKW2GxaaIMkeXbfamb1JeeVNQ76Kr2kFNMNSqJB5JPC43nACqeB3t3dqGbWsRn2Xv19FkrY9NLie/tnkgJ6T+mi6JfVQ3JDRD+jjexUFMDEU0AG4zj3OLw6otX3tcGQKBgQCEIOPJn5Ybl/rjy/S7/SLZd3mjerVE67U+YmN4yO8yavBqZllBkPymtf7VtllW0bvN2VFWEC7gEAeJiyvkhwCsDmshpoprhnKPCZA4CmiWQ8pqaDVWZCIM6KVVkkmK54VOuTyyhPsG5Zh1zTbE4zD5ECw4NV2kJug2RyT96CUpQQKBgCOziVGbmqeEZS+RWsoMKRrOX9W4ttO62kGtSgAsbpR8xKI0qDvp/9+4W+FKezws7/AtGSaXpfkf/OQHLKy+zdrfzC99/dJRouMDGmDFRdmTg7P6cRAMeD0ncd+zI/7j6HGuhyhwSQw8C4AONQH/21n+/fd2gEC2GmI6GxCxZyQxAoGAcMYlxlS46Wpp0P6nL8EaeqTYJKm6iE3qz4lov5I5Xz4ZX6dl7WmTy7MxBDX0wP6YnlUrcBq197aWyFYKK67y6ugPlpQwNyB1LRMLjlmL9R19ah7xz3/99Cip3YTT0oRTquK+JN0N6VAUNg/m/Fux1BNyurMJ7u7qalGFCFaZSUECgYEAq5+QgW7VgntIf9TyteYMb+hiZWTeroOQkKCuihbVPBest7+nUS+6RHT1Df3Xf6ZMLwmwYS3lMw4PIGw3a5PEBZAgtWZHMdlNlFPc1aapzE4fW9840ANX7q6g5ylMc8qJI4j3QPj6Us3VXRldoMJXvwVlwGvMLaJQ2pzYAnnwm1Q=
|
||||
# 沙箱应用公钥证书
|
||||
appCertPath: /opt/cert/dev/appPublicCert.crt
|
||||
appCertPath: /opt/cert/pro/appCertPublicKey_2021005145615438.crt
|
||||
# 沙箱支付宝公钥证书路径
|
||||
alipayCertPath: /opt/cert/dev/alipayPublicCert.crt
|
||||
alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
||||
# 沙箱支付宝根证书路径
|
||||
alipayRootCertPath: /opt/cert/dev/alipayRootCert.crt
|
||||
alipayRootCertPath: /opt/cert/pro/alipayRootCert.crt
|
||||
# # 沙箱应用公钥证书
|
||||
# appCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayPublicCert.crt
|
||||
# # 沙箱支付宝公钥证书路径
|
||||
|
@ -150,14 +150,14 @@ mall:
|
|||
# # 沙箱支付宝根证书路径
|
||||
# alipayRootCertPath: D:\workspace\mochuang\mcwl-ai\mcwl-admin\src\main\resources\cert\dev\alipayRootCert.crt
|
||||
notifyUrl: http://113.45.190.154:8080/ali/pay/notify
|
||||
# 沙箱支付宝网关
|
||||
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
||||
# 线上支付宝网关
|
||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
||||
# 绑定回调
|
||||
bindUrl: http://113.45.190.154:8080/ali/pay/callback
|
||||
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式 3、ALIPAY_OPEN_ID:支付宝openid
|
||||
identityType: ALIPAY_USER_ID
|
||||
identityType: ALIPAY_OPEN_ID
|
||||
# 授权url
|
||||
oauthUrl: https://openauth-sandbox.dl.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s
|
||||
oauthUrl: https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s
|
||||
|
||||
huawei:
|
||||
obs:
|
||||
|
@ -174,3 +174,5 @@ mcwl:
|
|||
user:
|
||||
avatar: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/7/53/3f5cc1d7-b062-4a22-9f7e-d442bc6dcf42.png
|
||||
backgroundImg: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/8/2/c8387681-8138-4a29-a1c9-4a143da34c5a.png
|
||||
#发送短信模板
|
||||
templateCode: SMS_485410248
|
||||
|
|
|
@ -134,11 +134,11 @@ mall:
|
|||
gatewayHost: openapi-sandbox.dl.alipaydev.com
|
||||
signType: RSA2
|
||||
# 线上应用id
|
||||
appId: 2021005119630093
|
||||
appId: 2021005145615438
|
||||
# 线上应用私钥
|
||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLyKl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSKkFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5+l+W14k5AgMBAAECggEAHahkPjmivTPc5FC8NSCQI01GPxH6/Ky1OXfaMd4ifTgn+vvQzBeBlFOnt53jRZyUq/T/l1FMaqacZfyBwLw3hlDslXeLuksHv6qTEBEsYH/ad7oHmIzcnQEhvAPrMrIjakYvqGoYynC3SKEudUjjqoMSthCYF+2+bsuXUpBQlNQLqcJ03U+YhfLswwVVujKvAujoLRqDAWeaa0k0y/1Ua4fr5GJq5M+P8TTBRgZlSK5A7Ee6yxMUncZ9W3lTqZtyG0OQLbz9gkr0c63KPisigaOx9eKlCPWFWUWo+zGvQMVijHDTeoJ3dqNmsPtiIE3rDt8anx4a1R7YK6MQ520hAQKBgQDPFMNl4fRmLSOLNShJm/0mBMoIjPmS3+tPBtCiG4oH9F8vYMJWDA1Im0FdgRa2HlCv6hpiVvvQt824RaUYa7XR6aefXKVEWddHvl3utnghMohjK8o8fTmIxADtU5Q2OlWmPdp1v7yDg8yE5P1GlY+AZ3oggxXOIRVtQrNeL7E3iQKBgQCy6nEaUQUCDDts4o7Pn+N402g3/T9Vz/5JtKmDI01EndK5l/yE8CdgGwdiwN1k3la/Nv8P5kaaX2qVcCGoOIQmMNGOxuNfkKCi+bJKdxmFOI4E3iVYT2H6x27QJwNB6bik1i6b2OWT7ckxeB6xMjefNp1u8Qif+vab60OQZSqoMQKBgESRF3Hwsz/xykcZvtFAuT2RcGQMacbcJcnw87v5ambf33SMkUx0iSF1ZttTFvYOa6ET3tCZBKBDe/Z7+QJxB68NstbtkjtjlAjJW8ji2jwDw20y3q/QtvA2Fih++CBMiHeXG3LJnd3eEiYevE5Wz0ExAhspzFqIUdPvtfyFxiQhAoGBAKgc+iGMN3RxIfVx/FbDGe6SVr8lSrnLMlj3VMBQD26GDVcupKwVLCp1uz7jkiQRdtk9R/UcnwK23WOFdVqnoCRygrXx0/wb3ZTFou2tc2Fmfqu8QML19E67zjfwMHNitYjNaAYwi6ewKvg8sjo1wWXs34k7GquYGNjw+w9Wv/pBAoGAUlVHfZ4RncAiiH/x3EDgqmmVikFpLoM2xXxM16nplrjdBE6IzkpgWb/x2ZI6JCMDyoV2kvF6owW2+QEQ81MrHQMtBRpAvd8nI03gXA5VF3uwp4UjfGpoIAGDBrqQv9DM8vx6C6VJNTT5esZWZSw/+PZ4D19l0/n7gICGx3ugw0Q=
|
||||
privateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCBNioz1hn7JBdjKHWDVnPbqJyqZAHCsOQmb/fKug3yvJgJix6W5jpYdbA3EE7iohO6yba8ZnHI8XYjcHoZvetfxBhQjcwTOM9yvNs6YqNwN3+LLhvKr5OpqsZ43FRwdnhr1AHSGOdGCCWbJILxDyOzK6pIZTQ8dFpeUk0/p+nhX89e3AnXi9fURgAfgZSXOQ7nCNrfY0QVcqzR00LY8s74AsuMrQ4gEfkNGm7izUEo+2l3tcfUbqueEPsOGwRf9I2rUBznhGzEq/98xhY5b6IrgduwNwuclwtH0YAgi+YV/1ev9jHbvyP932UptOh2dRHGznUtBO+wyhDSms/3r2NZAgMBAAECggEAAtpWTjSw+CmQ1qCjD5ZOEpCDfQOeQlUzhGG+f9xhyHU/ih5nO3+z1BYtINocU8auVtZzUW+VnZEvQZMPLxhRZRjoTIcE9XuwoODomj5pS2X+S+1lsbD0uq9JmIuM1brX59GThLcGDDbL1cQVnArwh9kz9ks9vwP2ptR8XiZv9IjnklVuujnwdpGnhUZi592unCTGxXJa3cIPJBrPBifbmHZnYBcZfVwT3IJN043ifPFxAyuApREfDRIjMyjgZnC8343Jfg//SXp8BJ4yrtSpzwT1ratza82sft+RGFiaFAmKJAbxbK6azivHWvEals3bBPvu4b6B+AaNeL3XUgfSAQKBgQD6WTbecYRizVhdFzzY6T3uWH3ku7NtAkzt9smkCBLe1qtxKW2GxaaIMkeXbfamb1JeeVNQ76Kr2kFNMNSqJB5JPC43nACqeB3t3dqGbWsRn2Xv19FkrY9NLie/tnkgJ6T+mi6JfVQ3JDRD+jjexUFMDEU0AG4zj3OLw6otX3tcGQKBgQCEIOPJn5Ybl/rjy/S7/SLZd3mjerVE67U+YmN4yO8yavBqZllBkPymtf7VtllW0bvN2VFWEC7gEAeJiyvkhwCsDmshpoprhnKPCZA4CmiWQ8pqaDVWZCIM6KVVkkmK54VOuTyyhPsG5Zh1zTbE4zD5ECw4NV2kJug2RyT96CUpQQKBgCOziVGbmqeEZS+RWsoMKRrOX9W4ttO62kGtSgAsbpR8xKI0qDvp/9+4W+FKezws7/AtGSaXpfkf/OQHLKy+zdrfzC99/dJRouMDGmDFRdmTg7P6cRAMeD0ncd+zI/7j6HGuhyhwSQw8C4AONQH/21n+/fd2gEC2GmI6GxCxZyQxAoGAcMYlxlS46Wpp0P6nL8EaeqTYJKm6iE3qz4lov5I5Xz4ZX6dl7WmTy7MxBDX0wP6YnlUrcBq197aWyFYKK67y6ugPlpQwNyB1LRMLjlmL9R19ah7xz3/99Cip3YTT0oRTquK+JN0N6VAUNg/m/Fux1BNyurMJ7u7qalGFCFaZSUECgYEAq5+QgW7VgntIf9TyteYMb+hiZWTeroOQkKCuihbVPBest7+nUS+6RHT1Df3Xf6ZMLwmwYS3lMw4PIGw3a5PEBZAgtWZHMdlNlFPc1aapzE4fW9840ANX7q6g5ylMc8qJI4j3QPj6Us3VXRldoMJXvwVlwGvMLaJQ2pzYAnnwm1Q=
|
||||
# 线上应用公钥证书
|
||||
appCertPath: /opt/cert/pro/appCertPublicKey_2021005119630093.crt
|
||||
appCertPath: /opt/cert/pro/appCertPublicKey_2021005145615438.crt
|
||||
# 线上支付宝公钥证书路径
|
||||
alipayCertPath: /opt/cert/pro/alipayCertPublicKey_RSA2.crt
|
||||
# 线上支付宝根证书路径
|
||||
|
@ -172,3 +172,5 @@ mcwl:
|
|||
user:
|
||||
avatar: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/7/53/3f5cc1d7-b062-4a22-9f7e-d442bc6dcf42.png
|
||||
backgroundImg: https://ybl2112.oss-cn-beijing.aliyuncs.com/2025/MARCH/10/8/2/c8387681-8138-4a29-a1c9-4a143da34c5a.png
|
||||
#发送短信模板
|
||||
templateCode: SMS_485410248
|
||||
|
|
|
@ -52,7 +52,7 @@ spring:
|
|||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
active: dev
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDmTCCAoGgAwIBAgIQICQEAub4U5TMozibHLcg8zANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
|
||||
MIIDmTCCAoGgAwIBAgIQICUEKLy77ndlVg3UfaV5GDANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
|
||||
BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWNhdGlv
|
||||
biBBdXRob3JpdHkgdGVzdDE+MDwGA1UEAww1QW50IEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1
|
||||
dGhvcml0eSBDbGFzcyAyIFIxIHRlc3QwHhcNMjQwNDAyMDUzMjU2WhcNMjUwNDA3MDUzMjU2WjBr
|
||||
dGhvcml0eSBDbGFzcyAyIFIxIHRlc3QwHhcNMjUwNDI4MDY1NjQ2WhcNMjYwNTAzMDY1NjQ2WjBr
|
||||
MQswCQYDVQQGEwJDTjEfMB0GA1UECgwWZGJwbGZ1MTI5NEBzYW5kYm94LmNvbTEPMA0GA1UECwwG
|
||||
QWxpcGF5MSowKAYDVQQDDCEyMDg4NzIxMDMyOTcxMTQzLTkwMjEwMDAxMzU2ODI2MTQwggEiMA0G
|
||||
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQxmQGcaiKjOhayWi+zNTvpp8B5YT8jFFkjLzrD+W+
|
||||
T2Dwf2GfFR4p95zsCJxYeoLWdghMPA6/GMFrLbuVFpaEjuTm4icqA9N8n5d3W0j7gh+wMjZoqyJc
|
||||
lAIeb09ut7rY6mWzilA9kWmZnUG7MOWIU70RVRYrfJectCFw/odM9lG4XIVe13X2h+1ecTQyQzLW
|
||||
mnvKFCfo7dQjE7fIYiWfud1ZGUneNs3u73pNWMB6ThGTTCbs0atcgM3fYOg3q7fTxIu9VcaUCJiJ
|
||||
/kNbL9sVEyOrSyx2f2o6w06zdEaOiQFsuDeS8QPYGMg7pf42wAfqCO6hqxQiQT5vp1hvB0o1AgMB
|
||||
AAGjEjAQMA4GA1UdDwEB/wQEAwIE8DANBgkqhkiG9w0BAQsFAAOCAQEAZmMSaD7s3aervdACl0cN
|
||||
YRcUHMGBA4DwzeLKaF0iqcsQxzJHBQRSGbAeQ9n5l1U5V0Pos92V7eqEJqtC52l6sK5T4YE6zAxf
|
||||
49RKyo00qVFCbcGMHnRy0F/AkEhz+qhan1R3Dm7Ty6UtgAaeF6emD35EIKXziCvqS1nBt+nniYYB
|
||||
0O2UntrJ3lYucuLun7TeYou/kPMTnZItzSmvCmG181e5IpSB3qGwBnIgkmB+Ge0kGIFAoV9+MucT
|
||||
4YOffum8yC0oF7aMtTL9whm5gb+Udj+lBrHYYw8VPNpcvBmRlXEKEJLbWQrGtJi6+URReWqO52UP
|
||||
fGHB0r4r575H4Y1QkA==
|
||||
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZVV6wTtfUJP7UoSLMCYiGad2Jj2hlOyDVNLXZVf+V
|
||||
ffckt7/g3Ye/jIPt1D/arB2f/wO01qKOkraBCXg2LQOL3g72Na9MUZ0JJ6Tk4JAgRngR3GoO1XuE
|
||||
z52yq4yX7nVcD+xDbAt865GZWZhKL+7DgW22z1f7TtEDpfHwFcvMfznwTm5R6VpOw0qYnnHzOZwN
|
||||
xrtKNQLYIJVZhuvi51PuLn4dpC1nH487BjPBLSFiTMcN0aQzaFs2d3OQcMBykQFp8CR00LvKqsUH
|
||||
jVm6hwMm0/sObd3Meu7to6fRCNIYtu3LaDwS9s7tvRGIf3y7wFb+R2nfz83FSXx20D2wGxKhAgMB
|
||||
AAGjEjAQMA4GA1UdDwEB/wQEAwIE8DANBgkqhkiG9w0BAQsFAAOCAQEAU+8RF/0/hn2a+LbzMLjv
|
||||
64kF+j6PQRqlKZALFHDso6helwtquBWSf+Veu1PZ0tEgwCwUF0v+KYtDW+5tdwUsPMg/HXsbpSJw
|
||||
x4ZiEjwcE9FG7E0U3ckb+eP2FgJbVJnjoy4Fq7VRpjO/asxoYSoWsnCC6b0aUkLs+QlQ4O6SKC3d
|
||||
rTHGeyK1D4fTlk3Dmuf6dA6Q0SgkG91sNzHscw3FtE47+GtvHtM4Qr6LHqKlYPV8VZ09zvherpih
|
||||
tSTr035sJezP9VYtKQwTXyUTCVVC6WQQdT/040WvMqkPVGtDEWzStZWflXK1IeAXnOLXyCYEBBG6
|
||||
aE08iD5MOCZmldDOFg==
|
||||
-----END CERTIFICATE-----
|
|
@ -1,21 +1,21 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDnTCCAoWgAwIBAgIQICUCFPTaqv/ZUGkFjQNMjTANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE
|
||||
MIIDnTCCAoWgAwIBAgIQICUEMD/I70WhfK5U0UPelTANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE
|
||||
BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0
|
||||
aG9yaXR5MTkwNwYDVQQDDDBBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IENs
|
||||
YXNzIDIgUjEwHhcNMjUwMjE0MDkxMDAxWhcNMzAwMjEzMDkxMDAxWjB+MQswCQYDVQQGEwJDTjEZ
|
||||
MBcGA1UECgwQMjA4ODk0Mjk4OTQ4MjU3OTEPMA0GA1UECwwGQWxpcGF5MUMwQQYDVQQDDDrmlK/k
|
||||
u5jlrp0o5Lit5Zu9Kee9kee7nOaKgOacr+aciemZkOWFrOWPuC0yMDg4OTQyOTg5NDgyNTc5MIIB
|
||||
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwa7R9uTM3VJpWZDWiNSUw23AoIlSZ4Y6lgaA
|
||||
xuhKYmUx8P2yCHJ8xEyASRHUggrYoEvkbuLqHPpNPmJsMaqnbuP4uwfkxO9l/D2bnPRFd2e4eQhX
|
||||
L7YHOLRWgHhMBfkMYMq9A8kJHDa9drVbxvp1zbvxakJvEuJ9TVCvHdpsTGbMxBn5PP7qTQYoQAQj
|
||||
FYF6j6eLmrskFgqYGmDV2dbf/tFLaQZSuhut47pb3glvi7g0ECMy+S3v76pZk5+FP42EkBFFsLH1
|
||||
lTREgO1PTSRAEiZkSGRLtmf3u6EMb42pE6EUF4pHHaACEQ3ZRuYK8Mo00A0FmwAoKil2MxkzAX5Z
|
||||
KQIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCA/gwDQYJKoZIhvcNAQELBQADggEBAGsnIGoHjk4+YUJJ
|
||||
nLMggzUmAuKt1rHcUN+3SfsNmnGqwluy4cm4emxj2qwcTzEEQvrES33difh4Ubtf2XyS1MFLkxhG
|
||||
WonCuEUjZqKgWz66gCG3l0l7HRy2VJaaaVlC49yJMOsuUNtAFjh+Pu5XVb7ff8Adf3YGNeFC4Tde
|
||||
gkBgDO8RbPSfdc7bP0Fq+TPj5nMCu64KzBz4RP5da7Q/mSFI2PCvtEquhq/eeDezfHUAz2ehC/bA
|
||||
dSRHytgzrGktk+BIPtEsoYG9zIHBNwA8JCr9Z5q2eauhYvIE1sJVO151Dph1u4LE1voQQ4qr4t6v
|
||||
gU2IoL6w5LvdWDSQCIrPOa4=
|
||||
YXNzIDIgUjEwHhcNMjUwNDMwMDk0MjQ2WhcNMzAwNDI5MDk0MjQ2WjB+MQswCQYDVQQGEwJDTjEZ
|
||||
MBcGA1UECgwQMjA4ODI3MDU1MTI5NzY5NTEPMA0GA1UECwwGQWxpcGF5MUMwQQYDVQQDDDrmlK/k
|
||||
u5jlrp0o5Lit5Zu9Kee9kee7nOaKgOacr+aciemZkOWFrOWPuC0yMDg4MjcwNTUxMjk3Njk1MIIB
|
||||
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOvIK3mH5QR3LKnkdfBKe5j0ylfd7jqehQXP
|
||||
X1wn9/ojPbqOHd6PTJVFGHYhdwhaipPQJCB0GTOuNM//CcQTA/1FGrc93AcYVoiIw9J9tbNWaHH7
|
||||
AfeeUA+FYcRRwsMV5ND7ZfIlcsWhePQbFVGw6grbJaCAfM5Zon2MkibhLsUVVAsC6ry6rTuL0zrz
|
||||
KrdFG4YISKT46Kczxi50rVrRUbwSlPM30qKam2w313NgmIknr7cXX2WhgGac78MTbqVvoZ89HtmC
|
||||
QFWZDrUZXuNjv3L+wdt0QJG2OUucKTP79jBXvwV67/LtYzLDKjTUqTXdmeWgB3F2009qqeT5FCRC
|
||||
AQIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCA/gwDQYJKoZIhvcNAQELBQADggEBADU7NQlkiRD/qBHc
|
||||
55iENae4xxiUZfY1O1c48Kx7Tz425MV+vSnUdiBljiWLBTEdXSwACtULXnTyG7RtYry6aexYVIb0
|
||||
QvCwcJEYRTuZ98rfOGnc1s8saw1jjVEribuZnE5O36OLeTCPSfVqvnO2Q3hvowaju3tzLyhxuM9/
|
||||
bknHel5mz5qfXsQ2sYxujtivbKA9zPXOQuV/xpDTFuUI4kDuYq6WsDTmMByr3JOlM6XdXyywhYZ3
|
||||
F1IHw2Nm8SLBwewxaxHY479C61F4d6iYZeWTP1qvi8XQWExUzUCob2nwcVzpJm07nw6i6Y5RpHBV
|
||||
uEz2oJZ8Fh9PlEcKvJdgKqQ=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIE4jCCAsqgAwIBAgIIYsSr5bKAMl8wDQYJKoZIhvcNAQELBQAwejELMAkGA1UEBhMCQ04xFjAU
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEgjCCA2qgAwIBAgIQICUCFE7HTf+7v9yXtoeyLjANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE
|
||||
BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0
|
||||
aG9yaXR5MTkwNwYDVQQDDDBBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IENs
|
||||
YXNzIDEgUjEwHhcNMjUwMjE0MDkxMDAwWhcNMzAwMjEzMDkxMDAwWjBKMQswCQYDVQQGEwJDTjEP
|
||||
MA0GA1UECgwG5Ya35paMMQ8wDQYDVQQLDAZBbGlwYXkxGTAXBgNVBAMMEDIwODg5NDI5ODk0ODI1
|
||||
NzkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQuhRU5iHoabfzJS40A+moMKzb5rmi
|
||||
5XbL59K98CW65Oq/rnzQnj6sCYggIXOLCLKUykZ1XIVa+4V7bGFkMDF0236ncPumnVY/tfCSebLy
|
||||
Kl+up1mGeH4mAR6ily7nXAhRnXL+A0015bpCa5FCg2ReN68MEmquB/mHfeLqJfRupwzDWnIWxYSK
|
||||
kFCJ0i47KTFYhM93LHHQ8GrZNNaeiJ6q59MruQI83z0HCxN/DzK4Z2rBWGilwPuYcSEa0STPXYhz
|
||||
8XMXUX/Mlp7dd5zyWeNaxkNRWlhKHvhLVPGvteaEcchs476DIWLCRVXEC1372wMKNrKblzRp7Wi5
|
||||
+l+W14k5AgMBAAGjggEpMIIBJTAfBgNVHSMEGDAWgBRxB+IEYRbk5fJl6zEPyeD0PJrVkTAdBgNV
|
||||
HQ4EFgQUqfZMfgxmG9w6m5lXQSdoiPe0vagwQAYDVR0gBDkwNzA1BgdggRwBbgEBMCowKAYIKwYB
|
||||
BQUHAgEWHGh0dHA6Ly9jYS5hbGlwYXkuY29tL2Nwcy5wZGYwDgYDVR0PAQH/BAQDAgbAMC8GA1Ud
|
||||
HwQoMCYwJKAioCCGHmh0dHA6Ly9jYS5hbGlwYXkuY29tL2NybDk4LmNybDBgBggrBgEFBQcBAQRU
|
||||
MFIwKAYIKwYBBQUHMAKGHGh0dHA6Ly9jYS5hbGlwYXkuY29tL2NhNi5jZXIwJgYIKwYBBQUHMAGG
|
||||
Gmh0dHA6Ly9jYS5hbGlwYXkuY29tOjgzNDAvMA0GCSqGSIb3DQEBCwUAA4IBAQAmDOoavQGthLtz
|
||||
WuW1e0g0K2WChYevFcnWWNILTJ0EsB01Ka0FagOo1T3ErGns+G9lbSj9g6DQZ5DVqLCGnl2ZRvBN
|
||||
KwSnA/7Frllf7CebBaW5WWJ3VKWxP929izvywlPeQdmRELNGK4H/IZoW+nCDYjUgXLOLMgBnqmLY
|
||||
wgug/g3iQ+yFSFuvSNE2J84FwPycWweDJ8zrj4aM9S/bjjWoE/Lfe/a86BIYV19A72Ozc/aTGnxP
|
||||
W/D5txDrhO2wWeCzXd7TuBN1Hze5IX/hYeDqM3rjHuQcGcbFJOchqqR5fUEC/SU9MZ4j/KWND83l
|
||||
Y28GbRbP5jxhgckHIKjfKh6b
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,24 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEqTCCA5GgAwIBAgIQICUEMEsw9dI2bJEfCxvIpDANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UE
|
||||
BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0
|
||||
aG9yaXR5MTkwNwYDVQQDDDBBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IENs
|
||||
YXNzIDEgUjEwHhcNMjUwNDMwMDk0MjQ1WhcNMzAwNDI5MDk0MjQ1WjBwMQswCQYDVQQGEwJDTjE1
|
||||
MDMGA1UECgws6a2U5Yib5pyq5p2lKOebmOmUpinph4/lrZDnp5HmioDmnInpmZDlhazlj7gxDzAN
|
||||
BgNVBAsMBkFsaXBheTEZMBcGA1UEAwwQMjA4ODI3MDU1MTI5NzY5NTCCASIwDQYJKoZIhvcNAQEB
|
||||
BQADggEPADCCAQoCggEBAIE2KjPWGfskF2ModYNWc9uonKpkAcKw5CZv98q6DfK8mAmLHpbmOlh1
|
||||
sDcQTuKiE7rJtrxmccjxdiNwehm961/EGFCNzBM4z3K82zpio3A3f4suG8qvk6mqxnjcVHB2eGvU
|
||||
AdIY50YIJZskgvEPI7MrqkhlNDx0Wl5STT+n6eFfz17cCdeL19RGAB+BlJc5DucI2t9jRBVyrNHT
|
||||
QtjyzvgCy4ytDiAR+Q0abuLNQSj7aXe1x9Ruq54Q+w4bBF/0jatQHOeEbMSr/3zGFjlvoiuB27A3
|
||||
C5yXC0fRgCCL5hX/V6/2Mdu/I/3fZSm06HZ1EcbOdS0E77DKENKaz/evY1kCAwEAAaOCASowggEm
|
||||
MB8GA1UdIwQYMBaAFHEH4gRhFuTl8mXrMQ/J4PQ8mtWRMB0GA1UdDgQWBBQF9IOvXYsKc5BYeX7i
|
||||
WBGPnLfXFjBABgNVHSAEOTA3MDUGB2CBHAFuAQEwKjAoBggrBgEFBQcCARYcaHR0cDovL2NhLmFs
|
||||
aXBheS5jb20vY3BzLnBkZjAOBgNVHQ8BAf8EBAMCBsAwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDov
|
||||
L2NhLmFsaXBheS5jb20vY3JsMTAwLmNybDBgBggrBgEFBQcBAQRUMFIwKAYIKwYBBQUHMAKGHGh0
|
||||
dHA6Ly9jYS5hbGlwYXkuY29tL2NhNi5jZXIwJgYIKwYBBQUHMAGGGmh0dHA6Ly9jYS5hbGlwYXku
|
||||
Y29tOjgzNDAvMA0GCSqGSIb3DQEBCwUAA4IBAQCT1XsweDrdEJfuV+z7sEixD7grI/gWsFTT0MRz
|
||||
LVJ2IJka5dXTuZCTr6bwFok4XfgRB/fG0kGzeHkNojT4hmTpIsQDGySmasuPWU1fazWVo61DHA9M
|
||||
gWJGetl1j80on4nxrzNk05brz48fFqLfZqJBoKX7s6GsGru4pQlIqwaVkKVSlR4txBeWWmI+lP4V
|
||||
VcZyS3JzzPeNic1y0CBH4/aWWDXBpoSW/QU9SscHEauveo4th4Gj7n2dLCoUf6bg1/CK5LbWIRW5
|
||||
tniglA1nvU6Lk1hrgYB4BMrw8Y7toswlIGYtSTxkNISQS9eM+4qdBWQ1qHjhFTn8T7xah9hjg4RT
|
||||
|
||||
-----END CERTIFICATE-----
|
|
@ -1,6 +1,6 @@
|
|||
# 发件人(必须正确,否则发送失败)
|
||||
from = 2119157836@qq.com
|
||||
from = 14704273765@163.com
|
||||
# 密码(注意,某些邮箱需要为SMTP服务单独设置授权码)
|
||||
pass = wetaiadftmidejab
|
||||
pass = LAfHcPaYsugcdecK
|
||||
# 使用SSL安全连接
|
||||
sslEnable = true
|
||||
|
|
|
@ -20,8 +20,8 @@ public class CodeUtils {
|
|||
public static String generateCaptcha() {
|
||||
// 创建Random对象用于生成随机数
|
||||
Random random = new Random();
|
||||
// 生成1000到9999之间的随机整数(包括1000和9999)
|
||||
int captcha = 1000 + random.nextInt(9000);
|
||||
// 生成100000到999999之间的随机整数(包括100000和999999)
|
||||
int captcha = 100000 + random.nextInt(900000);
|
||||
// 将整数转换为字符串并返回
|
||||
return String.valueOf(captcha);
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 华为云obs上传文件工具类
|
||||
|
@ -44,9 +44,10 @@ public class ObsUtils {
|
|||
|
||||
try {
|
||||
InputStream inputStream = multipartFile.getInputStream();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
String ossDefaultPath = getOssDefaultPath(multipartFile.getOriginalFilename(),uuid);
|
||||
PutObjectResult putObjectResult = obsClient.putObject(bucketName, ossDefaultPath, inputStream);
|
||||
// String uuid = UUID.randomUUID().toString();
|
||||
// String ossDefaultPath = getOssDefaultPath(multipartFile.getOriginalFilename(),uuid);
|
||||
|
||||
PutObjectResult putObjectResult = obsClient.putObject(bucketName, new Date().getTime()+"", inputStream);
|
||||
inputStream.close();
|
||||
map.put("path",putObjectResult.getObjectUrl());
|
||||
map.put("objectKey",putObjectResult.getObjectKey());
|
||||
|
|
|
@ -18,8 +18,8 @@ public class TelSmsUtils {
|
|||
/**
|
||||
* 阿里云主账号AccessKey,accessKeySecret拥有所有API的访问权限
|
||||
*/
|
||||
private static String accessKeyId = "LTAI5tSHZZ8wHJRP8X4r9TXT";
|
||||
private static String accessKeySecret = "F82IVNx0IGJ3AnP6gSIfcyql1HCXIH";
|
||||
private static String accessKeyId = "LTAI5tJY7ZgftP6g2Vv66Hgy";
|
||||
private static String accessKeySecret = "Hx3sbJa8GJzRCFjArqEgk2965Gayrf";
|
||||
|
||||
/**
|
||||
* 短信访问域名
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
<groupId>com.mcwl</groupId>
|
||||
<artifactId>mcwl-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mcwl</groupId>
|
||||
<artifactId>mcwl-myInvitation</artifactId>
|
||||
<version>3.8.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
|
||||
<!-- <dependency>-->
|
||||
|
|
|
@ -30,6 +30,11 @@ public class IncomeInfo extends BaseEntity {
|
|||
*/
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 类型 0付费加入 1付费问答
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,11 @@ public class Publish extends BaseEntity {
|
|||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
private String labelName;
|
||||
|
||||
/**
|
||||
* 发布时间 - 定时发布
|
||||
*/
|
||||
|
|
|
@ -57,11 +57,5 @@ public class PublishComment extends BaseEntity {
|
|||
@ApiModelProperty(value = "点赞数")
|
||||
private Integer likeNum;
|
||||
|
||||
/**
|
||||
* 评论类型 0发布 1提问
|
||||
*/
|
||||
@ApiModelProperty(value = "评论类型 0发布 1提问")
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
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;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 发布
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("cc_publish_label")
|
||||
public class PublishLabel extends BaseEntity {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id - 租户id
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
private String labelName;
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.mcwl.communityCenter.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.mcwl.common.core.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 举报表
|
||||
*/
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("cc_report")
|
||||
public class PublishReport extends BaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 发布id
|
||||
*/
|
||||
private Long publishId;
|
||||
|
||||
/**
|
||||
* 举报人
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 举报类型 字典值
|
||||
*/
|
||||
private Integer reportType;
|
||||
|
||||
/**
|
||||
* 举报描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态(0未处理 1已处理 )
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
|
@ -32,11 +32,11 @@ public class CommentDelRes {
|
|||
@NotNull(message = "社区id不能为空")
|
||||
private Long communityId;
|
||||
/**
|
||||
* 运营id
|
||||
* 发布id
|
||||
*/
|
||||
@ApiModelProperty(value = "运营id", required = true)
|
||||
@NotNull(message = "运营id不能为空")
|
||||
private Long operatorId;
|
||||
@ApiModelProperty(value = "发布id", required = true)
|
||||
@NotNull(message = "发id不能为空")
|
||||
private Long publishId;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ public class CommentDetailRes {
|
|||
@NotNull(message = "社区id不能为空")
|
||||
private Long communityId;
|
||||
/**
|
||||
* 运营id
|
||||
* 发布id
|
||||
*/
|
||||
@ApiModelProperty(value = "运营id", required = true)
|
||||
@NotNull(message = "运营id不能为空")
|
||||
private Long operatorId;
|
||||
@ApiModelProperty(value = "发布id", required = true)
|
||||
@NotNull(message = "发布id不能为空")
|
||||
private Long publishId;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package com.mcwl.communityCenter.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 评论请求参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "评论请求参数")
|
||||
public class CommentLikeDetailRes {
|
||||
|
||||
|
||||
/**
|
||||
* 租户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 publishCommentId;
|
||||
|
||||
|
||||
}
|
|
@ -28,11 +28,11 @@ public class CommentRes {
|
|||
@NotNull(message = "社区id不能为空")
|
||||
private Long communityId;
|
||||
/**
|
||||
* 运营id
|
||||
* 发布id
|
||||
*/
|
||||
@ApiModelProperty(value = "运营id", required = true)
|
||||
@NotNull(message = "运营id不能为空")
|
||||
private Long operatorId;
|
||||
@ApiModelProperty(value = "发布id", required = true)
|
||||
@NotNull(message = "发布id不能为空")
|
||||
private Long publishId;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
|
@ -40,5 +40,11 @@ public class CommentRes {
|
|||
@NotBlank(message = "内容不能为空")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 父评论id
|
||||
*/
|
||||
@ApiModelProperty(value = "父评论id", required = true)
|
||||
private Long parentId;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package com.mcwl.communityCenter.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 修改举报状态请求参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "修改举报状态请求参数")
|
||||
public class EditPublishReportStatusRes {
|
||||
|
||||
/**
|
||||
* 租户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;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
|
@ -3,8 +3,7 @@ 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 lombok.*;
|
||||
|
||||
/**
|
||||
* 社区列表分页请求参数
|
||||
|
@ -12,6 +11,9 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "社区列表分页请求参数")
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class JoinCommunityListPageRes extends PageDomain {
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
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.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 新增发布标签请求参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "新增发布标签请求参数")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PublishLabelAddRes {
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@NotNull(message = "租户id不能为空")
|
||||
@ApiModelProperty(value = "租户id", required = true)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@NotNull(message = "社区id不能为空")
|
||||
@ApiModelProperty(value = "社区id", required = true)
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 标签名称
|
||||
*/
|
||||
@NotBlank(message = "标签名称不能为空")
|
||||
@ApiModelProperty(value = "标签名称", required = true)
|
||||
private String labelName;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
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 PublishLabelListRes {
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@NotNull(message = "租户id不能为空")
|
||||
@ApiModelProperty(value = "租户id", required = true)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@NotNull(message = "社区id不能为空")
|
||||
@ApiModelProperty(value = "社区id", required = true)
|
||||
private Long communityId;
|
||||
|
||||
|
||||
}
|
|
@ -25,4 +25,7 @@ public class PublishPageRes extends PageDomain {
|
|||
@ApiModelProperty(value = "类型 0只看星主 1精选", required = true)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "标签名")
|
||||
private String labelName;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package com.mcwl.communityCenter.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 删除发布请求参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "删除发布请求参数")
|
||||
public class PublishRemoveRes {
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户id", required = true)
|
||||
@NotNull(message = "租户id不能为空")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@ApiModelProperty(value = "社区id", required = true)
|
||||
@NotNull(message = "社区id不能为空")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 发布id
|
||||
*/
|
||||
@ApiModelProperty(value = "发布id", required = true)
|
||||
@NotNull(message = "发布id不能为空")
|
||||
private Long publishId;
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
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 PublishReportRes {
|
||||
|
||||
/**
|
||||
* 租户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;
|
||||
|
||||
/**
|
||||
* 举报类型
|
||||
*/
|
||||
@ApiModelProperty(value = "举报类型", required = true)
|
||||
@NotNull(message = "举报类型不能为空")
|
||||
private Integer reportType;
|
||||
|
||||
/**
|
||||
* 举报内容
|
||||
*/
|
||||
@ApiModelProperty(value = "举报内容")
|
||||
private String description;
|
||||
|
||||
}
|
|
@ -26,6 +26,11 @@ public class PublishRes {
|
|||
@ApiModelProperty(value = "社区id", required = true)
|
||||
@NotNull(message = "社区id不能为空")
|
||||
private Long communityId;
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
@ApiModelProperty(value = "标签名")
|
||||
private String labelName;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
|
@ -51,9 +56,10 @@ public class PublishRes {
|
|||
private String fileName;
|
||||
|
||||
/**
|
||||
* 发布时间 - 定时发布
|
||||
* 是否精选
|
||||
*/
|
||||
@ApiModelProperty(value = "发布时间 - 定时发布")
|
||||
private Date publishTime;
|
||||
@ApiModelProperty(value = "是否精选")
|
||||
private Integer isElite = 0;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ public class QuestionRes {
|
|||
* 是否匿名 0 否 1 是
|
||||
*/
|
||||
@ApiModelProperty(value = "是否匿名", position = 5)
|
||||
@NotNull(message = "是否匿名不能为空")
|
||||
private Integer isAnonymous = 0;
|
||||
|
||||
|
||||
|
|
|
@ -57,6 +57,12 @@ public class CommentVo {
|
|||
@ApiModelProperty(value = "用户头像")
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 回复人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "回复人名称")
|
||||
private String replyUserName;
|
||||
|
||||
/**
|
||||
* 父评论id
|
||||
*/
|
||||
|
@ -69,6 +75,11 @@ public class CommentVo {
|
|||
@ApiModelProperty(value = "评论内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 是否点赞
|
||||
*/
|
||||
@ApiModelProperty(value = "是否点赞")
|
||||
private Integer isLike;
|
||||
|
||||
/**
|
||||
* 评论点赞数
|
||||
|
@ -76,6 +87,12 @@ public class CommentVo {
|
|||
@ApiModelProperty(value = "评论点赞数")
|
||||
private Integer likeNum;
|
||||
|
||||
/**
|
||||
* 是否接受
|
||||
*/
|
||||
@ApiModelProperty(value = "是否接受")
|
||||
private Integer isAccept;
|
||||
|
||||
/**
|
||||
* 评论时间
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package com.mcwl.communityCenter.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 社区返回数据
|
||||
|
@ -20,6 +23,12 @@ public class CommunityDetailVo {
|
|||
@ApiModelProperty(value = "社区id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区图片
|
||||
*/
|
||||
|
@ -33,37 +42,71 @@ public class CommunityDetailVo {
|
|||
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;
|
||||
|
||||
/**
|
||||
* 社区类型
|
||||
*/
|
||||
@ApiModelProperty(value = "社区类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 有效期天数
|
||||
*/
|
||||
@ApiModelProperty(value = "有效期天数")
|
||||
private Integer validityDay;
|
||||
|
||||
/**
|
||||
* 创建天数
|
||||
*/
|
||||
@ApiModelProperty(value = "创建天数")
|
||||
private Long createDay;
|
||||
|
||||
/**
|
||||
* 成员数
|
||||
*/
|
||||
@ApiModelProperty(value = "成员数")
|
||||
private Integer userNum;
|
||||
|
||||
/**
|
||||
* 成员头像
|
||||
*/
|
||||
@ApiModelProperty(value = "成员头像")
|
||||
private List<String> avatarList;
|
||||
|
||||
/**
|
||||
* 更新内容数
|
||||
*/
|
||||
@ApiModelProperty(value = "更新内容数")
|
||||
private Integer updateNum;
|
||||
|
||||
/**
|
||||
* 最近更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "最近更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date lastUpdateTime;
|
||||
|
||||
/**
|
||||
* 当前用户到期时间
|
||||
*/
|
||||
@ApiModelProperty(value = "当前用户到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date expireTime;
|
||||
|
||||
}
|
||||
|
|
|
@ -88,10 +88,10 @@ public class CommunityVo {
|
|||
private Integer joinNum;
|
||||
|
||||
/**
|
||||
* 发布数量
|
||||
* 是否加入
|
||||
*/
|
||||
@ApiModelProperty(value = "发布数量")
|
||||
private Integer publishNum;
|
||||
@ApiModelProperty(value = "是否加入")
|
||||
private Integer isJoin;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -37,6 +37,24 @@ public class PersonHomeVo {
|
|||
@ApiModelProperty(value = "社区id")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
|
@ -62,6 +80,12 @@ public class PersonHomeVo {
|
|||
@ApiModelProperty(value = "图片url")
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
@ApiModelProperty(value = "标签名")
|
||||
private String labelName;
|
||||
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
|
@ -69,6 +93,13 @@ public class PersonHomeVo {
|
|||
@ApiModelProperty(value = "点赞数")
|
||||
private Integer likeNum;
|
||||
|
||||
/**
|
||||
* 是否点赞
|
||||
*/
|
||||
@ApiModelProperty(value = "是否点赞")
|
||||
private Integer isLike;
|
||||
|
||||
|
||||
/**
|
||||
* 是否收藏
|
||||
*/
|
||||
|
@ -81,6 +112,29 @@ public class PersonHomeVo {
|
|||
@ApiModelProperty(value = "评论")
|
||||
private List<CommentVo> commentList;
|
||||
|
||||
/**
|
||||
* 是否匿名
|
||||
*/
|
||||
@ApiModelProperty(value = "是否匿名")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 提问类型 0免费 1付费
|
||||
*/
|
||||
@ApiModelProperty(value = "提问类型 0免费 1付费")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 付费金额 当提问类型为付费时必填
|
||||
*/
|
||||
@ApiModelProperty(value = "付费金额 当提问类型为付费时必填")
|
||||
private Double amount;
|
||||
|
||||
/**
|
||||
* 状态 0未解决 1已解决
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package com.mcwl.communityCenter.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mcwl.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 举报表
|
||||
*/
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(description = "举报返回参数")
|
||||
public class PublishReportVo {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@ApiModelProperty(value = "社区id")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 发布id
|
||||
*/
|
||||
@ApiModelProperty(value = "发布id")
|
||||
private Long publishId;
|
||||
|
||||
/**
|
||||
* 举报人
|
||||
*/
|
||||
@ApiModelProperty(value = "举报人")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 举报类型 字典值
|
||||
*/
|
||||
@ApiModelProperty(value = "举报类型")
|
||||
private String reportType;
|
||||
|
||||
/**
|
||||
* 状态(0未处理 1已处理 )
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(0未处理 1已处理 )")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片url
|
||||
*/
|
||||
@ApiModelProperty(value = "图片url")
|
||||
private String imgUrl;
|
||||
|
||||
/**
|
||||
* 文件url
|
||||
*/
|
||||
@ApiModelProperty(value = "文件url")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 举报时间
|
||||
*/
|
||||
@ApiModelProperty(value = "举报时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发布信息
|
||||
|
@ -39,6 +40,12 @@ public class PublishVo {
|
|||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 标签名
|
||||
*/
|
||||
@ApiModelProperty(value = "标签名")
|
||||
private String labelName;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
|
@ -105,6 +112,13 @@ public class PublishVo {
|
|||
@ApiModelProperty(value = "收藏")
|
||||
private Integer isCollect;
|
||||
|
||||
/**
|
||||
* 评论
|
||||
*/
|
||||
@ApiModelProperty(value = "评论")
|
||||
private List<CommentVo> commentList;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
|
|
@ -1,46 +1,74 @@
|
|||
package com.mcwl.communityCenter.domain.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel(description = "提问评论")
|
||||
public class QuestionCommentVo {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
@ApiModelProperty(value = "社区id")
|
||||
private Long communityId;
|
||||
|
||||
/**
|
||||
* 提问id
|
||||
*/
|
||||
@ApiModelProperty(value = "提问id")
|
||||
private Long questionId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 是否接受
|
||||
*/
|
||||
@ApiModelProperty(value = "是否接受")
|
||||
private Long isAccept;
|
||||
private Integer isAccept;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
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;
|
||||
|
@ -8,6 +9,7 @@ import lombok.Data;
|
|||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(description = "问题信息")
|
||||
|
@ -17,6 +19,12 @@ public class QuestionVo {
|
|||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 社区id
|
||||
*/
|
||||
|
@ -54,28 +62,10 @@ public class QuestionVo {
|
|||
private String questionUrl;
|
||||
|
||||
/**
|
||||
* 提问时间
|
||||
* 评论
|
||||
*/
|
||||
@ApiModelProperty(value = "提问时间")
|
||||
private Date createTime;
|
||||
|
||||
// /**
|
||||
// * 答复用户id
|
||||
// */
|
||||
// @ApiModelProperty(value = "答复用户id")
|
||||
// private Long replyUserId;
|
||||
//
|
||||
// /**
|
||||
// * 回复内容
|
||||
// */
|
||||
// @ApiModelProperty(value = "回复内容")
|
||||
// private String reply;
|
||||
//
|
||||
// /**
|
||||
// * 回复时间
|
||||
// */
|
||||
// @ApiModelProperty(value = "回复时间")
|
||||
// private Date replyTime;
|
||||
@ApiModelProperty(value = "评论")
|
||||
private List<QuestionCommentVo> commentList;
|
||||
|
||||
/**
|
||||
* 是否匿名
|
||||
|
@ -86,14 +76,27 @@ public class QuestionVo {
|
|||
/**
|
||||
* 提问类型 0免费 1付费
|
||||
*/
|
||||
@ApiModelProperty(value = "提问类型 0免费 1付费")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 付费金额 当提问类型为付费时必填
|
||||
*/
|
||||
@ApiModelProperty(value = "付费金额 当提问类型为付费时必填")
|
||||
private Double amount;
|
||||
|
||||
/**
|
||||
* 提问时间
|
||||
*/
|
||||
@ApiModelProperty(value = "提问时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 状态 0未解决 1已解决
|
||||
*/
|
||||
@ApiModelProperty(value = "状态 0未解决 1已解决")
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@ public class CustomTenantHandler implements TenantLineHandler {
|
|||
static {
|
||||
// 通知表
|
||||
tables.add("cc_advice");
|
||||
// 发布评论表
|
||||
tables.add("cc_comment");
|
||||
// 评论点赞表
|
||||
tables.add("cc_comment_like");
|
||||
// 社区表
|
||||
tables.add("cc_community");
|
||||
// 社区文件表
|
||||
|
@ -43,12 +39,20 @@ public class CustomTenantHandler implements TenantLineHandler {
|
|||
tables.add("cc_publish");
|
||||
// 收藏表
|
||||
tables.add("cc_publish_collect");
|
||||
// 发布评论表
|
||||
tables.add("cc_publish_comment");
|
||||
// 评论点赞表
|
||||
tables.add("cc_publish_comment_like");
|
||||
// 发布标签
|
||||
tables.add("cc_publish_label");
|
||||
// 发布点赞表
|
||||
tables.add("cc_publish_like");
|
||||
// 提问表
|
||||
tables.add("cc_question");
|
||||
// 提问评论表
|
||||
tables.add("cc_question_comment");
|
||||
// 发布举报
|
||||
tables.add("cc_report");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -65,4 +65,7 @@ public interface CommunityMapper extends BaseMapper<Community> {
|
|||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void deleteCommunity(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Community getCommunity(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -51,4 +52,12 @@ public interface CommunityUserMapper extends BaseMapper<CommunityUser> {
|
|||
List<CommunityUser> getAllCommunityUser();
|
||||
|
||||
void updateManageCommunityUser(@Param("manageCommunityUser") CommunityUser manageCommunityUser);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Date getExpireTime(@Param("tenantId") Long tenantId,
|
||||
@Param("communityId") Long communityId,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<String> getCommunityUserAvatar(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public interface IncomeInfoMapper extends BaseMapper<IncomeInfo> {
|
|||
@InterceptorIgnore(tenantLine = "true")
|
||||
IncomeAmountVo questionIncome(@Param("userId") Long userId);
|
||||
|
||||
Double totalIncome();
|
||||
Double totalIncome(@Param("userId") Long userId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<IncomeInfoListVo> incomeList(Page<IncomeInfo> page,
|
||||
|
|
|
@ -3,6 +3,7 @@ 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.CommentLikeDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -31,4 +32,8 @@ public interface PublishCommentLikeMapper extends BaseMapper<PublishCommentLike>
|
|||
@InterceptorIgnore(tenantLine = "true")
|
||||
PublishCommentLike selectLike(@Param("publishCommentLikeRes") PublishCommentLikeRes publishCommentLikeRes,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
PublishCommentLike publishCommentLike(@Param("commentLikeDetailRes") CommentLikeDetailRes commentLikeDetailRes,
|
||||
@Param("userId") Long userId);
|
||||
}
|
||||
|
|
|
@ -20,23 +20,23 @@ import java.util.List;
|
|||
public interface PublishCommentMapper extends BaseMapper<PublishComment> {
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<PublishComment> selectByTenantIdAndCommunityIdAndOperatorId(@Param("tenantId")
|
||||
List<PublishComment> selectByTenantIdAndCommunityIdAndPublishIdList(@Param("tenantId")
|
||||
Long tenantId,
|
||||
@Param("communityId")
|
||||
Long communityId,
|
||||
@Param("operatorId")
|
||||
Long operatorId);
|
||||
@Param("publishId")
|
||||
Long publishId);
|
||||
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
PublishComment selectByIdAndTenantIdAndCommunityIdAndOperatorId(@Param("id")
|
||||
PublishComment selectByIdAndTenantIdAndCommunityIdAndPublishId(@Param("id")
|
||||
Long id,
|
||||
@Param("tenantId")
|
||||
Long tenantId,
|
||||
@Param("communityId")
|
||||
Long communityId,
|
||||
@Param("operatorId")
|
||||
Long operatorId);
|
||||
@Param("publishId")
|
||||
Long publishId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Integer deleteByIdAndTenantIdAndCommunityIdAndOperatorId(@Param("id")
|
||||
|
@ -45,6 +45,6 @@ public interface PublishCommentMapper extends BaseMapper<PublishComment> {
|
|||
Long tenantId,
|
||||
@Param("communityId")
|
||||
Long communityId,
|
||||
@Param("operatorId")
|
||||
Long operatorId);
|
||||
@Param("publishId")
|
||||
Long publishId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
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.PublishLabel;
|
||||
import com.mcwl.communityCenter.domain.dto.MyPublishPageRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishLabelListRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishRemoveRes;
|
||||
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 PublishLabelMapper extends BaseMapper<PublishLabel> {
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<String> listPublishLabel(PublishLabelListRes publishLabelListRes);
|
||||
}
|
|
@ -7,6 +7,7 @@ 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.dto.PublishRemoveRes;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -43,10 +44,10 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
|||
@Param("communityId")
|
||||
Long communityId);
|
||||
|
||||
void elitePublish(@Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
||||
void elitePublish(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId, @Param("publishId") Long publishId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<Publish> publishList(Page<Publish> page, @Param("publishPageRes") PublishPageRes publishPageRes);
|
||||
List<PublishVo> publishList(Page<Publish> page, @Param("publishPageRes") PublishPageRes publishPageRes);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<PublishVo> myPublishList(Page<Publish> page,
|
||||
|
@ -55,4 +56,13 @@ public interface PublishMapper extends BaseMapper<Publish> {
|
|||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void insertPublish(@Param("publish") Publish publish);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Publish getLastPublish(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void removePublish(@Param("publishRemoveRes") PublishRemoveRes publishRemoveRes);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void updateLikeNum(@Param("publish") Publish publish);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
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.PublishReport;
|
||||
import com.mcwl.communityCenter.domain.dto.EditPublishReportStatusRes;
|
||||
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 java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PublishReportMapper extends BaseMapper<PublishReport> {
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void insertReport(@Param("publishReport") PublishReport publishReport);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void updateStatus(@Param("editPublishReportStatusRes") EditPublishReportStatusRes editPublishReportStatusRes);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
void deleteReportById(@Param("id") Long id);
|
||||
}
|
|
@ -6,10 +6,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.mcwl.communityCenter.domain.Publish;
|
||||
import com.mcwl.communityCenter.domain.Question;
|
||||
import com.mcwl.communityCenter.domain.QuestionComment;
|
||||
import com.mcwl.communityCenter.domain.dto.QuestionDetailRes;
|
||||
import com.mcwl.communityCenter.domain.vo.QuestionCommentVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface QuestionCommentMapper extends BaseMapper<QuestionComment> {
|
||||
|
@ -33,4 +36,7 @@ public interface QuestionCommentMapper extends BaseMapper<QuestionComment> {
|
|||
Long questionId,
|
||||
@Param("commentId")
|
||||
Long commentId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<QuestionCommentVo> getComment(@Param("questionDetailRes") QuestionDetailRes questionDetailRes);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ 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 com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -15,13 +16,13 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface QuestionMapper extends BaseMapper<Question> {
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Page<Question> list(Page<Question> page,
|
||||
@NotNull(message = "租户不能为空")
|
||||
@Param("tenantId")
|
||||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId);
|
||||
List<QuestionVo> list(Page<Question> page,
|
||||
@NotNull(message = "租户不能为空")
|
||||
@Param("tenantId")
|
||||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Question selectByIdAndTenantIdAndCommunityId(@Param("id")
|
||||
|
@ -33,15 +34,15 @@ public interface QuestionMapper extends BaseMapper<Question> {
|
|||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Page<Question> listImage(Page<Question> page,
|
||||
@NotNull(message = "租户不能为空")
|
||||
@Param("tenantId")
|
||||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId);
|
||||
@NotNull(message = "租户不能为空")
|
||||
@Param("tenantId")
|
||||
Long tenantId,
|
||||
@NotNull(message = "社区不能为空")
|
||||
@Param("communityId")
|
||||
Long communityId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<Question> myQuestionList(Page<Question> page,
|
||||
List<QuestionVo> myQuestionList(Page<Question> page,
|
||||
@Param("questionPageRes") QuestionPageRes questionPageRes,
|
||||
@Param("userId") Long userId);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public interface CommunityService extends IService<Community> {
|
|||
*/
|
||||
R<Object> isJoinCommunity(JoinCommunityRes joinCommunityRes);
|
||||
|
||||
CommunityDetailVo getCommunityDetail(Long communityId);
|
||||
CommunityDetailVo getCommunityDetail(Long tenantId, Long communityId);
|
||||
|
||||
void editCommunity(@Valid EditCommunityRes editCommunityRes);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.mcwl.communityCenter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentLikeDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -19,5 +21,7 @@ import javax.validation.constraints.NotNull;
|
|||
@Service
|
||||
public interface PublishCommentLikeService extends IService<PublishCommentLike> {
|
||||
|
||||
void like(PublishCommentLikeRes publishCommentLikeRes);
|
||||
R<Integer> like(PublishCommentLikeRes publishCommentLikeRes);
|
||||
|
||||
PublishCommentLike publishCommentLike(CommentLikeDetailRes commentLikeDetailRes, Long userId);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.mcwl.communityCenter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
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.domain.PublishComment;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.mcwl.communityCenter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
import com.mcwl.communityCenter.domain.Publish;
|
||||
import com.mcwl.communityCenter.domain.PublishLabel;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
public interface PublishLabelService extends IService<PublishLabel> {
|
||||
|
||||
|
||||
List<String> listPublishLabel(PublishLabelListRes publishLabelListRes);
|
||||
|
||||
void addPublishLabel(PublishLabelAddRes publishLabelAddRes);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.mcwl.communityCenter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
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.Publish;
|
||||
import com.mcwl.communityCenter.domain.PublishReport;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public interface PublishReportService extends IService<PublishReport> {
|
||||
|
||||
void saveReport(PublishReport publishReport);
|
||||
|
||||
TableDataInfo getReportList(@Valid PageDomain pageDomain);
|
||||
|
||||
void updateStatus(@Valid EditPublishReportStatusRes editPublishReportStatusRes);
|
||||
|
||||
void removeReportById(Long id);
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.mcwl.communityCenter.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
import com.mcwl.common.core.domain.BaseEntity;
|
||||
import com.mcwl.common.core.domain.R;
|
||||
import com.mcwl.common.core.page.PageDomain;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
|
@ -30,7 +31,7 @@ public interface PublishService extends IService<Publish> {
|
|||
|
||||
TableDataInfo publishFile(@Valid PublishPageRes publishPageRes);
|
||||
|
||||
void elitePublish(Long communityId, Long publishId);
|
||||
R<Object> elitePublish(Long tenantId, Long communityId, Long publishId);
|
||||
|
||||
TableDataInfo publishList(PublishPageRes publishPageRes);
|
||||
|
||||
|
@ -39,4 +40,10 @@ public interface PublishService extends IService<Publish> {
|
|||
void collectPublish(@Valid PublishCollectRes publishCollectRes);
|
||||
|
||||
TableDataInfo getPersonHomeList(@Valid PersonHomePageRes personHomePageRes);
|
||||
|
||||
void reportPublish(@Valid PublishReportRes publishReportRes);
|
||||
|
||||
Publish getLastPublish(Long tenantId, Long communityId);
|
||||
|
||||
R<Object> removePublish(@Valid PublishRemoveRes publishRemoveRes);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,11 @@ import com.mcwl.common.core.page.TableDataInfo;
|
|||
import com.mcwl.communityCenter.domain.Question;
|
||||
import com.mcwl.communityCenter.domain.QuestionComment;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.QuestionCommentVo;
|
||||
import com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
public interface QuestionCommentService extends IService<QuestionComment> {
|
||||
|
||||
|
@ -18,4 +20,6 @@ public interface QuestionCommentService extends IService<QuestionComment> {
|
|||
TableDataInfo listByPage(@Valid QuestionCommentPageRes questionCommentPageRes);
|
||||
|
||||
R<Object> adopt(@Valid QuestionCommentAdoptRes questionCommentAdoptRes);
|
||||
|
||||
List<QuestionCommentVo> getComment(QuestionDetailRes questionDetailRes);
|
||||
}
|
||||
|
|
|
@ -14,9 +14,7 @@ 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.*;
|
||||
import com.mcwl.communityCenter.domain.dto.*;
|
||||
import com.mcwl.communityCenter.domain.vo.CommunityDetailVo;
|
||||
import com.mcwl.communityCenter.domain.vo.CommunityVo;
|
||||
|
@ -24,17 +22,26 @@ import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
|
|||
import com.mcwl.communityCenter.mapper.CommunityMapper;
|
||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||
import com.mcwl.communityCenter.service.CommunityService;
|
||||
import com.mcwl.communityCenter.service.IncomeInfoService;
|
||||
import com.mcwl.communityCenter.service.PublishService;
|
||||
import com.mcwl.myInvitation.domain.CommissionRatio;
|
||||
import com.mcwl.myInvitation.domain.Consume;
|
||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
||||
import com.mcwl.myInvitation.service.CommissionRatioService;
|
||||
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.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
|
@ -48,6 +55,15 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
|
||||
private final CommunityAdviceMapper communityAdviceMapper;
|
||||
|
||||
private final PublishService publishService;
|
||||
|
||||
private final ConsumeMapper consumeMapper;
|
||||
|
||||
private final IncomeInfoService incomeInfoService;
|
||||
|
||||
private final CommissionRatioService commissionRatioService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo listByPage(CommunityListPageRes communityListPageRes) {
|
||||
|
@ -87,6 +103,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
.userId(SecurityUtils.getUserId())
|
||||
.userType(2)
|
||||
.build());
|
||||
redisCache.deleteObject("communityJoinNumMap");
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage(), HttpStatus.SHOW_ERROR_MSG);
|
||||
|
@ -106,7 +123,7 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
Long communityId = joinCommunityRes.getCommunityId();
|
||||
Community community = baseMapper.getByTenantIdAndCommunityId(tenantId, communityId);
|
||||
if (Objects.isNull(community)) {
|
||||
return R.fail("社区不存在,请重新加入");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"社区不存在,请重新加入");
|
||||
}
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectByTenantIdAndCommunityIdAndUserId(tenantId,
|
||||
|
@ -114,14 +131,14 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
SecurityUtils.getUserId());
|
||||
|
||||
if (Objects.nonNull(communityUser)) {
|
||||
return R.fail("您已加入该社区,不能重复加入");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您已加入该社区,不能重复加入");
|
||||
}
|
||||
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
SysUser user = sysUserService.selectUserById(SecurityUtils.getUserId());
|
||||
Double wallet = user.getWallet();
|
||||
Double price = community.getPrice();
|
||||
if (wallet < price) {
|
||||
return R.fail("钱包余额不足,请充值");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"钱包余额不足,请充值");
|
||||
}
|
||||
// 扣费
|
||||
BigDecimal priceBigDecimal = new BigDecimal(price.toString());
|
||||
|
@ -130,6 +147,29 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
|
||||
sysUserService.updateUser(user);
|
||||
|
||||
|
||||
|
||||
// 从redis获取提成比例
|
||||
// 抽取社区比例
|
||||
String commissionRationCommunity = redisCache.getCacheObject("CommissionRationCommunity");
|
||||
if (Objects.isNull(commissionRationCommunity)) {
|
||||
CommissionRatio commissionRatio = commissionRatioService.lambdaQuery()
|
||||
.eq(CommissionRatio::getType, 2)
|
||||
.one();
|
||||
commissionRationCommunity = commissionRatio.getRatio().toString();
|
||||
redisCache.setCacheObject("CommissionRationCommunity", commissionRationCommunity);
|
||||
}
|
||||
|
||||
SysUser tenantUser = sysUserService.selectUserById(tenantId);
|
||||
BigDecimal getWallet = priceBigDecimal
|
||||
.multiply(new BigDecimal("1").subtract(new BigDecimal(commissionRationCommunity)));
|
||||
tenantUser.setWallet(getWallet
|
||||
.add(new BigDecimal(tenantUser.getWallet().toString()))
|
||||
.setScale(2, RoundingMode.HALF_UP)
|
||||
.doubleValue());
|
||||
sysUserService.updateUser(tenantUser);
|
||||
|
||||
|
||||
Calendar now = Calendar.getInstance();
|
||||
Date startTime = now.getTime();
|
||||
now.add(Calendar.YEAR, community.getValidityDay());
|
||||
|
@ -158,9 +198,36 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
communityAdvice.setAdviceType(AdviceConstant.COMMUNITY_NOTICE);
|
||||
communityAdvice.setUserId(tenantId);
|
||||
communityAdvice.setContent(StringUtils.format("{}加入{}社区,金币+{}",
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(), community.getCommunityName(), price));
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(), community.getCommunityName(), getWallet));
|
||||
communityAdviceMapper.insert(communityAdvice);
|
||||
|
||||
Consume consume = new Consume();
|
||||
consume.setUserId(SecurityUtils.getUserId());
|
||||
consume.setAmount(-price);
|
||||
consume.setProductId(communityId);
|
||||
consume.setType(3);
|
||||
consume.setWallet(user.getWallet());
|
||||
consumeMapper.insert(consume);
|
||||
|
||||
consume = new Consume();
|
||||
consume.setUserId(community.getTenantId());
|
||||
consume.setAmount(getWallet.doubleValue());
|
||||
consume.setProductId(communityId);
|
||||
consume.setType(3);
|
||||
consume.setWallet(sysUserService.selectUserById(community.getTenantId()).getWallet());
|
||||
consumeMapper.insert(consume);
|
||||
|
||||
IncomeInfo incomeInfo = new IncomeInfo();
|
||||
incomeInfo.setTenantId(tenantId);
|
||||
incomeInfo.setCommunityId(communityId);
|
||||
incomeInfo.setUserId(tenantId);
|
||||
incomeInfo.setType(0);
|
||||
incomeInfo.setAmount(getWallet.doubleValue());
|
||||
incomeInfoService.save(incomeInfo);
|
||||
|
||||
redisCache.deleteObject("communityJoinNumMap");
|
||||
|
||||
|
||||
return R.ok("加入成功");
|
||||
}
|
||||
|
||||
|
@ -194,19 +261,21 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, userId);
|
||||
if (Objects.isNull(communityUser)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"您不是该社区成员");
|
||||
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,"社区还有成员,无法退出");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "社区还有成员,无法退出");
|
||||
}
|
||||
|
||||
baseMapper.quitCommunity(tenantId, communityId, userId);
|
||||
|
||||
if (communityJoinNum == 1) {
|
||||
baseMapper.deleteCommunity(tenantId, communityId);
|
||||
} else {
|
||||
redisCache.deleteObject("communityJoinNumMap");
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
|
@ -219,9 +288,41 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
}
|
||||
|
||||
@Override
|
||||
public CommunityDetailVo getCommunityDetail(Long communityId) {
|
||||
Community community = baseMapper.selectById(communityId);
|
||||
return BeanUtil.toBean(community, CommunityDetailVo.class);
|
||||
public CommunityDetailVo getCommunityDetail(Long tenantId, Long communityId) {
|
||||
// Community community = baseMapper.selectById(communityId);
|
||||
|
||||
Community community = baseMapper.getCommunity(tenantId, communityId);
|
||||
|
||||
CommunityDetailVo communityDetailVo = BeanUtil.toBean(community, CommunityDetailVo.class);
|
||||
|
||||
communityDetailVo.setUserNum(getCommunityJoinNum(communityId));
|
||||
communityDetailVo.setUpdateNum(getCommunityPublishNum(communityId));
|
||||
|
||||
|
||||
// 当前时间和创建时间差
|
||||
LocalDate currentLocalDate = LocalDate.now(ZoneId.systemDefault());
|
||||
LocalDate createLocalDate = community.getCreateTime().toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
long daysBetween = ChronoUnit.DAYS.between(createLocalDate, currentLocalDate);
|
||||
|
||||
communityDetailVo.setCreateDay(daysBetween);
|
||||
|
||||
Publish lastPublish = publishService.getLastPublish(tenantId, communityId);
|
||||
if (Objects.nonNull(lastPublish)) {
|
||||
communityDetailVo.setLastUpdateTime(lastPublish.getCreateTime());
|
||||
} else {
|
||||
communityDetailVo.setLastUpdateTime(community.getCreateTime());
|
||||
}
|
||||
|
||||
List<String> avatarList = communityUserMapper.getCommunityUserAvatar(tenantId, communityId);
|
||||
communityDetailVo.setAvatarList(avatarList);
|
||||
|
||||
// 获取当前用户到期时间
|
||||
communityDetailVo.setExpireTime(communityUserMapper.getExpireTime(tenantId, communityId, SecurityUtils.getUserId()));
|
||||
|
||||
|
||||
return communityDetailVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -232,36 +333,12 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
|
||||
private TableDataInfo getCommunityVoTableDataInfo(List<Community> communityList, Long total) {
|
||||
|
||||
List<Community> myJoinCommunityList = baseMapper.getMyJoinCommunity(new Page<>(1, 100),
|
||||
SecurityUtils.getUserId(),
|
||||
JoinCommunityListPageRes.builder().isMyCreate(1).build());
|
||||
|
||||
// 查询社区加入人数,以map形式返回,key为社区id,value为加入人数
|
||||
Map<String, Object> communityJoinNumMap = redisCache.getCacheMap("communityJoinNumMap");
|
||||
if (communityJoinNumMap.isEmpty()) {
|
||||
Map<Long, Map<String, Object>> joinMap = baseMapper.selectCommunityJoinNum();
|
||||
if (joinMap != null && !joinMap.isEmpty()) {
|
||||
joinMap.forEach((key, value) -> {
|
||||
communityJoinNumMap.put(key.toString(), Integer.valueOf(value.get("joinNum").toString()));
|
||||
});
|
||||
redisCache.setCacheMap("communityJoinNumMap", communityJoinNumMap);
|
||||
} else {
|
||||
redisCache.setCacheMap("communityJoinNumMap", new HashMap<>());
|
||||
}
|
||||
redisCache.expire("communityJoinNumMap", 1, TimeUnit.HOURS);
|
||||
}
|
||||
|
||||
// 查询社区发布数,以map形式返回,key为社区id,value为发布数
|
||||
Map<String, Object> communityPublishNumMap = redisCache.getCacheMap("communityPublishNumMap");
|
||||
if (communityPublishNumMap.isEmpty()) {
|
||||
Map<Long, Map<String, Object>> publishMap = baseMapper.selectCommunityPublishNum();
|
||||
if (publishMap != null && !publishMap.isEmpty()) {
|
||||
publishMap.forEach((key, value) -> {
|
||||
communityPublishNumMap.put(key.toString(), Integer.valueOf(value.get("publishNum").toString()));
|
||||
});
|
||||
redisCache.setCacheMap("communityPublishNumMap", communityPublishNumMap);
|
||||
} else {
|
||||
redisCache.setCacheMap("communityPublishNumMap", new HashMap<>());
|
||||
}
|
||||
redisCache.expire("communityPublishNumMap", 1, TimeUnit.HOURS);
|
||||
}
|
||||
Map<Long, Community> myJoinCommunityMap = myJoinCommunityList.stream()
|
||||
.collect(Collectors.toMap(Community::getId, Function.identity()));
|
||||
|
||||
|
||||
List<CommunityVo> communityVoList = new ArrayList<>();
|
||||
|
@ -284,8 +361,15 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
communityVo.setAvatar(sysUser.getAvatar());
|
||||
communityVo.setNickName(sysUser.getNickName());
|
||||
communityVo.setCreateDay(daysBetween);
|
||||
communityVo.setJoinNum((Integer) communityJoinNumMap.getOrDefault(community.getId().toString(), 0));
|
||||
communityVo.setPublishNum((Integer) communityPublishNumMap.getOrDefault(community.getId().toString(), 0));
|
||||
communityVo.setJoinNum(this.getCommunityJoinNum(community.getId()));
|
||||
// communityVo.setPublishNum(this.getCommunityPublishNum(community.getId()));
|
||||
if (myJoinCommunityMap.get(community.getId()) != null) {
|
||||
communityVo.setIsJoin(1);
|
||||
} else {
|
||||
communityVo.setIsJoin(0);
|
||||
}
|
||||
|
||||
|
||||
communityVoList.add(communityVo);
|
||||
}
|
||||
|
||||
|
@ -299,4 +383,43 @@ public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community
|
|||
}
|
||||
|
||||
|
||||
private int getCommunityJoinNum(Long communityId) {
|
||||
// 查询社区加入人数,以map形式返回,key为社区id,value为加入人数
|
||||
Map<String, Object> communityJoinNumMap = redisCache.getCacheMap("communityJoinNumMap");
|
||||
if (communityJoinNumMap.isEmpty()) {
|
||||
Map<Long, Map<String, Object>> joinMap = baseMapper.selectCommunityJoinNum();
|
||||
if (joinMap != null && !joinMap.isEmpty()) {
|
||||
joinMap.forEach((key, value) -> {
|
||||
communityJoinNumMap.put(key.toString(), Integer.valueOf(value.get("joinNum").toString()));
|
||||
});
|
||||
redisCache.setCacheMap("communityJoinNumMap", communityJoinNumMap);
|
||||
} else {
|
||||
redisCache.setCacheMap("communityJoinNumMap", new HashMap<>());
|
||||
}
|
||||
redisCache.expire("communityJoinNumMap", 1, TimeUnit.HOURS);
|
||||
}
|
||||
return Integer.parseInt(communityJoinNumMap.getOrDefault(communityId.toString(), 0).toString());
|
||||
|
||||
}
|
||||
|
||||
private int getCommunityPublishNum(Long communityId) {
|
||||
// 查询社区发布数,以map形式返回,key为社区id,value为发布数
|
||||
Map<String, Object> communityPublishNumMap = redisCache.getCacheMap("communityPublishNumMap");
|
||||
if (communityPublishNumMap.isEmpty()) {
|
||||
Map<Long, Map<String, Object>> publishMap = baseMapper.selectCommunityPublishNum();
|
||||
if (publishMap != null && !publishMap.isEmpty()) {
|
||||
publishMap.forEach((key, value) -> {
|
||||
communityPublishNumMap.put(key.toString(), Integer.valueOf(value.get("publishNum").toString()));
|
||||
});
|
||||
redisCache.setCacheMap("communityPublishNumMap", communityPublishNumMap);
|
||||
} else {
|
||||
redisCache.setCacheMap("communityPublishNumMap", new HashMap<>());
|
||||
}
|
||||
redisCache.expire("communityPublishNumMap", 1, TimeUnit.HOURS);
|
||||
}
|
||||
return Integer.parseInt(communityPublishNumMap.getOrDefault(communityId.toString(), 0).toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class IncomeInfoServiceImpl extends ServiceImpl<IncomeInfoMapper, IncomeI
|
|||
IncomeAmountVo questionIncome = baseMapper.questionIncome(SecurityUtils.getUserId());
|
||||
|
||||
// 累计收益
|
||||
Double totalIncome = baseMapper.totalIncome();
|
||||
Double totalIncome = baseMapper.totalIncome(SecurityUtils.getUserId());
|
||||
|
||||
IncomeInfoVo incomeInfoVo = IncomeInfoVo.builder()
|
||||
.communityIncome(communityIncome)
|
||||
|
|
|
@ -10,18 +10,12 @@ 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.*;
|
||||
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.mapper.*;
|
||||
import com.mcwl.communityCenter.service.PublishCollectService;
|
||||
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||
import com.mcwl.communityCenter.service.PublishService;
|
||||
|
@ -37,6 +31,8 @@ public class PublishCollectServiceImpl extends ServiceImpl<PublishCollectMapper,
|
|||
|
||||
private final PublishCommentService publishCommentService;
|
||||
|
||||
private final PublishLikeMapper publishLikeMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo myCollectList(MyPublishCollectPageRes myPublishCollectPageRes) {
|
||||
|
@ -48,10 +44,27 @@ public class PublishCollectServiceImpl extends ServiceImpl<PublishCollectMapper,
|
|||
for (PublishVo publishVo : publishVoList) {
|
||||
PersonHomeVo personHomeVo = BeanUtil.toBean(publishVo, PersonHomeVo.class);
|
||||
|
||||
PublishLikeRes publishLikeRes = new PublishLikeRes();
|
||||
publishLikeRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
||||
publishLikeRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
||||
publishLikeRes.setPublishId(publishVo.getId());
|
||||
PublishLike publishLike = publishLikeMapper.selectPublishLike(publishLikeRes, SecurityUtils.getUserId());
|
||||
if (Objects.nonNull(publishLike)) {
|
||||
String delFlag = publishLike.getDelFlag();
|
||||
if ("0".equals(delFlag)) {
|
||||
publishVo.setIsLike(1);
|
||||
} else {
|
||||
publishVo.setIsLike(0);
|
||||
}
|
||||
} else {
|
||||
publishVo.setIsLike(0);
|
||||
}
|
||||
|
||||
|
||||
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
||||
commentDetailRes.setTenantId(myPublishCollectPageRes.getTenantId());
|
||||
commentDetailRes.setCommunityId(myPublishCollectPageRes.getCommunityId());
|
||||
commentDetailRes.setOperatorId(publishVo.getId());
|
||||
commentDetailRes.setPublishId(publishVo.getId());
|
||||
|
||||
List<CommentVo> commentVoList = publishCommentService.getComment(commentDetailRes).getData();
|
||||
personHomeVo.setCommentList(commentVoList);
|
||||
|
|
|
@ -2,18 +2,23 @@ package com.mcwl.communityCenter.service.impl;
|
|||
|
||||
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.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.*;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentLikeDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.PublishCommentLikeRes;
|
||||
import com.mcwl.communityCenter.mapper.CommunityAdviceMapper;
|
||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||
import com.mcwl.communityCenter.mapper.PublishCommentLikeMapper;
|
||||
import com.mcwl.communityCenter.mapper.PublishCommentMapper;
|
||||
import com.mcwl.communityCenter.service.CommunityAdviceService;
|
||||
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
||||
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.bytebuddy.implementation.bytecode.Throw;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -33,14 +38,90 @@ import java.util.Objects;
|
|||
@RequiredArgsConstructor
|
||||
public class PublishCommentLikeServiceImpl extends ServiceImpl<PublishCommentLikeMapper, PublishCommentLike> implements PublishCommentLikeService {
|
||||
|
||||
|
||||
private final PublishCommentMapper publishCommentMapper;
|
||||
|
||||
private final CommunityUserMapper communityUserMapper;
|
||||
|
||||
private final CommunityAdviceMapper communityAdviceMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void like(PublishCommentLikeRes publishCommentLikeRes) {
|
||||
public R<Integer> like(PublishCommentLikeRes publishCommentLikeRes) {
|
||||
Long tenantId = publishCommentLikeRes.getTenantId();
|
||||
Long communityId = publishCommentLikeRes.getCommunityId();
|
||||
Long publishId = publishCommentLikeRes.getPublishId();
|
||||
Long commentId = publishCommentLikeRes.getCommentId();
|
||||
|
||||
PublishComment publishComment = publishCommentMapper.selectByIdAndTenantIdAndCommunityIdAndPublishId(commentId, tenantId, communityId, publishId);
|
||||
|
||||
if (Objects.isNull(publishComment)) {
|
||||
throw new ServiceException("点赞失败,该内容不存在", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId,
|
||||
communityId, SecurityUtils.getUserId());
|
||||
|
||||
if (Objects.isNull(communityUser)) {
|
||||
throw new ServiceException("点赞失败,您不是该社区成员", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
if ("1".equals(communityUser.getIsBlack())) {
|
||||
throw new ServiceException("点赞失败,您已被拉黑", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
PublishCommentLike publishCommentLike = baseMapper.selectLike(publishCommentLikeRes, SecurityUtils.getUserId());
|
||||
|
||||
if (Objects.isNull(publishCommentLike)) {
|
||||
publishCommentLike = new PublishCommentLike();
|
||||
publishCommentLike.setTenantId(tenantId);
|
||||
publishCommentLike.setCommunityId(communityId);
|
||||
publishCommentLike.setPublishId(publishId);
|
||||
publishCommentLike.setPublishCommentId(commentId);
|
||||
publishCommentLike.setUserId(SecurityUtils.getUserId());
|
||||
baseMapper.insert(publishCommentLike);
|
||||
|
||||
publishComment.setLikeNum(publishComment.getLikeNum() + 1);
|
||||
publishCommentMapper.updateById(publishComment);
|
||||
this.addLikeAdvice(publishComment);
|
||||
return R.ok(publishComment.getLikeNum());
|
||||
}
|
||||
|
||||
if (Objects.equals(publishCommentLike.getDelFlag(), "0")) {
|
||||
publishCommentLike.setDelFlag("2");
|
||||
int likeNum = publishComment.getLikeNum() - 1;
|
||||
likeNum = Math.max(likeNum, 0);
|
||||
publishComment.setLikeNum(likeNum);
|
||||
} else {
|
||||
publishCommentLike.setDelFlag("0");
|
||||
publishComment.setLikeNum(publishComment.getLikeNum() + 1);
|
||||
this.addLikeAdvice(publishComment);
|
||||
}
|
||||
|
||||
baseMapper.updateDelFlagById(publishCommentLike);
|
||||
publishCommentMapper.updateById(publishComment);
|
||||
|
||||
return R.ok(publishComment.getLikeNum());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PublishCommentLike publishCommentLike(CommentLikeDetailRes commentLikeDetailRes, Long userId) {
|
||||
return baseMapper.publishCommentLike(commentLikeDetailRes, userId);
|
||||
}
|
||||
|
||||
private void addLikeAdvice(PublishComment publishComment) {
|
||||
CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||
|
||||
communityAdvice.setTenantId(publishComment.getTenantId());
|
||||
communityAdvice.setCommunityId(publishComment.getCommunityId());
|
||||
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
communityAdvice.setAdviceType(AdviceConstant.LIKE);
|
||||
communityAdvice.setUserId(publishComment.getUserId());
|
||||
communityAdvice.setContent(StringUtils.format("{}点赞了你的评论{}",
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(), publishComment.getContent()));
|
||||
|
||||
communityAdviceMapper.insert(communityAdvice);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,36 +1,30 @@
|
|||
package com.mcwl.communityCenter.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.domain.entity.SysUser;
|
||||
import com.mcwl.common.utils.SecurityUtils;
|
||||
import com.mcwl.communityCenter.domain.CommunityUser;
|
||||
import com.mcwl.communityCenter.domain.Publish;
|
||||
import com.mcwl.communityCenter.domain.*;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentDelRes;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentLikeDetailRes;
|
||||
import com.mcwl.communityCenter.domain.dto.CommentRes;
|
||||
import com.mcwl.communityCenter.domain.vo.CommentVo;
|
||||
import com.mcwl.communityCenter.domain.PublishComment;
|
||||
import com.mcwl.communityCenter.domain.PublishCommentLike;
|
||||
import com.mcwl.communityCenter.mapper.CommunityUserMapper;
|
||||
import com.mcwl.communityCenter.mapper.PublishCommentLikeMapper;
|
||||
import com.mcwl.communityCenter.mapper.PublishCommentMapper;
|
||||
import com.mcwl.communityCenter.mapper.PublishMapper;
|
||||
import com.mcwl.communityCenter.service.PublishCommentLikeService;
|
||||
import com.mcwl.communityCenter.service.PublishCommentService;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 评论区业务层
|
||||
|
@ -48,31 +42,69 @@ public class PublishCommentServiceImpl extends ServiceImpl<PublishCommentMapper,
|
|||
|
||||
private final PublishCommentMapper publishCommentMapper;
|
||||
|
||||
private final PublishCommentLikeMapper likeMapper;
|
||||
|
||||
private final ISysUserService sysUserService;
|
||||
|
||||
private final PublishMapper publishMapper;
|
||||
|
||||
private final CommunityUserMapper communityUserMapper;
|
||||
|
||||
private final PublishCommentLikeService publishCommentLikeService;
|
||||
|
||||
@Override
|
||||
public R<List<CommentVo>> getComment(CommentDetailRes commentDetailRes) {
|
||||
Long tenantId = commentDetailRes.getTenantId();
|
||||
Long communityId = commentDetailRes.getCommunityId();
|
||||
Long operatorId = commentDetailRes.getOperatorId();
|
||||
Long publishId = commentDetailRes.getPublishId();
|
||||
|
||||
// 查询评论
|
||||
List<PublishComment> publishComment = publishCommentMapper
|
||||
.selectByTenantIdAndCommunityIdAndOperatorId(tenantId, communityId, operatorId);
|
||||
.selectByTenantIdAndCommunityIdAndPublishIdList(tenantId, communityId, publishId);
|
||||
|
||||
List<CommentVo> commentVoList = BeanUtil.copyToList(publishComment, CommentVo.class);
|
||||
|
||||
Map<Long, CommentVo> commentVoMap = commentVoList.stream()
|
||||
.collect(Collectors.toMap(CommentVo::getId, Function.identity()));
|
||||
|
||||
// 收集所有需要查询的用户ID(包括回复对象ID)
|
||||
Set<Long> userIds = new HashSet<>();
|
||||
for (CommentVo commentVo : commentVoList) {
|
||||
userIds.add(commentVo.getUserId());
|
||||
}
|
||||
// 批量查询用户信息并建立缓存映射
|
||||
Map<Long, SysUser> userMap = sysUserService.selectUserByIds(userIds).stream()
|
||||
.collect(Collectors.toMap(SysUser::getUserId, Function.identity()));
|
||||
|
||||
for (CommentVo commentVo : commentVoList) {
|
||||
Long userId = commentVo.getUserId();
|
||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||
SysUser sysUser = userMap.get(userId);
|
||||
commentVo.setUserName(sysUser.getNickName());
|
||||
commentVo.setUserAvatar(sysUser.getAvatar());
|
||||
|
||||
if (commentVo.getParentId() != null) {
|
||||
Long parentId = commentVo.getParentId();
|
||||
CommentVo parentCommentVo = commentVoMap.get(parentId);
|
||||
if (Objects.nonNull(parentCommentVo)) {
|
||||
SysUser su = userMap.get(parentCommentVo.getUserId());
|
||||
commentVo.setReplyUserName(su.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
CommentLikeDetailRes commentLikeDetailRes = new CommentLikeDetailRes();
|
||||
commentLikeDetailRes.setTenantId(tenantId);
|
||||
commentLikeDetailRes.setCommunityId(communityId);
|
||||
commentLikeDetailRes.setPublishId(publishId);
|
||||
commentLikeDetailRes.setPublishCommentId(commentVo.getId());
|
||||
PublishCommentLike publishCommentLike = publishCommentLikeService.publishCommentLike(commentLikeDetailRes, SecurityUtils.getUserId());
|
||||
if (Objects.isNull(publishCommentLike)) {
|
||||
commentVo.setIsLike(0);
|
||||
} else {
|
||||
String delFlag = publishCommentLike.getDelFlag();
|
||||
if (Objects.equals(delFlag, "0")) {
|
||||
commentVo.setIsLike(1);
|
||||
} else {
|
||||
commentVo.setIsLike(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(commentVoList);
|
||||
|
@ -82,28 +114,27 @@ public class PublishCommentServiceImpl extends ServiceImpl<PublishCommentMapper,
|
|||
public R<Object> addComment(CommentRes commentRes) {
|
||||
Long tenantId = commentRes.getTenantId();
|
||||
Long communityId = commentRes.getCommunityId();
|
||||
Long operatorId = commentRes.getOperatorId();
|
||||
Long publishId = commentRes.getPublishId();
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, SecurityUtils.getUserId());
|
||||
|
||||
if (Objects.isNull(communityUser)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"评论失败,您不是该社区成员");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "评论失败,您不是该社区成员");
|
||||
}
|
||||
|
||||
if ("1".equals(communityUser.getIsBlack())) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"评论失败,您已被拉黑");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "评论失败,您已被拉黑");
|
||||
}
|
||||
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(operatorId, tenantId, communityId);
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishId, tenantId, communityId);
|
||||
if (Objects.isNull(publish)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"评论失败,该内容不存在");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "评论失败,该内容不存在");
|
||||
}
|
||||
|
||||
PublishComment publishComment = new PublishComment();
|
||||
BeanUtil.copyProperties(commentRes, publishComment);
|
||||
publishComment.setPublishId(operatorId);
|
||||
// publishComment.setPublishId(publishId);
|
||||
publishComment.setUserId(SecurityUtils.getUserId());
|
||||
publishComment.setType(0);
|
||||
|
||||
publishCommentMapper.insert(publishComment);
|
||||
|
||||
|
@ -115,15 +146,15 @@ public class PublishCommentServiceImpl extends ServiceImpl<PublishCommentMapper,
|
|||
Long id = commentDelRes.getId();
|
||||
Long tenantId = commentDelRes.getTenantId();
|
||||
Long communityId = commentDelRes.getCommunityId();
|
||||
Long operatorId = commentDelRes.getOperatorId();
|
||||
Long publishId = commentDelRes.getPublishId();
|
||||
|
||||
PublishComment publishComment = publishCommentMapper.selectByIdAndTenantIdAndCommunityIdAndOperatorId(id, tenantId, communityId, operatorId);
|
||||
PublishComment publishComment = publishCommentMapper.selectByIdAndTenantIdAndCommunityIdAndPublishId(id, tenantId, communityId, publishId);
|
||||
|
||||
if (Objects.isNull(publishComment)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"删除失败,该评论不存在");
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "删除失败,该评论不存在");
|
||||
}
|
||||
|
||||
publishCommentMapper.deleteByIdAndTenantIdAndCommunityIdAndOperatorId(id, tenantId, communityId, operatorId);
|
||||
publishCommentMapper.deleteByIdAndTenantIdAndCommunityIdAndOperatorId(id, tenantId, communityId, publishId);
|
||||
|
||||
return R.ok(null, "删除成功");
|
||||
}
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
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.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.*;
|
||||
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.*;
|
||||
import com.mcwl.communityCenter.service.*;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class PublishLabelServiceImpl extends ServiceImpl<PublishLabelMapper, PublishLabel> implements PublishLabelService {
|
||||
|
||||
private final CommunityUserMapper communityUserMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> listPublishLabel(PublishLabelListRes publishLabelListRes) {
|
||||
|
||||
|
||||
return baseMapper.listPublishLabel(publishLabelListRes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPublishLabel(PublishLabelAddRes publishLabelAddRes) {
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(publishLabelAddRes.getTenantId(),
|
||||
publishLabelAddRes.getCommunityId(), SecurityUtils.getUserId());
|
||||
|
||||
if (communityUser == null) {
|
||||
throw new ServiceException("您不是该社区的成员,无法添加标签", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
if (communityUser.getUserType() != 2) {
|
||||
throw new ServiceException("您不是星主,无法添加标签", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
PublishLabelListRes publishLabelListRes = BeanUtil.copyProperties(publishLabelAddRes, PublishLabelListRes.class);
|
||||
List<String> publishLabelList = this.listPublishLabel(publishLabelListRes);
|
||||
if (publishLabelList.size() >= 3) {
|
||||
throw new ServiceException("最多只能添加三个标签", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
PublishLabel publishLabel = BeanUtil.copyProperties(publishLabelAddRes, PublishLabel.class);
|
||||
baseMapper.insert(publishLabel);
|
||||
|
||||
}
|
||||
}
|
|
@ -35,17 +35,20 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
|||
@Override
|
||||
public void like(PublishLikeRes publishLikeRes) {
|
||||
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishLikeRes.getPublishId(),
|
||||
publishLikeRes.getTenantId(),
|
||||
publishLikeRes.getCommunityId());
|
||||
Long publishId = publishLikeRes.getPublishId();
|
||||
Long tenantId = publishLikeRes.getTenantId();
|
||||
Long communityId = publishLikeRes.getCommunityId();
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishId,
|
||||
tenantId,
|
||||
communityId);
|
||||
|
||||
if (Objects.isNull(publish)) {
|
||||
throw new ServiceException("点赞失败,该内容不存在", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(publishLikeRes.getTenantId(),
|
||||
publishLikeRes.getCommunityId(), SecurityUtils.getUserId());
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId,
|
||||
communityId, SecurityUtils.getUserId());
|
||||
|
||||
if (Objects.isNull(communityUser)) {
|
||||
throw new ServiceException("点赞失败,您不是该社区成员", HttpStatus.SHOW_ERROR_MSG);
|
||||
|
@ -60,20 +63,20 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
|||
|
||||
if (Objects.isNull(publishLike)) {
|
||||
publishLike = PublishLike.builder()
|
||||
.tenantId(publishLikeRes.getTenantId())
|
||||
.communityId(publishLikeRes.getCommunityId())
|
||||
.publishId(publishLikeRes.getPublishId())
|
||||
.tenantId(tenantId)
|
||||
.communityId(communityId)
|
||||
.publishId(publishId)
|
||||
.userId(SecurityUtils.getUserId())
|
||||
.build();
|
||||
baseMapper.insert(publishLike);
|
||||
|
||||
publish.setLikeNum(publish.getLikeNum() + 1);
|
||||
publishMapper.updateById(publish);
|
||||
publishMapper.updateLikeNum(publish);
|
||||
this.addLikeAdvice(publish);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Objects.equals(publishLike.getDelFlag(), "0")) {
|
||||
if ("0".equals(publishLike.getDelFlag())) {
|
||||
publishLike.setDelFlag("2");
|
||||
int likeNum = publish.getLikeNum() - 1;
|
||||
likeNum = Math.max(likeNum, 0);
|
||||
|
@ -85,7 +88,7 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
|||
}
|
||||
|
||||
baseMapper.updateDelFlagById(publishLike);
|
||||
publishMapper.updateById(publish);
|
||||
publishMapper.updateLikeNum(publish);
|
||||
|
||||
}
|
||||
|
||||
|
@ -95,7 +98,7 @@ public class PublishLikeServiceImpl extends ServiceImpl<PublishLikeMapper, Publi
|
|||
communityAdvice.setTenantId(publish.getTenantId());
|
||||
communityAdvice.setCommunityId(publish.getCommunityId());
|
||||
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
communityAdvice.setAdviceType(AdviceConstant.COMMUNITY_NOTICE);
|
||||
communityAdvice.setAdviceType(AdviceConstant.LIKE);
|
||||
communityAdvice.setUserId(publish.getUserId());
|
||||
communityAdvice.setContent(StringUtils.format("{}点赞了你发布的{}",
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(), publish.getContent()));
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
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.PageDomain;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
import com.mcwl.common.exception.ServiceException;
|
||||
import com.mcwl.common.utils.DictUtils;
|
||||
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.CommentVo;
|
||||
import com.mcwl.communityCenter.domain.vo.PersonHomeVo;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishReportVo;
|
||||
import com.mcwl.communityCenter.domain.vo.PublishVo;
|
||||
import com.mcwl.communityCenter.mapper.*;
|
||||
import com.mcwl.communityCenter.service.*;
|
||||
import com.mcwl.system.init.DictInit;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class PublishReportServiceImpl extends ServiceImpl<PublishReportMapper, PublishReport> implements PublishReportService {
|
||||
|
||||
private final ISysUserService sysUserService;
|
||||
|
||||
private final PublishMapper publishMapper;
|
||||
|
||||
@Override
|
||||
public void saveReport(PublishReport publishReport) {
|
||||
|
||||
baseMapper.insertReport(publishReport);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo getReportList(PageDomain pageDomain) {
|
||||
Page<PublishReport> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
baseMapper.selectPage(page, new LambdaQueryWrapper<PublishReport>()
|
||||
.orderByAsc(PublishReport::getStatus)
|
||||
.orderByDesc(PublishReport::getCreateTime));
|
||||
|
||||
List<PublishReport> publishReportList = page.getRecords();
|
||||
List<PublishReportVo> publishReportVoList = new ArrayList<>();
|
||||
|
||||
for (PublishReport publishReport : publishReportList) {
|
||||
PublishReportVo publishReportVo = BeanUtil.copyProperties(publishReport, PublishReportVo.class);
|
||||
publishReportVo.setUserName(sysUserService.selectUserById(publishReport.getUserId()).getUserName());
|
||||
|
||||
publishReportVo.setReportType(DictInit.getDictValue("community_report", publishReport.getReportType().toString()));
|
||||
|
||||
|
||||
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishReport.getPublishId(), publishReport.getTenantId(), publishReport.getCommunityId());
|
||||
|
||||
if (Objects.nonNull(publish)) {
|
||||
publishReportVo.setContent(publish.getContent());
|
||||
publishReportVo.setImgUrl(publish.getImageUrl());
|
||||
publishReportVo.setFileUrl(publish.getFileUrl());
|
||||
}
|
||||
|
||||
publishReportVoList.add(publishReportVo);
|
||||
}
|
||||
|
||||
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setRows(publishReportVoList);
|
||||
tableDataInfo.setTotal(page.getTotal());
|
||||
tableDataInfo.setCode(HttpStatus.SUCCESS);
|
||||
tableDataInfo.setMsg("查询成功");
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(EditPublishReportStatusRes editPublishReportStatusRes) {
|
||||
baseMapper.updateStatus(editPublishReportStatusRes);
|
||||
Long tenantId = editPublishReportStatusRes.getTenantId();
|
||||
Long communityId = editPublishReportStatusRes.getCommunityId();
|
||||
Long publishId = editPublishReportStatusRes.getPublishId();
|
||||
if (editPublishReportStatusRes.getStatus() == 2) {
|
||||
PublishRemoveRes publishRemoveRes = new PublishRemoveRes();
|
||||
publishRemoveRes.setTenantId(tenantId);
|
||||
publishRemoveRes.setCommunityId(communityId);
|
||||
publishRemoveRes.setPublishId(publishId);
|
||||
publishMapper.removePublish(publishRemoveRes);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeReportById(Long id) {
|
||||
baseMapper.deleteReportById(id);
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ 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.BusinessException;
|
||||
import com.mcwl.common.exception.ServiceException;
|
||||
import com.mcwl.common.utils.SecurityUtils;
|
||||
|
@ -58,6 +59,9 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
|
||||
private final QuestionService questionService;
|
||||
|
||||
private final PublishReportMapper publishReportMapper;
|
||||
|
||||
private final RedisCache redisCache;
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -99,6 +103,10 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
||||
}
|
||||
|
||||
if (publishRes.getIsElite() != null && communityUser.getUserType() != 2) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是星主,无法设置精选");
|
||||
}
|
||||
|
||||
if ("1".equals(communityUser.getIsBlack())) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您已被拉黑");
|
||||
}
|
||||
|
@ -110,6 +118,8 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
publish.setPublishTime(new Date());
|
||||
}
|
||||
baseMapper.insertPublish(publish);
|
||||
redisCache.deleteObject("communityPublishNumMap");
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
@ -207,26 +217,47 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void elitePublish(Long communityId, Long publishId) {
|
||||
baseMapper.elitePublish(communityId, publishId);
|
||||
public R<Object> elitePublish(Long tenantId, Long communityId, Long publishId) {
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, SecurityUtils.getUserId());
|
||||
if (Objects.isNull(communityUser)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
||||
}
|
||||
if ("1".equals(communityUser.getIsBlack())) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您已被拉黑");
|
||||
}
|
||||
if (communityUser.getUserType() != 2) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是群主");
|
||||
}
|
||||
baseMapper.elitePublish(tenantId, communityId, publishId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo publishList(PublishPageRes publishPageRes) {
|
||||
Page<Publish> page = this.initPage(publishPageRes);
|
||||
|
||||
List<Publish> publishList = baseMapper.publishList(page, publishPageRes);
|
||||
List<PublishVo> publishVoList = baseMapper.publishList(page, publishPageRes);
|
||||
|
||||
List<PublishVo> publishVoList = BeanUtil.copyToList(publishList, PublishVo.class);
|
||||
for (PublishVo publishVo : publishVoList) {
|
||||
SysUser sysUser = sysUserService.selectUserById(publishVo.getUserId());
|
||||
publishVo.setUserName(sysUser.getNickName());
|
||||
publishVo.setAvatar(sysUser.getAvatar());
|
||||
|
||||
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
||||
commentDetailRes.setTenantId(publishVo.getTenantId());
|
||||
commentDetailRes.setCommunityId(publishVo.getCommunityId());
|
||||
commentDetailRes.setPublishId(publishVo.getId());
|
||||
|
||||
List<CommentVo> commentList = publishCommentService.getComment(commentDetailRes).getData();
|
||||
|
||||
|
||||
PublishLikeRes publishLikeRes = new PublishLikeRes(publishVo.getTenantId(), publishVo.getCommunityId(), publishVo.getId());
|
||||
PublishLike publishLike = publishLikeMapper.selectPublishLike(publishLikeRes, SecurityUtils.getUserId());
|
||||
if (Objects.nonNull(publishLike)) {
|
||||
publishVo.setIsLike(1);
|
||||
String delFlag = publishLike.getDelFlag();
|
||||
if ("0".equals(delFlag)) {
|
||||
publishVo.setIsLike(1);
|
||||
} else {
|
||||
publishVo.setIsLike(0);
|
||||
}
|
||||
} else {
|
||||
publishVo.setIsLike(0);
|
||||
}
|
||||
|
@ -234,11 +265,18 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
PublishCollectRes publishCollectRes = new PublishCollectRes(publishVo.getTenantId(), publishVo.getCommunityId(), publishVo.getId());
|
||||
PublishCollect publishCollect = publishCollectService.getPublishCollect(publishCollectRes, SecurityUtils.getUserId());
|
||||
if (Objects.nonNull(publishCollect)) {
|
||||
publishVo.setIsCollect(1);
|
||||
String delFlag = publishCollect.getDelFlag();
|
||||
if ("0".equals(delFlag)) {
|
||||
publishVo.setIsCollect(1);
|
||||
} else {
|
||||
publishVo.setIsCollect(0);
|
||||
}
|
||||
} else {
|
||||
publishVo.setIsCollect(0);
|
||||
}
|
||||
|
||||
|
||||
publishVo.setCommentList(commentList);
|
||||
}
|
||||
|
||||
|
||||
|
@ -266,7 +304,7 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
CommentDetailRes commentDetailRes = new CommentDetailRes();
|
||||
commentDetailRes.setTenantId(myPublishPageRes.getTenantId());
|
||||
commentDetailRes.setCommunityId(myPublishPageRes.getCommunityId());
|
||||
commentDetailRes.setOperatorId(publishVo.getId());
|
||||
commentDetailRes.setPublishId(publishVo.getId());
|
||||
|
||||
List<CommentVo> commentVoList = publishCommentService.getComment(commentDetailRes).getData();
|
||||
personHomeVo.setCommentList(commentVoList);
|
||||
|
@ -309,7 +347,7 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
return;
|
||||
}
|
||||
|
||||
if (publishCollect.getDelFlag().equals("0")) {
|
||||
if ("0".equals(publishCollect.getDelFlag())) {
|
||||
publishCollect.setDelFlag("2");
|
||||
} else {
|
||||
publishCollect.setDelFlag("0");
|
||||
|
@ -326,7 +364,7 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
communityAdvice.setTenantId(publish.getTenantId());
|
||||
communityAdvice.setCommunityId(publish.getCommunityId());
|
||||
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
communityAdvice.setAdviceType(AdviceConstant.COMMUNITY_NOTICE);
|
||||
communityAdvice.setAdviceType(AdviceConstant.LIKE);
|
||||
communityAdvice.setUserId(publish.getUserId());
|
||||
communityAdvice.setContent(StringUtils.format("{}收藏了你发布的{}",
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(), publish.getContent()));
|
||||
|
@ -347,6 +385,64 @@ public class PublishServiceImpl extends ServiceImpl<PublishMapper, Publish> impl
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportPublish(PublishReportRes publishReportRes) {
|
||||
Long tenantId = publishReportRes.getTenantId();
|
||||
Long communityId = publishReportRes.getCommunityId();
|
||||
Long publishId = publishReportRes.getPublishId();
|
||||
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, SecurityUtils.getUserId());
|
||||
if (Objects.isNull(communityUser)) {
|
||||
throw new ServiceException("您不是该社区成员", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
if ("1".equals(communityUser.getIsBlack())) {
|
||||
throw new ServiceException("您已被拉黑", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishId, tenantId, communityId);
|
||||
|
||||
if (Objects.isNull(publish)) {
|
||||
throw new ServiceException("该内容不存在", HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
||||
PublishReport publishReport = BeanUtil.toBean(publishReportRes, PublishReport.class);
|
||||
publishReport.setUserId(SecurityUtils.getUserId());
|
||||
|
||||
publishReportMapper.insertReport(publishReport);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Publish getLastPublish(Long tenantId, Long communityId) {
|
||||
return baseMapper.getLastPublish(tenantId, communityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Object> removePublish(PublishRemoveRes publishRemoveRes) {
|
||||
Long tenantId = publishRemoveRes.getTenantId();
|
||||
Long communityId = publishRemoveRes.getCommunityId();
|
||||
Long publishId = publishRemoveRes.getPublishId();
|
||||
|
||||
Long currentUserId = SecurityUtils.getUserId();
|
||||
CommunityUser communityUser = communityUserMapper.selectCommunityUser(tenantId, communityId, currentUserId);
|
||||
if (Objects.isNull(communityUser)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您不是该社区成员");
|
||||
}
|
||||
|
||||
Publish publish = publishMapper.selectByIdAndTenantIdAndCommunityId(publishId, tenantId, communityId);
|
||||
if (Objects.isNull(publish)) {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "该内容不存在");
|
||||
}
|
||||
|
||||
if (publish.getUserId().equals(currentUserId) || publish.getUserId().equals(tenantId)) {
|
||||
publishMapper.removePublish(publishRemoveRes);
|
||||
} else {
|
||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "您没有权限删除该内容");
|
||||
}
|
||||
return R.ok(HttpStatus.SHOW_ERROR_MSG, "删除成功");
|
||||
}
|
||||
|
||||
private Page<Publish> initPage(PageDomain pageDomain) {
|
||||
return new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
}
|
||||
|
|
|
@ -17,8 +17,11 @@ import com.mcwl.communityCenter.domain.dto.*;
|
|||
import com.mcwl.communityCenter.domain.vo.QuestionCommentVo;
|
||||
import com.mcwl.communityCenter.domain.vo.QuestionVo;
|
||||
import com.mcwl.communityCenter.mapper.*;
|
||||
import com.mcwl.communityCenter.service.IncomeInfoService;
|
||||
import com.mcwl.communityCenter.service.QuestionCommentService;
|
||||
import com.mcwl.communityCenter.service.QuestionService;
|
||||
import com.mcwl.myInvitation.domain.Consume;
|
||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -26,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -41,6 +45,10 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
|||
|
||||
private final CommunityUserMapper communityUserMapper;
|
||||
|
||||
private final ConsumeMapper consumeMapper;
|
||||
|
||||
private final IncomeInfoService incomeInfoService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<Object> comment(QuestionCommentRes questionCommentRes) {
|
||||
|
@ -74,7 +82,7 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
|||
communityAdvice.setTenantId(tenantId);
|
||||
communityAdvice.setCommunityId(communityId);
|
||||
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
communityAdvice.setAdviceType(AdviceConstant.COMMUNITY_NOTICE);
|
||||
communityAdvice.setAdviceType(AdviceConstant.REPLY_ME);
|
||||
communityAdvice.setUserId(question.getQuestionUserId());
|
||||
communityAdvice.setTitle(StringUtils.format("{}回复{}",
|
||||
SecurityUtils.getLoginUser().getUser().getNickName(),
|
||||
|
@ -152,7 +160,7 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
|||
questionMapper.updateById(question);
|
||||
|
||||
|
||||
SysUser sysUser = sysUserService.selectUserById(tenantId);
|
||||
SysUser sysUser = sysUserService.selectUserById(questionComment.getUserId());
|
||||
BigDecimal sysWallet = new BigDecimal(sysUser.getWallet().toString());
|
||||
BigDecimal amount = new BigDecimal(question.getAmount().toString());
|
||||
// 添加钱包
|
||||
|
@ -161,9 +169,30 @@ public class QuestionCommentServiceImpl extends ServiceImpl<QuestionCommentMappe
|
|||
sysUserService.updateUser(sysUser);
|
||||
|
||||
|
||||
Consume consume = new Consume();
|
||||
consume.setUserId(questionComment.getUserId());
|
||||
consume.setAmount(question.getAmount());
|
||||
consume.setType(4);
|
||||
consume.setWallet(sysUser.getWallet());
|
||||
consumeMapper.insert(consume);
|
||||
|
||||
IncomeInfo incomeInfo = new IncomeInfo();
|
||||
incomeInfo.setTenantId(tenantId);
|
||||
incomeInfo.setCommunityId(communityId);
|
||||
incomeInfo.setUserId(questionComment.getUserId());
|
||||
incomeInfo.setType(1);
|
||||
incomeInfo.setAmount(question.getAmount());
|
||||
incomeInfoService.save(incomeInfo);
|
||||
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QuestionCommentVo> getComment(QuestionDetailRes questionDetailRes) {
|
||||
|
||||
return baseMapper.getComment(questionDetailRes);
|
||||
}
|
||||
|
||||
private Page<QuestionComment> initPage(QuestionCommentPageRes questionCommentPageRes) {
|
||||
|
||||
|
|
|
@ -24,8 +24,11 @@ import com.mcwl.communityCenter.mapper.*;
|
|||
import com.mcwl.communityCenter.service.CommunityService;
|
||||
import com.mcwl.communityCenter.service.QuestionCommentService;
|
||||
import com.mcwl.communityCenter.service.QuestionService;
|
||||
import com.mcwl.myInvitation.domain.Consume;
|
||||
import com.mcwl.myInvitation.mapper.ConsumeMapper;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -52,6 +55,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
|
||||
private final QuestionCommentService questionCommentService;
|
||||
|
||||
private final ConsumeMapper consumeMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 添加问题
|
||||
*
|
||||
|
@ -101,15 +107,23 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
sysUserService.updateUser(sysUser);
|
||||
|
||||
|
||||
CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||
communityAdvice.setTenantId(tenantId);
|
||||
communityAdvice.setCommunityId(communityId);
|
||||
communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
communityAdvice.setAdviceType(AdviceConstant.WAIT_ME_ANSWER);
|
||||
communityAdvice.setUserId(questionUserId);
|
||||
communityAdvice.setTitle(StringUtils.format("{}向你提问:", SecurityUtils.getLoginUser().getUser().getNickName()));
|
||||
communityAdvice.setContent(questionRes.getContent());
|
||||
communityAdviceMapper.insert(communityAdvice);
|
||||
Consume consume = new Consume();
|
||||
consume.setUserId(SecurityUtils.getUserId());
|
||||
consume.setAmount(-questionRes.getAmount());
|
||||
consume.setType(4);
|
||||
consume.setWallet(sysUser.getWallet());
|
||||
consumeMapper.insert(consume);
|
||||
|
||||
|
||||
// CommunityAdvice communityAdvice = new CommunityAdvice();
|
||||
// communityAdvice.setTenantId(tenantId);
|
||||
// communityAdvice.setCommunityId(communityId);
|
||||
// communityAdvice.setSendUserId(SecurityUtils.getUserId());
|
||||
// communityAdvice.setAdviceType(AdviceConstant.WAIT_ME_ANSWER);
|
||||
// communityAdvice.setUserId(questionUserId);
|
||||
// communityAdvice.setTitle(StringUtils.format("{}向你提问:", SecurityUtils.getLoginUser().getUser().getNickName()));
|
||||
// communityAdvice.setContent(questionRes.getContent());
|
||||
// communityAdviceMapper.insert(communityAdvice);
|
||||
|
||||
|
||||
return R.ok();
|
||||
|
@ -121,22 +135,17 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
|
||||
Page<Question> page = initPage(questionPageRes);
|
||||
|
||||
// baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId(), questionPageRes.getStatus());
|
||||
baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId());
|
||||
List<QuestionVo> questionVoList = baseMapper.list(page, questionPageRes.getTenantId(), questionPageRes.getCommunityId());
|
||||
for (QuestionVo questionVo : questionVoList) {
|
||||
|
||||
// 获取分页数据
|
||||
List<Question> questionList = page.getRecords();
|
||||
// Question数据转为QuestionVo
|
||||
List<QuestionVo> questionVoList = new ArrayList<>();
|
||||
for (Question question : questionList) {
|
||||
QuestionVo questionVo = new QuestionVo();
|
||||
BeanUtil.copyProperties(question, questionVo);
|
||||
Long questionUserId = question.getQuestionUserId();
|
||||
SysUser sysUser = sysUserService.selectUserById(questionUserId);
|
||||
questionVo.setQuestionUserName(sysUser.getNickName());
|
||||
questionVo.setQuestionUserAvatar(sysUser.getAvatar());
|
||||
questionVoList.add(questionVo);
|
||||
QuestionDetailRes questionDetailRes = new QuestionDetailRes();
|
||||
questionDetailRes.setTenantId(questionVo.getTenantId());
|
||||
questionDetailRes.setCommunityId(questionVo.getCommunityId());
|
||||
questionDetailRes.setQuestionId(questionVo.getId());
|
||||
|
||||
List<QuestionCommentVo> commentList = questionCommentService.getComment(questionDetailRes);
|
||||
|
||||
questionVo.setCommentList(commentList);
|
||||
}
|
||||
|
||||
// 封装分页信息
|
||||
|
@ -237,34 +246,40 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|||
@Override
|
||||
public TableDataInfo myQuestionList(QuestionPageRes questionPageRes) {
|
||||
Page<Question> page = initPage(questionPageRes);
|
||||
List<Question> questionList = baseMapper.myQuestionList(page, questionPageRes, SecurityUtils.getUserId());
|
||||
List<QuestionVo> questionList = baseMapper.myQuestionList(page, questionPageRes, SecurityUtils.getUserId());
|
||||
List<PersonHomeVo> personHomeVoList = new ArrayList<>();
|
||||
for (Question question : questionList) {
|
||||
PersonHomeVo personHomeVo = BeanUtil.toBean(question, PersonHomeVo.class);
|
||||
personHomeVo.setImageUrl(question.getQuestionUrl());
|
||||
for (QuestionVo questionVo : questionList) {
|
||||
PersonHomeVo personHomeVo = BeanUtil.toBean(questionVo, PersonHomeVo.class);
|
||||
|
||||
List<CommentVo> commentList = new ArrayList<>();
|
||||
QuestionCommentPageRes questionCommentPageRes = new QuestionCommentPageRes();
|
||||
questionCommentPageRes.setTenantId(questionPageRes.getTenantId());
|
||||
questionCommentPageRes.setCommunityId(questionPageRes.getCommunityId());
|
||||
questionCommentPageRes.setQuestionId(question.getId());
|
||||
questionCommentPageRes.setPageNum(1);
|
||||
questionCommentPageRes.setPageSize(10);
|
||||
Long questionUserId = questionVo.getQuestionUserId();
|
||||
String questionUserName = questionVo.getQuestionUserName();
|
||||
String questionUserAvatar = questionVo.getQuestionUserAvatar();
|
||||
String questionUrl = questionVo.getQuestionUrl();
|
||||
|
||||
personHomeVo.setUserId(questionUserId);
|
||||
personHomeVo.setUserName(questionUserName);
|
||||
personHomeVo.setAvatar(questionUserAvatar);
|
||||
personHomeVo.setImageUrl(questionUrl);
|
||||
|
||||
QuestionDetailRes questionDetailRes = new QuestionDetailRes();
|
||||
questionDetailRes.setTenantId(questionVo.getTenantId());
|
||||
questionDetailRes.setCommunityId(questionVo.getCommunityId());
|
||||
questionDetailRes.setQuestionId(questionVo.getId());
|
||||
|
||||
List<QuestionCommentVo> questionCommentList = questionCommentService.getComment(questionDetailRes);
|
||||
|
||||
// List<QuestionCommentVo> questionCommentList = questionVo.getCommentList();
|
||||
|
||||
List<CommentVo> commentList = BeanUtil.copyToList(questionCommentList, CommentVo.class);
|
||||
|
||||
TableDataInfo tableDataInfo = questionCommentService.listByPage(questionCommentPageRes);
|
||||
List<QuestionCommentVo> questionCommentList = (List<QuestionCommentVo>) tableDataInfo.getRows();
|
||||
for (QuestionCommentVo questionCommentVo : questionCommentList) {
|
||||
CommentVo commentVo = BeanUtil.toBean(questionCommentVo, CommentVo.class);
|
||||
SysUser sysUser = sysUserService.selectUserById(questionCommentVo.getUserId());
|
||||
commentVo.setUserName(sysUser.getNickName());
|
||||
commentVo.setUserAvatar(sysUser.getAvatar());
|
||||
commentList.add(commentVo);
|
||||
}
|
||||
personHomeVo.setCommentList(commentList);
|
||||
|
||||
personHomeVoList.add(personHomeVo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 封装分页信息
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</resultMap>
|
||||
<update id="quitCommunity">
|
||||
update cc_community_user
|
||||
set del_flag = '1'
|
||||
set del_flag = '2'
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and user_id = #{userId}
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
<update id="deleteCommunity">
|
||||
update cc_community
|
||||
set del_flag = '1'
|
||||
set del_flag = '2'
|
||||
where tenant_id = #{tenantId}
|
||||
and id = #{communityId}
|
||||
and del_flag = '0';
|
||||
|
@ -47,20 +47,20 @@
|
|||
select cu.community_id as id, COALESCE(count(*), 0) as join_num
|
||||
from cc_community_user cu
|
||||
where cu.del_flag = '0'
|
||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||
group by cu.community_id
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectCommunityPublishNum" resultMap="CommunityPublishNumMap">
|
||||
select p.community_id as id, COALESCE(count(*), 0) as publish_num
|
||||
from cc_community c
|
||||
join cc_publish p on c.id = p.community_id
|
||||
join cc_question q on c.id = q.community_id
|
||||
where c.del_flag = '0'
|
||||
and p.del_flag = '0'
|
||||
and q.del_flag = '0'
|
||||
group by p.community_id
|
||||
SELECT p.community_id AS id, COALESCE(count(p.id), 0) AS publish_num
|
||||
FROM cc_community c
|
||||
JOIN cc_publish p ON c.id = p.community_id and c.tenant_id = p.tenant_id
|
||||
WHERE c.del_flag = '0'
|
||||
AND p.del_flag = '0'
|
||||
GROUP BY p.community_id
|
||||
</select>
|
||||
<select id="selectPageByCommunityTag" resultType="com.mcwl.communityCenter.domain.Community">
|
||||
select
|
||||
|
@ -91,33 +91,27 @@
|
|||
|
||||
</select>
|
||||
<select id="getMyJoinCommunity" resultType="com.mcwl.communityCenter.domain.Community">
|
||||
select c.id,
|
||||
c.tenant_id,
|
||||
c.image_url,
|
||||
c.community_name,
|
||||
c.description,
|
||||
c.community_tag,
|
||||
c.type,
|
||||
c.price,
|
||||
c.validity_day,
|
||||
c.create_by,
|
||||
c.create_time,
|
||||
c.update_by,
|
||||
c.update_time
|
||||
select c.*
|
||||
from cc_community c
|
||||
join cc_community_user cu on c.id = cu.community_id
|
||||
where cu.user_id = #{userId}
|
||||
and c.del_flag = '0'
|
||||
and cu.del_flag = '0'
|
||||
<if test="joinCommunityListPageRes.isMyCreate == 1">
|
||||
and c.tenant_id = #{userId}
|
||||
</if>
|
||||
<if test="joinCommunityListPageRes.isMyCreate == 0">
|
||||
<if test="joinCommunityListPageRes.isMyCreate != 1">
|
||||
and c.tenant_id != #{userId}
|
||||
</if>
|
||||
<if test="joinCommunityListPageRes.searchContent != null and joinCommunityListPageRes.searchContent != ''">
|
||||
and (c.community_name like concat('%', #{joinCommunityListPageRes.searchContent}, '%')
|
||||
or c.description like concat('%', #{joinCommunityListPageRes.searchContent}, '%'))
|
||||
</if>
|
||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||
</select>
|
||||
<select id="getCommunity" resultType="com.mcwl.communityCenter.domain.Community">
|
||||
select *
|
||||
from cc_community
|
||||
where id = #{communityId}
|
||||
and tenant_id = #{tenantId}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
|
@ -103,7 +103,7 @@
|
|||
and user_id = #{userId}
|
||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||
and (black_end_time is null or NOW() >= black_end_time)
|
||||
and del_flag = '0';
|
||||
</select>
|
||||
<select id="getAllCommunityUser" resultType="com.mcwl.communityCenter.domain.CommunityUser">
|
||||
select id,
|
||||
|
@ -123,4 +123,27 @@
|
|||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||
</select>
|
||||
<select id="getExpireTime" resultType="java.util.Date">
|
||||
select end_time
|
||||
from cc_community_user
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and user_id = #{userId}
|
||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= end_time) or (start_time is null and end_time is null))
|
||||
and del_flag = '0';
|
||||
</select>
|
||||
<select id="getCommunityUserAvatar" resultType="java.lang.String">
|
||||
select u.avatar
|
||||
from cc_community_user cu
|
||||
left join sys_user u on cu.user_id = u.user_id
|
||||
where cu.tenant_id = #{tenantId}
|
||||
and cu.community_id = #{communityId}
|
||||
and ((CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') >= cu.start_time
|
||||
AND CONVERT_TZ(NOW(), 'SYSTEM', '+08:00') <= cu.end_time) or
|
||||
(cu.start_time is null and cu.end_time is null))
|
||||
and cu.del_flag = '0'
|
||||
order by cu.create_time desc
|
||||
limit 5
|
||||
</select>
|
||||
</mapper>
|
|
@ -9,7 +9,7 @@
|
|||
SELECT SUM(IF(DATE(create_time) = CURDATE(), amount, 0)) AS today_income,
|
||||
SUM(IF(DATE(create_time) = CURDATE() - INTERVAL 1 DAY, amount, 0)) AS yesterday_income
|
||||
FROM cc_income_info
|
||||
WHERE tenant_id = #{userId}
|
||||
WHERE user_id = #{userId}
|
||||
AND type = 0
|
||||
AND del_flag = '0'
|
||||
</select>
|
||||
|
@ -18,14 +18,14 @@
|
|||
SELECT SUM(IF(DATE(create_time) = CURDATE(), amount, 0)) AS today_income,
|
||||
SUM(IF(DATE(create_time) = CURDATE() - INTERVAL 1 DAY, amount, 0)) AS yesterday_income
|
||||
FROM cc_income_info
|
||||
WHERE tenant_id = #{userId}
|
||||
WHERE user_id = #{userId}
|
||||
AND type = 1
|
||||
AND del_flag = '0'
|
||||
</select>
|
||||
<select id="totalIncome" resultType="java.lang.Double">
|
||||
SELECT SUM(amount)
|
||||
FROM cc_income_info
|
||||
WHERE del_flag = '0'
|
||||
WHERE del_flag = '0' and user_id = #{userId}
|
||||
</select>
|
||||
<select id="incomeList" resultType="com.mcwl.communityCenter.domain.vo.IncomeInfoListVo">
|
||||
SELECT u.nick_name as user_name,
|
||||
|
@ -39,7 +39,7 @@
|
|||
on ii.tenant_id = c.tenant_id
|
||||
and ii.community_id = c.id
|
||||
left join sys_user u on c.tenant_id = u.user_id
|
||||
where ii.tenant_id = #{userId}
|
||||
where ii.user_id = #{userId}
|
||||
<if test="incomeInfoListPageRes.type != null ">
|
||||
and ii.type = #{incomeInfoListPageRes.type}
|
||||
</if>
|
||||
|
|
|
@ -17,17 +17,22 @@
|
|||
</update>
|
||||
|
||||
<select id="myCollectList" resultType="com.mcwl.communityCenter.domain.vo.PublishVo">
|
||||
select p.*, IF(pc.id is not null, 1, 0) as is_collect
|
||||
from cc_publish p left join cc_publish_collect pc
|
||||
on p.id = pc.publish_id
|
||||
and p.tenant_id = pc.tenant_id
|
||||
and p.community_id = pc.community_id
|
||||
<where>
|
||||
and pc.tenant_id = #{myPublishCollectPageRes.tenantId}
|
||||
and pc.community_id = #{myPublishCollectPageRes.communityId}
|
||||
and pc.user_id = #{userId}
|
||||
and pc.del_flag = '0'
|
||||
</where>
|
||||
select p.*,
|
||||
1 as is_collect,
|
||||
u.user_id,
|
||||
u.avatar,
|
||||
u.nick_name as user_name
|
||||
from cc_publish p
|
||||
left join cc_publish_collect pc
|
||||
on p.id = pc.publish_id
|
||||
and p.tenant_id = pc.tenant_id
|
||||
and p.community_id = pc.community_id
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
where pc.tenant_id = #{myPublishCollectPageRes.tenantId}
|
||||
and pc.community_id = #{myPublishCollectPageRes.communityId}
|
||||
and pc.user_id = #{userId}
|
||||
and pc.del_flag = '0'
|
||||
and p.del_flag = '0'
|
||||
</select>
|
||||
<select id="getPublishCollect" resultType="com.mcwl.communityCenter.domain.PublishCollect">
|
||||
select *
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
set del_flag = #{publishCommentLike.delFlag}
|
||||
where tenant_id = #{publishCommentLike.tenantId}
|
||||
and community_id = #{publishCommentLike.communityId}
|
||||
and comment_id = #{publishCommentLike.publishCommentId}
|
||||
and publish_comment_id = #{publishCommentLike.publishCommentId}
|
||||
</update>
|
||||
|
||||
<select id="selectByTenantIdAndCommunityIdAndCommentId"
|
||||
|
@ -16,14 +16,23 @@
|
|||
select * from cc_publish_comment_like
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and comment_id = #{commentId}
|
||||
and publish_comment_id = #{commentId}
|
||||
</select>
|
||||
<select id="selectLike" resultType="com.mcwl.communityCenter.domain.PublishCommentLike">
|
||||
select * from cc_publish_comment_like
|
||||
where tenant_id = #{publishCommentLikeRes.tenantId}
|
||||
and community_id = #{publishCommentLikeRes.communityId}
|
||||
and publish_id = #{publishCommentLikeRes.publishId}
|
||||
and comment_id = #{publishCommentLikeRes.commentId}
|
||||
and publish_comment_id = #{publishCommentLikeRes.commentId}
|
||||
and user_id = #{userId}
|
||||
</select>
|
||||
<select id="publishCommentLike" resultType="com.mcwl.communityCenter.domain.PublishCommentLike">
|
||||
select *
|
||||
from cc_publish_comment_like
|
||||
where tenant_id = #{commentLikeDetailRes.tenantId}
|
||||
and community_id = #{commentLikeDetailRes.communityId}
|
||||
and publish_id = #{commentLikeDetailRes.publishId}
|
||||
and publish_comment_id = #{commentLikeDetailRes.publishCommentId}
|
||||
and user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -5,13 +5,34 @@
|
|||
<mapper namespace="com.mcwl.communityCenter.mapper.PublishCommentMapper">
|
||||
<update id="deleteByIdAndTenantIdAndCommunityIdAndOperatorId">
|
||||
update cc_publish_comment set del_flag = '2'
|
||||
where tenant_id = #{tenantId}
|
||||
where id = #{id}
|
||||
and tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and publish_id = #{operatorId}
|
||||
and type = 0
|
||||
and publish_id = #{publishId}
|
||||
</update>
|
||||
|
||||
<select id="selectByTenantIdAndCommunityIdAndOperatorId"
|
||||
<select id="selectByTenantIdAndCommunityIdAndPublishIdList"
|
||||
resultType="com.mcwl.communityCenter.domain.PublishComment">
|
||||
select pm1.id,
|
||||
pm1.tenant_id,
|
||||
pm1.community_id,
|
||||
pm1.publish_id,
|
||||
pm1.user_id,
|
||||
pm1.content,
|
||||
pm1.parent_id,
|
||||
pm1.like_num,
|
||||
pm1.create_time
|
||||
from cc_publish_comment pm1 left join cc_publish_comment pm2 on pm1.parent_id = pm2.id
|
||||
where pm1.tenant_id = #{tenantId}
|
||||
and pm1.community_id = #{communityId}
|
||||
and pm1.publish_id = #{publishId}
|
||||
and pm1.del_flag = '0'
|
||||
AND (pm2.del_flag = 0 OR pm2.id IS NULL)
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByIdAndTenantIdAndCommunityIdAndPublishId"
|
||||
resultType="com.mcwl.communityCenter.domain.PublishComment">
|
||||
select id,
|
||||
tenant_id,
|
||||
|
@ -20,34 +41,14 @@
|
|||
user_id,
|
||||
content,
|
||||
parent_id,
|
||||
type,
|
||||
like_num,
|
||||
create_time
|
||||
from cc_publish_comment
|
||||
where tenant_id = #{tenantId}
|
||||
where id = #{id}
|
||||
and tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and publish_id = #{operatorId}
|
||||
and type = 0
|
||||
and publish_id = #{publishId}
|
||||
and del_flag = '0'
|
||||
order by create_time
|
||||
</select>
|
||||
<select id="selectByIdAndTenantIdAndCommunityIdAndOperatorId"
|
||||
resultType="com.mcwl.communityCenter.domain.PublishComment">
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
publish_id,
|
||||
user_id,
|
||||
content,
|
||||
parent_id,
|
||||
type,
|
||||
like_num,
|
||||
create_time
|
||||
from cc_publish_comment
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and publish_id = #{operatorId}
|
||||
and type = 0
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mcwl.communityCenter.mapper.PublishLabelMapper">
|
||||
|
||||
<select id="listPublishLabel" resultType="java.lang.String">
|
||||
select label_name
|
||||
from cc_publish_label
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and del_flag = '0'
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -5,15 +5,36 @@
|
|||
<mapper namespace="com.mcwl.communityCenter.mapper.PublishMapper">
|
||||
<insert id="insertPublish">
|
||||
insert into cc_publish
|
||||
(tenant_id, community_id, user_id, content, image_url, file_url, file_name, publish_time)
|
||||
(tenant_id, community_id, user_id, content, image_url, label_name, file_url, file_name, publish_time,
|
||||
is_elite,
|
||||
create_time)
|
||||
values (#{publish.tenantId}, #{publish.communityId}, #{publish.userId}, #{publish.content}, #{publish.imageUrl},
|
||||
#{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime})
|
||||
#{publish.labelName}, #{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime},
|
||||
#{publish.isElite}, now())
|
||||
</insert>
|
||||
<update id="elitePublish">
|
||||
update cc_publish
|
||||
set is_elite = !is_elite
|
||||
where community_id = #{communityId}
|
||||
and id = #{publishId}
|
||||
and tenant_id = #{tenantId}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
<update id="removePublish">
|
||||
update cc_publish
|
||||
set del_flag = '2'
|
||||
where tenant_id = #{publishRemoveRes.tenantId}
|
||||
and community_id = #{publishRemoveRes.communityId}
|
||||
and id = #{publishRemoveRes.publishId}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
<update id="updateLikeNum">
|
||||
update cc_publish
|
||||
set like_num = #{publish.likeNum}
|
||||
where tenant_id = #{publish.tenantId}
|
||||
and community_id = #{publish.communityId}
|
||||
and id = #{publish.id}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
<select id="selectByTenantIdAndCommunityIdPage" resultType="com.mcwl.communityCenter.domain.Publish">
|
||||
select id,
|
||||
|
@ -96,30 +117,41 @@
|
|||
and del_flag = '0'
|
||||
and file_url is not null
|
||||
</select>
|
||||
<select id="publishList" resultType="com.mcwl.communityCenter.domain.Publish">
|
||||
select *
|
||||
from cc_publish
|
||||
<select id="publishList" resultType="com.mcwl.communityCenter.domain.vo.PublishVo">
|
||||
select p.*, u.nick_name as user_name, u.avatar
|
||||
from cc_publish p
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
<where>
|
||||
and tenant_id = #{publishPageRes.tenantId}
|
||||
and community_id = #{publishPageRes.communityId}
|
||||
and del_flag = '0'
|
||||
and p.tenant_id = #{publishPageRes.tenantId}
|
||||
and p.community_id = #{publishPageRes.communityId}
|
||||
and p.del_flag = '0'
|
||||
<if test="publishPageRes.type != null">
|
||||
<if test="publishPageRes.type == 0">
|
||||
and user_id = #{publishPageRes.tenantId}
|
||||
and p.user_id = #{publishPageRes.tenantId}
|
||||
</if>
|
||||
<if test="publishPageRes.type == 1">
|
||||
and is_elite = 1
|
||||
and p.is_elite = 1
|
||||
</if>
|
||||
</if>
|
||||
<if test="publishPageRes.labelName != null and publishPageRes.labelName != ''">
|
||||
and p.label_name = #{publishPageRes.labelName}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by p.create_time desc
|
||||
</select>
|
||||
<select id="myPublishList" resultType="com.mcwl.communityCenter.domain.vo.PublishVo">
|
||||
select p.*, IF(pc.id is not null, 1, 0) as is_collect
|
||||
select p.*, u.user_id, u.nick_name as user_name, u.avatar,
|
||||
IF(pc.del_flag = '0', 1, 0) as is_collect,
|
||||
IF(pl.del_flag = '0', 1, 0) as is_like
|
||||
from cc_publish p left join cc_publish_collect pc
|
||||
on p.id = pc.publish_id
|
||||
and p.tenant_id = pc.tenant_id
|
||||
and p.community_id = pc.community_id
|
||||
left join cc_publish_like pl
|
||||
on pl.tenant_id = p.tenant_id
|
||||
and pl.community_id = p.community_id
|
||||
and pl.publish_id = p.id
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
<where>
|
||||
and p.tenant_id = #{myPublishPageRes.tenantId}
|
||||
and p.community_id = #{myPublishPageRes.communityId}
|
||||
|
@ -127,4 +159,13 @@
|
|||
and p.del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
<select id="getLastPublish" resultType="com.mcwl.communityCenter.domain.Publish">
|
||||
select *
|
||||
from cc_publish
|
||||
where tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
and del_flag = '0'
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mcwl.communityCenter.mapper.PublishReportMapper">
|
||||
|
||||
<insert id="insertReport">
|
||||
INSERT INTO cc_report(tenant_id, community_id, publish_id, user_id, report_type, description, create_time)
|
||||
VALUES (#{publishReport.tenantId}, #{publishReport.communityId}, #{publishReport.publishId},
|
||||
#{publishReport.userId}, #{publishReport.reportType}, #{publishReport.description}, NOW())
|
||||
</insert>
|
||||
<update id="updateStatus">
|
||||
UPDATE cc_report
|
||||
SET status = #{editPublishReportStatusRes.status}
|
||||
WHERE tenant_id = #{editPublishReportStatusRes.tenantId}
|
||||
AND community_id = #{editPublishReportStatusRes.communityId}
|
||||
AND publish_id = #{editPublishReportStatusRes.publishId}
|
||||
</update>
|
||||
<update id="deleteReportById">
|
||||
UPDATE cc_report
|
||||
SET del_flag = '2'
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
|
@ -25,4 +25,15 @@
|
|||
and question_id = #{questionId}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
<select id="getComment" resultType="com.mcwl.communityCenter.domain.vo.QuestionCommentVo">
|
||||
select qm.*, u.nick_name as user_name, u.avatar
|
||||
from cc_question_comment qm
|
||||
left join sys_user u on qm.user_id = u.user_id
|
||||
where qm.tenant_id = #{questionDetailRes.tenantId}
|
||||
and qm.community_id = #{questionDetailRes.communityId}
|
||||
and qm.question_id = #{questionDetailRes.questionId}
|
||||
and qm.del_flag = '0'
|
||||
order by qm.is_accept desc, qm.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
|
@ -5,34 +5,16 @@
|
|||
<mapper namespace="com.mcwl.communityCenter.mapper.QuestionMapper">
|
||||
|
||||
|
||||
<select id="list" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
status,
|
||||
type
|
||||
from cc_question
|
||||
where del_flag = '0'
|
||||
<select id="list" resultType="com.mcwl.communityCenter.domain.vo.QuestionVo">
|
||||
select q.*, u.nick_name as questionUserName, u.avatar as questionUserAvatar
|
||||
from cc_question q left join sys_user u on q.question_user_id = u.user_id
|
||||
where q.del_flag = '0'
|
||||
and tenant_id = #{tenantId}
|
||||
and community_id = #{communityId}
|
||||
order by amount desc, create_time desc
|
||||
order by q.create_time desc, amount desc
|
||||
</select>
|
||||
<select id="selectByIdAndTenantIdAndCommunityId" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
status,
|
||||
type
|
||||
select *
|
||||
from cc_question
|
||||
where id = #{id}
|
||||
and tenant_id = #{tenantId}
|
||||
|
@ -40,16 +22,7 @@
|
|||
and del_flag = '0'
|
||||
</select>
|
||||
<select id="listImage" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select id,
|
||||
tenant_id,
|
||||
community_id,
|
||||
question_user_id,
|
||||
content,
|
||||
question_url,
|
||||
is_anonymous,
|
||||
amount,
|
||||
status,
|
||||
type
|
||||
select *
|
||||
from cc_question
|
||||
where del_flag = '0'
|
||||
and tenant_id = #{tenantId}
|
||||
|
@ -57,10 +30,11 @@
|
|||
and question_url is not null
|
||||
order by amount desc, create_time desc
|
||||
</select>
|
||||
<select id="myQuestionList" resultType="com.mcwl.communityCenter.domain.Question">
|
||||
select *
|
||||
from cc_question
|
||||
where del_flag = '0'
|
||||
<select id="myQuestionList" resultType="com.mcwl.communityCenter.domain.vo.QuestionVo">
|
||||
select q.*, u.nick_name as questionUserName, u.avatar as questionUserAvatar
|
||||
from cc_question q
|
||||
left join sys_user u on q.question_user_id = u.user_id
|
||||
where q.del_flag = '0'
|
||||
and tenant_id = #{questionPageRes.tenantId}
|
||||
and community_id = #{questionPageRes.communityId}
|
||||
and question_user_id = #{userId}
|
||||
|
|
|
@ -41,6 +41,7 @@ public class UserDetailsServiceImpl implements UserDetailsService, OtherUserDeta
|
|||
@Override
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||
SysUser user = null;
|
||||
log.info("当前num:{}",num);
|
||||
if (num == 0 ){
|
||||
user = userService.selectUserByUserName(username);
|
||||
}else {
|
||||
|
@ -49,11 +50,14 @@ public class UserDetailsServiceImpl implements UserDetailsService, OtherUserDeta
|
|||
|
||||
if (StringUtils.isNull(user)) {
|
||||
log.info("登录用户:{} 不存在.", username);
|
||||
num = 0;
|
||||
throw new ServiceException(MessageUtils.message("user.not.exists"), HttpStatus.SHOW_ERROR_MSG);
|
||||
} else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
||||
num = 0;
|
||||
log.info("登录用户:{} 已被删除.", username);
|
||||
throw new ServiceException(MessageUtils.message("user.password.delete"), HttpStatus.SHOW_ERROR_MSG);
|
||||
} else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
||||
num = 0;
|
||||
log.info("登录用户:{} 已被停用.", username);
|
||||
throw new ServiceException(MessageUtils.message("user.blocked"), HttpStatus.SHOW_ERROR_MSG);
|
||||
}
|
||||
|
|
|
@ -31,9 +31,13 @@ public class CommissionRatio extends BaseEntity {
|
|||
*/
|
||||
private Double ratio;
|
||||
/**
|
||||
* 类型 0邀请人-被邀请人 1公司-商家
|
||||
* 类型 0邀请人-被邀请人 1公司-商家 2星球手续费 3提现手续费
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -29,12 +29,11 @@ public class Consume extends BaseEntity {
|
|||
// 商品id
|
||||
private Long productId;
|
||||
|
||||
// 商品类型 0模型 1工作流 2图片
|
||||
/**
|
||||
* 商品类型 0模型 1工作流 2图片 3社区 4社区提问 5金币 6提现
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
// 剩余金币
|
||||
private Double wallet;
|
||||
|
||||
// 消费时间
|
||||
private Date consumeDate;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class CommissionRatioVo {
|
|||
*/
|
||||
private Double ratio;
|
||||
/**
|
||||
* 提成类型,平台手续费、邀请人提成
|
||||
* 提成类型,平台手续费、邀请人提成、星球手续费
|
||||
*/
|
||||
private String ratioName;
|
||||
|
||||
|
|
|
@ -40,5 +40,5 @@ public class ConsumeVo {
|
|||
// 消费时间
|
||||
@ApiModelProperty(value = "消费时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date consumeDate;
|
||||
private Date createTime;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ public class CommissionRatioServiceImpl extends ServiceImpl<CommissionRatioMappe
|
|||
|
||||
redisCache.deleteObject("CommissionRationInviterUser");
|
||||
redisCache.deleteObject("CommissionRationMerchant");
|
||||
redisCache.deleteObject("CommissionRationCommunity");
|
||||
redisCache.deleteObject("CommissionRationFetch");
|
||||
|
||||
return this.getCommissionRatioVo(commissionRatio);
|
||||
}
|
||||
|
@ -66,11 +68,7 @@ public class CommissionRatioServiceImpl extends ServiceImpl<CommissionRatioMappe
|
|||
private CommissionRatioVo getCommissionRatioVo(CommissionRatio commissionRatio) {
|
||||
CommissionRatioVo vo = new CommissionRatioVo();
|
||||
BeanUtil.copyProperties(commissionRatio, vo);
|
||||
if (commissionRatio.getType() == 0) {
|
||||
vo.setRatioName("平台手续费");
|
||||
} else if (commissionRatio.getType() == 1) {
|
||||
vo.setRatioName("邀请人提成");
|
||||
}
|
||||
vo.setRatioName(commissionRatio.getDescription());
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue