Revert "去掉动态模块"
This reverts commit 94b9063dd634128125744c2b538695e13c305077.
This commit is contained in:
parent
94b9063dd6
commit
d9ff507e5f
@ -434,8 +434,19 @@ public enum CommonErrorEnum implements IResponseErrorCode {
|
||||
*/
|
||||
EMOJI_EXIST_DONT_BUY_ERROR(2080, "You already own the emoji, no need to re-purchase"),
|
||||
|
||||
/**
|
||||
* 资源不足.
|
||||
/**
|
||||
* 财富与魅力等级过低,无法发布动态.
|
||||
*/
|
||||
WEALTH_AND_CHARM_INSUFFICIENT_ERROR(2081,
|
||||
"Wealth and Charisma levels are not eligible for posting, please upgrade your level"),
|
||||
|
||||
/**
|
||||
* 今日动态已达上限.
|
||||
*/
|
||||
DYNAMIC_QUANTITY_LIMIT_ERROR(2082, "You have reached the maximum number of posts today"),
|
||||
|
||||
/**
|
||||
* 资源不足.
|
||||
*/
|
||||
LACK_OF_RESOURCES(2083, "lack of resources"),
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package com.red.circle.common.business.core.enums;
|
||||
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 资料审批类型.
|
||||
@ -67,8 +68,18 @@ public enum DataApprovalTypeEnum {
|
||||
*/
|
||||
FAMILY_NOTICE("家族公告", Type.TEXT),
|
||||
|
||||
/**
|
||||
* 团队头像.
|
||||
/**
|
||||
* 举报动态.
|
||||
*/
|
||||
DYNAMIC_REPORT("举报动态", Type.TEXT),
|
||||
|
||||
/**
|
||||
* 动态内容.
|
||||
*/
|
||||
DYNAMIC_CONTENT("动态内容", Type.IMAGE),
|
||||
|
||||
/**
|
||||
* 团队头像.
|
||||
*/
|
||||
TEAM_AVATAR("团队头像", Type.IMAGE),
|
||||
|
||||
@ -96,7 +107,12 @@ public enum DataApprovalTypeEnum {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Map<DataApprovalTypeEnum, String> approvalVal(String val) {
|
||||
public static Boolean checkDynamic(DataApprovalTypeEnum type) {
|
||||
return Objects.equals(type, DYNAMIC_CONTENT) ||
|
||||
Objects.equals(type, DYNAMIC_REPORT);
|
||||
}
|
||||
|
||||
public Map<DataApprovalTypeEnum, String> approvalVal(String val) {
|
||||
Map<DataApprovalTypeEnum, String> paramMap = CollectionUtils.newHashMap();
|
||||
paramMap.put(this, val);
|
||||
return paramMap;
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package com.red.circle.common.business.core.enums;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 动态业务类型.
|
||||
*
|
||||
* @author pengshigang on 2022/4/11
|
||||
*/
|
||||
public enum DynamicEventTypeEnum {
|
||||
|
||||
/**
|
||||
* 创建动态.
|
||||
*/
|
||||
CREATE,
|
||||
|
||||
/**
|
||||
* 自己删除动态.
|
||||
*/
|
||||
DELETE,
|
||||
|
||||
/**
|
||||
* 系统删除动态.
|
||||
*/
|
||||
SYSTEM_DELETE,
|
||||
|
||||
/**
|
||||
* 取关对方.
|
||||
*/
|
||||
UNFOLLOW,
|
||||
|
||||
/**
|
||||
* 关注对方.
|
||||
*/
|
||||
FOLLOW;
|
||||
|
||||
public boolean eq(DynamicEventTypeEnum name) {
|
||||
return Objects.equals(this, name);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.red.circle.common.business.enums;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 动态消息类型.
|
||||
*
|
||||
* @author pengshigang on 2022/4/11
|
||||
*/
|
||||
public enum DynamicMessageEnum {
|
||||
|
||||
/**
|
||||
* 评论了我的动态.
|
||||
*/
|
||||
COMMENT_DYNAMIC,
|
||||
|
||||
/**
|
||||
* 回复了我的评论.
|
||||
*/
|
||||
REPLY_COMMENT,
|
||||
|
||||
/**
|
||||
* 点赞了我的动态.
|
||||
*/
|
||||
LIKE_DYNAMIC,
|
||||
|
||||
/**
|
||||
* 点赞了我的评论.
|
||||
*/
|
||||
LIKE_COMMENT,
|
||||
|
||||
/**
|
||||
* 动态礼物
|
||||
*/
|
||||
DYNAMIC_GIFT,
|
||||
|
||||
/**
|
||||
* 驳回举报.
|
||||
*/
|
||||
REPORT_FAIL,
|
||||
|
||||
/**
|
||||
* 举报成功.
|
||||
*/
|
||||
REPORT_SUCCESS,
|
||||
|
||||
/**
|
||||
* 我的违规动态已被系统删除.
|
||||
*/
|
||||
DYNAMIC_VIOLATION,
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为举报相关信息
|
||||
*
|
||||
* @param type 类型
|
||||
* @return true是 false不是
|
||||
*/
|
||||
public static Boolean isReportRelated(String type) {
|
||||
if (Objects.isNull(type)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
DynamicMessageEnum typeEnum = DynamicMessageEnum.valueOf(type);
|
||||
|
||||
return Objects.equals(typeEnum, REPORT_FAIL) ||
|
||||
Objects.equals(typeEnum, REPORT_SUCCESS) ||
|
||||
Objects.equals(typeEnum, DYNAMIC_VIOLATION);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.red.circle.mq.business.model.event.approval;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.common.business.core.enums.ApprovalStatusEnum;
|
||||
import com.red.circle.common.business.core.enums.DataApprovalTypeEnum;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.red.circle.common.business.core.enums.OpUserType;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
/**
|
||||
* @author pengliang on 2020/9/21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicEvent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 审批id.
|
||||
*/
|
||||
private Long approvalId;
|
||||
|
||||
/**
|
||||
* 审批人.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long approvalUserId;
|
||||
|
||||
/**
|
||||
* 操作审批人.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long opsUserId;
|
||||
|
||||
/**
|
||||
* 操作审批人类型.
|
||||
*/
|
||||
private OpUserType opUserType;
|
||||
|
||||
|
||||
/**
|
||||
* 违规类型.
|
||||
*/
|
||||
private DataApprovalTypeEnum approvalType;
|
||||
|
||||
/**
|
||||
* 审批状态.
|
||||
*/
|
||||
private ApprovalStatusEnum approvalStatus;
|
||||
|
||||
/**
|
||||
* 待审批审批信息.
|
||||
*/
|
||||
private List<ApprovalContentEvent> waitApprovalUser;
|
||||
|
||||
/**
|
||||
* 批 true App false 后台管理
|
||||
*/
|
||||
private Boolean originType;
|
||||
|
||||
@JsonIgnore
|
||||
public List<Long> getWaitApprovalUserIds() {
|
||||
return Optional.ofNullable(waitApprovalUser)
|
||||
.map(beApprovalList -> beApprovalList.stream().map(ApprovalContentEvent::getUserId)
|
||||
.distinct().collect(Collectors.toList()))
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Set<Long> getWaitApprovalUserIdsSet() {
|
||||
return Optional.ofNullable(waitApprovalUser)
|
||||
.map(beApprovalList -> beApprovalList.stream().map(ApprovalContentEvent::getUserId)
|
||||
.collect(Collectors.toSet()))
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List<Long> getWaitApprovalUserContentIds() {
|
||||
return Optional.ofNullable(waitApprovalUser)
|
||||
.map(beApprovalList -> beApprovalList.stream().map(ApprovalContentEvent::getContentId)
|
||||
.distinct().collect(Collectors.toList()))
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public boolean approvalPass() {
|
||||
return Objects.equals(approvalStatus, ApprovalStatusEnum.PASS);
|
||||
}
|
||||
|
||||
public boolean approvalNotPass() {
|
||||
return Objects.equals(approvalStatus, ApprovalStatusEnum.NOT_PASS);
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,15 +2,17 @@ package com.red.circle.mq.business.model.event.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.red.circle.common.business.core.enums.DataApprovalTypeEnum;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.red.circle.common.business.core.enums.DataApprovalTypeEnum;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import com.red.circle.tool.core.parse.DataTypeUtils;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@ -50,7 +52,24 @@ public class CensorProfileEvent implements Serializable {
|
||||
*/
|
||||
private Map<String, String> extValues = CollectionUtils.newHashMap();
|
||||
|
||||
public boolean checkUserAvatar() {
|
||||
private static final String DYNAMIC_ID = "dynamicId";
|
||||
|
||||
public Long dynamicId() {
|
||||
return Optional.ofNullable(extValues.get(DYNAMIC_ID))
|
||||
.map(DataTypeUtils::toLong)
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public CensorProfileEvent putDynamicId(Long dynamicId) {
|
||||
extValues.put(DYNAMIC_ID, Objects.toString(dynamicId));
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean checkDynamicContent() {
|
||||
return Objects.equals(approvalType, DataApprovalTypeEnum.DYNAMIC_CONTENT);
|
||||
}
|
||||
|
||||
public boolean checkUserAvatar() {
|
||||
return Objects.equals(approvalType, DataApprovalTypeEnum.AVATAR);
|
||||
}
|
||||
|
||||
@ -90,10 +109,11 @@ public class CensorProfileEvent implements Serializable {
|
||||
*
|
||||
* @return true 是图片 false 不是图片
|
||||
*/
|
||||
public boolean isImageType() {
|
||||
return checkUserAvatar()
|
||||
|| checkRoomAvatar()
|
||||
|| checkBackgroundPhoto()
|
||||
public boolean isImageType() {
|
||||
return checkUserAvatar()
|
||||
|| checkDynamicContent()
|
||||
|| checkRoomAvatar()
|
||||
|| checkBackgroundPhoto()
|
||||
|| checkPersonalPhoto();
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.red.circle.mq.business.model.event.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.common.business.core.enums.DynamicEventTypeEnum;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 动态事件.
|
||||
*
|
||||
* @author pengshigang on 2022/4/11
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DynamicEvent implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 动态id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicContentId;
|
||||
|
||||
/**
|
||||
* 用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 被关注用户id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long followUserId;
|
||||
|
||||
/**
|
||||
* 评论id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long commentId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
private Timestamp timestamp;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private DynamicEventTypeEnum type;
|
||||
|
||||
/**
|
||||
* 区域.
|
||||
*/
|
||||
private String region;
|
||||
}
|
||||
@ -83,8 +83,13 @@ public class GiveAwayGiftBatchEvent implements Serializable {
|
||||
*/
|
||||
private Long roomId;
|
||||
|
||||
/**
|
||||
* 跟踪id.
|
||||
/**
|
||||
* 动态id
|
||||
*/
|
||||
private Long dynamicContentId;
|
||||
|
||||
/**
|
||||
* 跟踪id.
|
||||
*/
|
||||
@NotNull(message = "giftConfig required.")
|
||||
private Long trackId;
|
||||
|
||||
@ -97,8 +97,13 @@ public interface QueueNameConstant {
|
||||
*/
|
||||
String GAME_INDOOR_TEAM_PK = "GAME_INDOOR_TEAM_PK";
|
||||
|
||||
/**
|
||||
* 用户友谊卡片申请.
|
||||
/**
|
||||
* 动态.
|
||||
*/
|
||||
String DYNAMIC = "DYNAMIC";
|
||||
|
||||
/**
|
||||
* 用户友谊卡片申请.
|
||||
*/
|
||||
String USER_CARD_APPLY = "USER_CARD_APPLY";
|
||||
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package com.red.circle.mq.rocket.business.producer;
|
||||
|
||||
import com.red.circle.component.mq.MessageEvent;
|
||||
import com.red.circle.component.mq.service.FixedTopic;
|
||||
import com.red.circle.mq.business.model.event.dynamic.DynamicEvent;
|
||||
import com.red.circle.mq.rocket.business.service.MessageSenderService;
|
||||
import com.red.circle.mq.rocket.business.streams.DynamicSink;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 动态相关.
|
||||
*
|
||||
* @author pengshigang on 2022/4/11
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicMqMessage {
|
||||
|
||||
private final MessageSenderService senderService;
|
||||
|
||||
/**
|
||||
* 动态 - 业务处理.
|
||||
*/
|
||||
public void sendDynamic(String consumeId, DynamicEvent event) {
|
||||
senderService.sendEventMessage(MessageEvent.builder()
|
||||
.consumeId(consumeId)
|
||||
.topic(FixedTopic.RC_DEFAULT_APP_ORDINARY)
|
||||
.tag(DynamicSink.TAG)
|
||||
.body(event)
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.red.circle.mq.rocket.business.streams;
|
||||
|
||||
import com.red.circle.mq.rocket.business.constant.QueueNameConstant;
|
||||
|
||||
/**
|
||||
* @author pengshigang on 2022/4/13
|
||||
*/
|
||||
public interface DynamicSink {
|
||||
|
||||
String INPUT = QueueNameConstant.DYNAMIC;
|
||||
String TAG = "dynamic_v2";
|
||||
|
||||
}
|
||||
@ -181,8 +181,13 @@ public enum ConsoleErrorCode implements IResponseErrorCode {
|
||||
*/
|
||||
PLEASE_SELECT_TIME(10033, "Please select time"),
|
||||
|
||||
/**
|
||||
* 账号无权限
|
||||
/**
|
||||
* 用户动态不能重复插入
|
||||
*/
|
||||
USER_DYNAMICS_CANNOT_BE_INSERTED_REPEATEDLY(10034, "User dynamics cannot be inserted repeatedly"),
|
||||
|
||||
/**
|
||||
* 账号无权限
|
||||
*/
|
||||
ACCOUNT_NOT_PERMISSIONS(10035,"The account has no permissions."),
|
||||
|
||||
|
||||
@ -90,9 +90,14 @@ public enum NewsletterEvent {
|
||||
*/
|
||||
ACCEPT_NOBLE_VIP,
|
||||
|
||||
/**
|
||||
* 系统拉黑房间用户.
|
||||
*/
|
||||
/**
|
||||
* 动态消息数量.
|
||||
*/
|
||||
DYNAMIC_MESSAGE_QUANTITY,
|
||||
|
||||
/**
|
||||
* 系统拉黑房间用户.
|
||||
*/
|
||||
SYS_PULL_BLACK_ROOM_USER,
|
||||
|
||||
/**
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.approval;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.approval.api.ApprovalDataInfoClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
@FeignClient(name = "approvalDateInfoClient", url = "${feign.other.url}" +
|
||||
ApprovalDataInfoClientApi.API_PREFIX)
|
||||
public interface ApprovalDataInfoClient extends ApprovalDataInfoClientApi {
|
||||
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalDataInfoClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
@FeignClient(name = "approvalDateInfoClient", url = "${feign.other.url}" +
|
||||
ApprovalDataInfoClientApi.API_PREFIX)
|
||||
public interface ApprovalDataInfoClient extends ApprovalDataInfoClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalDynamicClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 审批动态
|
||||
*
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
@FeignClient(name = "ApprovalDynamicClient", url = "${feign.other.url}" +
|
||||
ApprovalDynamicClientApi.API_PREFIX)
|
||||
public interface ApprovalDynamicClient extends ApprovalDynamicClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalDynamicReportClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态投诉
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
@FeignClient(name = "approvalDynamicReportClient", url = "${feign.other.url}" +
|
||||
ApprovalDynamicReportClientApi.API_PREFIX)
|
||||
public interface ApprovalDynamicReportClient extends ApprovalDynamicReportClientApi {
|
||||
|
||||
}
|
||||
@ -1,15 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.approval;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.approval.api.ApprovalFamilySettingDataClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 家族资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
@FeignClient(name = "approvalFamilySettingDataClient", url = "${feign.other.url}" +
|
||||
ApprovalFamilySettingDataClientApi.API_PREFIX)
|
||||
public interface ApprovalFamilySettingDataClient extends ApprovalFamilySettingDataClientApi {
|
||||
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalFamilySettingDataClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 家族资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
@FeignClient(name = "approvalFamilySettingDataClient", url = "${feign.other.url}" +
|
||||
ApprovalFamilySettingDataClientApi.API_PREFIX)
|
||||
public interface ApprovalFamilySettingDataClient extends ApprovalFamilySettingDataClientApi {
|
||||
|
||||
}
|
||||
@ -1,15 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.approval;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.approval.api.ApprovalUserSettingInfoClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 用户审批相关列表
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
@FeignClient(name = "approvalUserSettingInfoClient", url = "${feign.other.url}" +
|
||||
ApprovalUserSettingInfoClientApi.API_PREFIX)
|
||||
public interface ApprovalUserSettingInfoClient extends ApprovalUserSettingInfoClientApi {
|
||||
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.ApprovalUserSettingInfoClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 用户审批相关列表
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
@FeignClient(name = "approvalUserSettingInfoClient", url = "${feign.other.url}" +
|
||||
ApprovalUserSettingInfoClientApi.API_PREFIX)
|
||||
public interface ApprovalUserSettingInfoClient extends ApprovalUserSettingInfoClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicBlacklistClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态-黑名单服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "dynamicBlacklistClient", url = "${feign.other.url}" +
|
||||
DynamicBlacklistClientApi.API_PREFIX)
|
||||
public interface DynamicBlacklistClient extends DynamicBlacklistClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicCacheClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态-缓存服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "dynamicCacheClient", url = "${feign.other.url}" +
|
||||
DynamicCacheClientApi.API_PREFIX)
|
||||
public interface DynamicCacheClient extends DynamicCacheClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicContentClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态-内容服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "dynamicContentClient", url = "${feign.other.url}" +
|
||||
DynamicContentClientApi.API_PREFIX)
|
||||
public interface DynamicContentClient extends DynamicContentClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicPictureClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态-内容服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "dynamicPictureClient", url = "${feign.other.url}" +
|
||||
DynamicPictureClientApi.API_PREFIX)
|
||||
public interface DynamicPictureClient extends DynamicPictureClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicTagClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态-内容服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "dynamicTagClient", url = "${feign.other.url}" +
|
||||
DynamicTagClientApi.API_PREFIX)
|
||||
public interface DynamicTagClient extends DynamicTagClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.DynamicTimelineClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
@FeignClient(name = "dynamicTimelineClient", url = "${feign.other.url}" +
|
||||
DynamicTimelineClientApi.API_PREFIX)
|
||||
public interface DynamicTimelineClient extends DynamicTimelineClientApi {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.dynamic.api.TopDynamicClientApi;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* 动态服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
@FeignClient(name = "topDynamicClient", url = "${feign.other.url}" +
|
||||
TopDynamicClientApi.API_PREFIX)
|
||||
public interface TopDynamicClient extends TopDynamicClientApi {
|
||||
|
||||
}
|
||||
@ -1,19 +1,19 @@
|
||||
package com.red.circle.other.inner.endpoint.approval.api;
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDateInfoCmd;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
public interface ApprovalDataInfoClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/data/client";
|
||||
|
||||
@PostMapping("/approval")
|
||||
ResultResponse<Void> approval(@RequestBody ApprovalDateInfoCmd cmd);
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDateInfoCmd;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
public interface ApprovalDataInfoClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/data/client";
|
||||
|
||||
@PostMapping("/approval")
|
||||
ResultResponse<Void> approval(@RequestBody ApprovalDateInfoCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicDTO;
|
||||
import java.util.Set;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 审批动态
|
||||
*
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
public interface ApprovalDynamicClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/dynamic/client";
|
||||
|
||||
@PostMapping("/pageApprovalDynamic")
|
||||
ResultResponse<PageResult<ApprovalDynamicDTO>> pageApprovalDynamic(
|
||||
@RequestBody ApprovalDynamicQryCmd query);
|
||||
|
||||
@PostMapping("/approvalPass")
|
||||
ResultResponse<Void> approvalPass(@RequestBody Set<Long> ids);
|
||||
|
||||
@PostMapping("/approvalNotPass")
|
||||
ResultResponse<Void> approvalNotPass(@RequestBody ApprovalDynamicCmd approvalDynamicCmd);
|
||||
|
||||
@PostMapping("/save")
|
||||
ResultResponse<Void> save(@RequestBody ApprovalDynamicContentCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicReportedDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 动态投诉
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
public interface ApprovalDynamicReportClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/dynamic/report";
|
||||
|
||||
@PostMapping("/pageData")
|
||||
ResultResponse<PageResult<ApprovalDynamicReportedDTO>> pageData(
|
||||
@RequestBody ApprovalDynamicReportQryCmd query);
|
||||
|
||||
@PostMapping("/report")
|
||||
ResultResponse<Void> report(@RequestBody ApprovalDynamicReportCmd cmd);
|
||||
}
|
||||
@ -1,26 +1,26 @@
|
||||
package com.red.circle.other.inner.endpoint.approval.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalFamilyCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalFamilyDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 家族资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
public interface ApprovalFamilySettingDataClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/family/client";
|
||||
|
||||
@PostMapping("/pageFamilyApproval")
|
||||
ResultResponse<PageResult<ApprovalFamilyDTO>> pageFamilyApproval(
|
||||
@RequestBody ApprovalProfileDescQryCmd query);
|
||||
|
||||
@PostMapping("/notPass")
|
||||
ResultResponse<Void> notPass(@RequestBody ApprovalFamilyCmd cmd);
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalFamilyCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalFamilyDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 家族资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/20
|
||||
*/
|
||||
public interface ApprovalFamilySettingDataClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/family/client";
|
||||
|
||||
@PostMapping("/pageFamilyApproval")
|
||||
ResultResponse<PageResult<ApprovalFamilyDTO>> pageFamilyApproval(
|
||||
@RequestBody ApprovalProfileDescQryCmd query);
|
||||
|
||||
@PostMapping("/notPass")
|
||||
ResultResponse<Void> notPass(@RequestBody ApprovalFamilyCmd cmd);
|
||||
}
|
||||
@ -1,28 +1,28 @@
|
||||
package com.red.circle.other.inner.endpoint.approval.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalUserProfileQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalProfileDescDTO;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalUserProfileDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 用户审批相关列表
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
public interface ApprovalUserSettingInfoClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/user-setting/client";
|
||||
|
||||
@PostMapping("/pageProfileDescApproval")
|
||||
ResultResponse<PageResult<ApprovalProfileDescDTO>> pageProfileDescApproval(
|
||||
@RequestBody ApprovalProfileDescQryCmd query);
|
||||
|
||||
@PostMapping("/pageUserProfileApproval")
|
||||
ResultResponse<PageResult<ApprovalUserProfileDTO>> pageUserProfileApproval(
|
||||
@RequestBody ApprovalUserProfileQryCmd query);
|
||||
}
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalUserProfileQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalProfileDescDTO;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalUserProfileDTO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 用户审批相关列表
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
public interface ApprovalUserSettingInfoClientApi {
|
||||
|
||||
String API_PREFIX = "/approval/user-setting/client";
|
||||
|
||||
@PostMapping("/pageProfileDescApproval")
|
||||
ResultResponse<PageResult<ApprovalProfileDescDTO>> pageProfileDescApproval(
|
||||
@RequestBody ApprovalProfileDescQryCmd query);
|
||||
|
||||
@PostMapping("/pageUserProfileApproval")
|
||||
ResultResponse<PageResult<ApprovalUserProfileDTO>> pageUserProfileApproval(
|
||||
@RequestBody ApprovalUserProfileQryCmd query);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.PageDynamicBlacklistDTO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 动态-黑名单服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface DynamicBlacklistClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/blacklist";
|
||||
|
||||
@GetMapping("/deleteByUserId")
|
||||
ResultResponse<Void> deleteByUserId(@RequestParam("userId") Long userId);
|
||||
|
||||
@PostMapping("/add")
|
||||
ResultResponse<Void> add(@RequestBody DynamicBlacklistCmd cmd);
|
||||
|
||||
@PostMapping("/pageDynamicBlacklist")
|
||||
ResultResponse<PageResult<PageDynamicBlacklistDTO>> pageDynamicBlacklist(
|
||||
@RequestBody DynamicBlacklistQryCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPopularConfigCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPopularConfigDTO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 动态-缓存服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface DynamicCacheClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/cache";
|
||||
|
||||
@GetMapping("/getDynamicPopularConfig")
|
||||
ResultResponse<DynamicPopularConfigDTO> getDynamicPopularConfig();
|
||||
|
||||
@PostMapping("/updateDynamicPopularConfig")
|
||||
ResultResponse<Void> updateDynamicPopularConfig(@RequestBody DynamicPopularConfigCmd param);
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DelDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicContentDTO;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.PageDynamicContentDTO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 动态-内容服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface DynamicContentClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/content";
|
||||
|
||||
@PostMapping("/deleteByIds")
|
||||
ResultResponse<Void> deleteByIds(@RequestBody DelDynamicContentCmd cmd);
|
||||
|
||||
@PostMapping("/pageDynamicContent")
|
||||
ResultResponse<PageResult<PageDynamicContentDTO>> pageDynamicContent(
|
||||
@RequestBody DynamicContentQryCmd cmd);
|
||||
|
||||
@GetMapping("/countDynamicMessage")
|
||||
ResultResponse<Long> countDynamicMessage(@RequestParam("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 添加动态内容
|
||||
* @param cmd
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
ResultResponse<Void> save(@RequestBody DynamicContentCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPictureCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTagCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.PageDynamicTagQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 动态-标签服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface DynamicPictureClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/picture";
|
||||
|
||||
@PostMapping("/save")
|
||||
ResultResponse<Void> save(@RequestBody DynamicPictureCmd build);
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTagCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.PageDynamicTagQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 动态-标签服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface DynamicTagClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/tag";
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
ResultResponse<Void> addOrUpdate(@RequestBody DynamicTagCmd dynamicTag);
|
||||
|
||||
@PostMapping("/pageData")
|
||||
ResultResponse<PageResult<DynamicTagDTO>> pageData(@RequestBody PageDynamicTagQryCmd query);
|
||||
|
||||
@GetMapping("/getAllDynamicTag")
|
||||
ResultResponse<Map<String, DynamicTagDTO>> getAllDynamicTag();
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDateInfoCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTimelineCmd;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 资料审批
|
||||
*
|
||||
* @author zongpubin on 2024/1/22
|
||||
*/
|
||||
public interface DynamicTimelineClientApi {
|
||||
|
||||
String API_PREFIX = "/dynamic/timeline/client";
|
||||
|
||||
@PostMapping("/save")
|
||||
ResultResponse<Void> save(@RequestBody DynamicTimelineCmd build);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.red.circle.other.inner.endpoint.dynamic.api;
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.TopDynamicCmd;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 动态-缓存服务.
|
||||
*
|
||||
* @author lisizhe on 2023/10/5
|
||||
*/
|
||||
public interface TopDynamicClientApi {
|
||||
|
||||
String API_PREFIX = "/top/dynamic";
|
||||
|
||||
@PostMapping("/setUpTop")
|
||||
ResultResponse<Void> setUpTop(@RequestBody TopDynamicCmd param);
|
||||
|
||||
@GetMapping("/closeTop")
|
||||
ResultResponse<Void> closeTop(@RequestParam("dynamicId") Long dynamicId);
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.red.circle.other.inner.asserts;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.IResponseErrorCode;
|
||||
import com.red.circle.framework.dto.ResErrorCode;
|
||||
|
||||
/**
|
||||
* 动态相关code, 范围: 2900 ~ 3000 状态.
|
||||
*
|
||||
* @author pengliang on 2019/10/19 23:25
|
||||
*/
|
||||
|
||||
@ResErrorCode(describe = "动态相关", minCode = 2900, maxCode = 3000)
|
||||
public enum DynamicErrorCode implements IResponseErrorCode {
|
||||
|
||||
/**
|
||||
* 重复提交.
|
||||
*/
|
||||
REPEATED_SUBMIT(2901, "repeated submit"),
|
||||
/**
|
||||
* 今日动态已达上限.
|
||||
*/
|
||||
DYNAMIC_QUANTITY_LIMIT_ERROR(2902, "You have reached the maximum number of posts today"),
|
||||
|
||||
/**
|
||||
* 动态标签不存在.
|
||||
*/
|
||||
TAG_IS_NULL(2903, "Tag does not exist"),
|
||||
|
||||
/**
|
||||
* 动态内容不存在.
|
||||
*/
|
||||
CONTENT_IS_NULL(2904, "content does not exist"),
|
||||
|
||||
/**
|
||||
* 动态内容已删除.
|
||||
*/
|
||||
CONTENT_DELETE(2905, "Content has been removed"),
|
||||
|
||||
/**
|
||||
* 图片最多上传九张.
|
||||
*/
|
||||
IMAGE_LIMIT_ERROR(2906, "Upload up to 9 pictures"),
|
||||
|
||||
/**
|
||||
* 财富与魅力等级过低,无法发布动态.
|
||||
*/
|
||||
WEALTH_AND_CHARM_INSUFFICIENT_ERROR(2907,
|
||||
"Wealth and Charisma levels are not eligible for posting, please upgrade your level"),
|
||||
|
||||
/**
|
||||
* 未找到相关信息.
|
||||
*/
|
||||
NO_RELATED_INFORMATION_FOUND(2908, "No related information found"),
|
||||
|
||||
/**
|
||||
* 动评论已删除.
|
||||
*/
|
||||
COMMENT_DELETED(2909, "Comment deleted"),
|
||||
|
||||
/**
|
||||
* 当前等级过低.
|
||||
*/
|
||||
CURRENT_LEVEL_IS_TOO_LOW(2910, "Current level is too low"),
|
||||
|
||||
/**
|
||||
* 已点赞.
|
||||
*/
|
||||
LIKED(2911, "Liked"),
|
||||
|
||||
/**
|
||||
* 已取消点赞.
|
||||
*/
|
||||
UNLIKED(2912, "Unliked"),
|
||||
/**
|
||||
* 重复投诉.
|
||||
*/
|
||||
REPEAT_COMPLAINT_ERROR(2913, "Complained"),
|
||||
/**
|
||||
*敏感词提示
|
||||
*/
|
||||
SENSITIVE_WORD_ERROR(2915,"Sensitive words, please modify and try again"),
|
||||
|
||||
/**
|
||||
* 重复投诉.
|
||||
*/
|
||||
CONTENT_FAIL(2999, "fail");
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
|
||||
DynamicErrorCode(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorCodeName() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,240 +1,243 @@
|
||||
package com.red.circle.other.inner.asserts;
|
||||
|
||||
import com.red.circle.framework.dto.IResponseErrorCode;
|
||||
import com.red.circle.framework.dto.ResErrorCode;
|
||||
|
||||
/**
|
||||
* Other service related error codes.
|
||||
*/
|
||||
@ResErrorCode(describe = "other service", minCode = 2900, maxCode = 3300)
|
||||
public enum OtherErrorCode implements IResponseErrorCode {
|
||||
|
||||
REPEATED_SUBMIT(2901, "repeated submit"),
|
||||
NO_RELATED_INFORMATION_FOUND(2908, "No related information found"),
|
||||
SENSITIVE_WORD_ERROR(2915, "Sensitive words, please modify and try again"),
|
||||
|
||||
/**
|
||||
* 道具券不存在
|
||||
*/
|
||||
PROP_COUPON_NOT_FOUND(3200, "Prop coupon not found"),
|
||||
|
||||
/**
|
||||
* 道具券不属于当前用户
|
||||
*/
|
||||
PROP_COUPON_NOT_BELONG_TO_USER(3201, "Prop coupon does not belong to the current user"),
|
||||
|
||||
/**
|
||||
* 道具券已使用
|
||||
*/
|
||||
PROP_COUPON_ALREADY_USED(3202, "Prop coupon has already been used"),
|
||||
|
||||
/**
|
||||
* 道具券已过期
|
||||
*/
|
||||
PROP_COUPON_EXPIRED(3203, "Prop coupon has expired"),
|
||||
|
||||
/**
|
||||
* 道具券类型不支持
|
||||
*/
|
||||
PROP_COUPON_TYPE_NOT_SUPPORT(3204, "Prop coupon type not supported"),
|
||||
|
||||
/**
|
||||
* 道具券已赠送
|
||||
*/
|
||||
PROP_COUPON_ALREADY_SENT(3205, "Prop coupon has already been sent"),
|
||||
|
||||
/**
|
||||
* 接收人不存在
|
||||
*/
|
||||
PROP_COUPON_RECEIVER_NOT_FOUND(3206, "Receiver not found"),
|
||||
|
||||
/**
|
||||
* 不能赠送给自己
|
||||
*/
|
||||
PROP_COUPON_CANNOT_SEND_TO_SELF(3207, "Cannot send coupon to yourself"),
|
||||
|
||||
/**
|
||||
* 道具不存在
|
||||
*/
|
||||
PROP_COUPON_PROP_NOT_FOUND(3208, "Prop not found"),
|
||||
|
||||
/**
|
||||
* 道具券生成失败
|
||||
*/
|
||||
PROP_COUPON_GENERATE_FAILED(3209, "Prop coupon generation failed"),
|
||||
|
||||
/**
|
||||
* 操作频繁,请稍后再试
|
||||
*/
|
||||
PROP_COUPON_OPERATION_TOO_FREQUENT(3210, "Operation too frequent, please try again later"),
|
||||
|
||||
/**
|
||||
* 道具券数量不足
|
||||
*/
|
||||
PROP_COUPON_QUANTITY_NOT_ENOUGH(3211, "Prop coupon quantity not enough"),
|
||||
|
||||
/**
|
||||
* 批量赠送用户数量超过限制
|
||||
*/
|
||||
PROP_COUPON_BATCH_USER_LIMIT(3212, "Batch user limit exceeded"),
|
||||
|
||||
/**
|
||||
* 道具券有效天数超过限制
|
||||
*/
|
||||
PROP_COUPON_VALID_DAYS_LIMIT(3213, "Valid days limit exceeded"),
|
||||
|
||||
/**
|
||||
* 道具已下架
|
||||
*/
|
||||
PROP_COUPON_OFF(3214, "This prop has been taken off the shelves"),
|
||||
|
||||
/**
|
||||
* 红包不存在
|
||||
*/
|
||||
RED_PACKET_NOT_FOUND(3260, "Red packet not found"),
|
||||
|
||||
/**
|
||||
* 红包已过期
|
||||
*/
|
||||
RED_PACKET_EXPIRED(3261, "Red packet has expired"),
|
||||
|
||||
/**
|
||||
* 红包已抢完
|
||||
*/
|
||||
RED_PACKET_FINISHED(3262, "Red packet has been claimed"),
|
||||
|
||||
/**
|
||||
* 您已经抢过该红包
|
||||
*/
|
||||
RED_PACKET_ALREADY_GRABBED(3263, "You have already claimed this red packet"),
|
||||
|
||||
/**
|
||||
* 您不在该房间内
|
||||
*/
|
||||
RED_PACKET_NOT_IN_ROOM(3264, "You are not in the room"),
|
||||
|
||||
/**
|
||||
* 余额不足
|
||||
*/
|
||||
RED_PACKET_INSUFFICIENT_BALANCE(3265, "Insufficient balance"),
|
||||
|
||||
/**
|
||||
* 红包金额配置错误
|
||||
*/
|
||||
RED_PACKET_AMOUNT_ERROR(3266, "Invalid red packet amount"),
|
||||
|
||||
/**
|
||||
* 红包数量配置错误
|
||||
*/
|
||||
RED_PACKET_COUNT_ERROR(3267, "Invalid red packet count"),
|
||||
|
||||
/**
|
||||
* 红包退款失败
|
||||
*/
|
||||
RED_PACKET_REFUND_FAILED(3268, "Red packet refund failed"),
|
||||
|
||||
/**
|
||||
* 红包创建失败
|
||||
*/
|
||||
RED_PACKET_CREATE_FAILED(3269, "Red packet creation failed"),
|
||||
|
||||
/**
|
||||
* 红包类型错误
|
||||
*/
|
||||
RED_PACKET_TYPE_ERROR(3270, "Invalid red packet type"),
|
||||
|
||||
/**
|
||||
* 红包过期时间配置错误
|
||||
*/
|
||||
RED_PACKET_EXPIRE_TIME_ERROR(3271, "Invalid expire time configuration"),
|
||||
|
||||
/**
|
||||
* 靓号已存在
|
||||
*/
|
||||
SPECIAL_ID_ALREADY_EXISTS(3272, "Special numbers already exist"),
|
||||
|
||||
/**
|
||||
* 用户充值金额无效
|
||||
*/
|
||||
USER_RECHARGE_INVALID(3273, "The recharge amount is insufficient to claim the reward"),
|
||||
|
||||
/**
|
||||
* 设备已被其他账号使用
|
||||
*/
|
||||
DEVICE_ALREADY_USED(3274, "Device has been used by another account"),
|
||||
|
||||
CANNOT_SEND_TO_SELF(40301, "You can't give yourself red envelopes"),
|
||||
|
||||
NOT_RED_PACKET_RECEIVER(40302, "You are not a red envelope recipient"),
|
||||
|
||||
/**
|
||||
* 用户财富等级不足10级
|
||||
*/
|
||||
USER_WEALTH_NEED_THAN_10(40303, "User wealth level needs to be greater than 10"),
|
||||
|
||||
/**
|
||||
* 签到配置不存在
|
||||
*/
|
||||
SIGN_IN_CONFIG_NOT_FOUND(3280, "Sign-in configuration not found"),
|
||||
|
||||
/**
|
||||
* 今天已经签到过了
|
||||
*/
|
||||
SIGN_IN_ALREADY_CHECKED(3281, "Already signed in today"),
|
||||
|
||||
/**
|
||||
* 不能提前签到
|
||||
*/
|
||||
SIGN_IN_CANNOT_ADVANCE(3282, "Cannot sign in advance"),
|
||||
|
||||
/**
|
||||
* 请先完成之前的签到或补签
|
||||
*/
|
||||
SIGN_IN_NEED_PREVIOUS(3283, "Please complete previous sign-ins or make-up first"),
|
||||
|
||||
/**
|
||||
* 只能补签过去的日期
|
||||
*/
|
||||
SIGN_IN_SUPPLEMENT_ONLY_PAST(3284, "Can only make up for past dates"),
|
||||
|
||||
/**
|
||||
* 该日期已经签到
|
||||
*/
|
||||
SIGN_IN_DATE_ALREADY_CHECKED(3285, "This date has already been signed in"),
|
||||
|
||||
/**
|
||||
* 签到操作频繁
|
||||
*/
|
||||
SIGN_IN_OPERATION_TOO_FREQUENT(3286, "Sign-in operation too frequent, please try again later"),
|
||||
|
||||
CONSECUTIVE_REWARD(3287, "Consecutive Check-in Reward!"),
|
||||
|
||||
/**
|
||||
* 请先取消cp关系
|
||||
*/
|
||||
CANCEL_CP_RELATION_FIRST(3288, "Please cancel the cp relationship first"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
OtherErrorCode(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorCodeName() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
||||
package com.red.circle.other.inner.asserts;
|
||||
|
||||
import com.red.circle.framework.dto.IResponseErrorCode;
|
||||
import com.red.circle.framework.dto.ResErrorCode;
|
||||
|
||||
/**
|
||||
* 道具券相关错误码 范围:3200 ~ 3300
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-11-05
|
||||
*/
|
||||
@ResErrorCode(describe = "道具券相关", minCode = 3200, maxCode = 3300)
|
||||
public enum OtherErrorCode implements IResponseErrorCode {
|
||||
|
||||
/**
|
||||
* 道具券不存在
|
||||
*/
|
||||
PROP_COUPON_NOT_FOUND(3200, "Prop coupon not found"),
|
||||
|
||||
/**
|
||||
* 道具券不属于当前用户
|
||||
*/
|
||||
PROP_COUPON_NOT_BELONG_TO_USER(3201, "Prop coupon does not belong to the current user"),
|
||||
|
||||
/**
|
||||
* 道具券已使用
|
||||
*/
|
||||
PROP_COUPON_ALREADY_USED(3202, "Prop coupon has already been used"),
|
||||
|
||||
/**
|
||||
* 道具券已过期
|
||||
*/
|
||||
PROP_COUPON_EXPIRED(3203, "Prop coupon has expired"),
|
||||
|
||||
/**
|
||||
* 道具券类型不支持
|
||||
*/
|
||||
PROP_COUPON_TYPE_NOT_SUPPORT(3204, "Prop coupon type not supported"),
|
||||
|
||||
/**
|
||||
* 道具券已赠送
|
||||
*/
|
||||
PROP_COUPON_ALREADY_SENT(3205, "Prop coupon has already been sent"),
|
||||
|
||||
/**
|
||||
* 接收人不存在
|
||||
*/
|
||||
PROP_COUPON_RECEIVER_NOT_FOUND(3206, "Receiver not found"),
|
||||
|
||||
/**
|
||||
* 不能赠送给自己
|
||||
*/
|
||||
PROP_COUPON_CANNOT_SEND_TO_SELF(3207, "Cannot send coupon to yourself"),
|
||||
|
||||
/**
|
||||
* 道具不存在
|
||||
*/
|
||||
PROP_COUPON_PROP_NOT_FOUND(3208, "Prop not found"),
|
||||
|
||||
/**
|
||||
* 道具券生成失败
|
||||
*/
|
||||
PROP_COUPON_GENERATE_FAILED(3209, "Prop coupon generation failed"),
|
||||
|
||||
/**
|
||||
* 操作频繁,请稍后再试
|
||||
*/
|
||||
PROP_COUPON_OPERATION_TOO_FREQUENT(3210, "Operation too frequent, please try again later"),
|
||||
|
||||
/**
|
||||
* 道具券数量不足
|
||||
*/
|
||||
PROP_COUPON_QUANTITY_NOT_ENOUGH(3211, "Prop coupon quantity not enough"),
|
||||
|
||||
/**
|
||||
* 批量赠送用户数量超过限制
|
||||
*/
|
||||
PROP_COUPON_BATCH_USER_LIMIT(3212, "Batch user limit exceeded"),
|
||||
|
||||
/**
|
||||
* 道具券有效天数超过限制
|
||||
*/
|
||||
PROP_COUPON_VALID_DAYS_LIMIT(3213, "Valid days limit exceeded"),
|
||||
|
||||
/**
|
||||
* 道具已下架
|
||||
*/
|
||||
PROP_COUPON_OFF(3214, "This prop has been taken off the shelves"),
|
||||
|
||||
// ==================== 红包相关错误码 3260-3279 ====================
|
||||
|
||||
/**
|
||||
* 红包不存在
|
||||
*/
|
||||
RED_PACKET_NOT_FOUND(3260, "Red packet not found"),
|
||||
|
||||
/**
|
||||
* 红包已过期
|
||||
*/
|
||||
RED_PACKET_EXPIRED(3261, "Red packet has expired"),
|
||||
|
||||
/**
|
||||
* 红包已抢完
|
||||
*/
|
||||
RED_PACKET_FINISHED(3262, "Red packet has been claimed"),
|
||||
|
||||
/**
|
||||
* 您已经抢过该红包
|
||||
*/
|
||||
RED_PACKET_ALREADY_GRABBED(3263, "You have already claimed this red packet"),
|
||||
|
||||
/**
|
||||
* 您不在该房间内
|
||||
*/
|
||||
RED_PACKET_NOT_IN_ROOM(3264, "You are not in the room"),
|
||||
|
||||
/**
|
||||
* 余额不足
|
||||
*/
|
||||
RED_PACKET_INSUFFICIENT_BALANCE(3265, "Insufficient balance"),
|
||||
|
||||
/**
|
||||
* 红包金额配置错误
|
||||
*/
|
||||
RED_PACKET_AMOUNT_ERROR(3266, "Invalid red packet amount"),
|
||||
|
||||
/**
|
||||
* 红包数量配置错误
|
||||
*/
|
||||
RED_PACKET_COUNT_ERROR(3267, "Invalid red packet count"),
|
||||
|
||||
/**
|
||||
* 红包退款失败
|
||||
*/
|
||||
RED_PACKET_REFUND_FAILED(3268, "Red packet refund failed"),
|
||||
|
||||
/**
|
||||
* 红包创建失败
|
||||
*/
|
||||
RED_PACKET_CREATE_FAILED(3269, "Red packet creation failed"),
|
||||
|
||||
/**
|
||||
* 红包类型错误
|
||||
*/
|
||||
RED_PACKET_TYPE_ERROR(3270, "Invalid red packet type"),
|
||||
|
||||
/**
|
||||
* 红包过期时间配置错误
|
||||
*/
|
||||
RED_PACKET_EXPIRE_TIME_ERROR(3271, "Invalid expire time configuration"),
|
||||
|
||||
/**
|
||||
* 靓号已存在
|
||||
*/
|
||||
SPECIAL_ID_ALREADY_EXISTS(3272, "Special numbers already exist"),
|
||||
|
||||
/**
|
||||
* 用户充值金额无效
|
||||
*/
|
||||
USER_RECHARGE_INVALID(3273, "The recharge amount is insufficient to claim the reward"),
|
||||
|
||||
/**
|
||||
* 设备已被其他账号使用
|
||||
*/
|
||||
DEVICE_ALREADY_USED(3274, "Device has been used by another account"),
|
||||
|
||||
CANNOT_SEND_TO_SELF(40301, "You can't give yourself red envelopes"),
|
||||
|
||||
NOT_RED_PACKET_RECEIVER(40302, "You are not a red envelope recipient"),
|
||||
|
||||
/**
|
||||
* 用户财富等级不足10级
|
||||
*/
|
||||
USER_WEALTH_NEED_THAN_10(40303, "User wealth level needs to be greater than 10"),
|
||||
|
||||
// ==================== 签到相关错误码 3280-3299 ====================
|
||||
|
||||
/**
|
||||
* 签到配置不存在
|
||||
*/
|
||||
SIGN_IN_CONFIG_NOT_FOUND(3280, "Sign-in configuration not found"),
|
||||
|
||||
/**
|
||||
* 今天已经签到过了
|
||||
*/
|
||||
SIGN_IN_ALREADY_CHECKED(3281, "Already signed in today"),
|
||||
|
||||
/**
|
||||
* 不能提前签到
|
||||
*/
|
||||
SIGN_IN_CANNOT_ADVANCE(3282, "Cannot sign in advance"),
|
||||
|
||||
/**
|
||||
* 请先完成之前的签到或补签
|
||||
*/
|
||||
SIGN_IN_NEED_PREVIOUS(3283, "Please complete previous sign-ins or make-up first"),
|
||||
|
||||
/**
|
||||
* 只能补签过去的日期
|
||||
*/
|
||||
SIGN_IN_SUPPLEMENT_ONLY_PAST(3284, "Can only make up for past dates"),
|
||||
|
||||
/**
|
||||
* 该日期已经签到
|
||||
*/
|
||||
SIGN_IN_DATE_ALREADY_CHECKED(3285, "This date has already been signed in"),
|
||||
|
||||
/**
|
||||
* 签到操作频繁
|
||||
*/
|
||||
SIGN_IN_OPERATION_TOO_FREQUENT(3286, "Sign-in operation too frequent, please try again later"),
|
||||
|
||||
CONSECUTIVE_REWARD(3287, "Consecutive Check-in Reward!"),
|
||||
|
||||
/**
|
||||
* 请先取消cp关系
|
||||
*/
|
||||
CANCEL_CP_RELATION_FIRST(3288, "Please cancel the cp relationship first"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
OtherErrorCode(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorCodeName() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.red.circle.other.inner.model.cmd.approval;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 动态审批
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicCmd implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 动态ids
|
||||
*/
|
||||
private Set<Long> ids;
|
||||
|
||||
/**
|
||||
* 审批用户
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.red.circle.other.inner.model.cmd.approval;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 审批内容模型.
|
||||
*
|
||||
* @author pengliang on 2020/9/18
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicContentCmd implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 系统来源
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 被审批用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 内容id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 类型 0图文 1视频
|
||||
*/
|
||||
private Integer dynamicType;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 审批来源 1APP 0后台
|
||||
*/
|
||||
private Boolean originType;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private Long updateUser;
|
||||
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.red.circle.other.inner.model.cmd.approval;
|
||||
|
||||
import com.red.circle.common.business.dto.cmd.HistoryRangeTimeQryPageCmd;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态审批
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalDynamicQryCmd extends HistoryRangeTimeQryPageCmd {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 类型 0:图文 1:动态
|
||||
*/
|
||||
private Integer dynamicType;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDateTime startCreateDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endCreateDate;
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.red.circle.other.inner.model.cmd.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 投诉动态.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicReportCmd implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 内容id.
|
||||
*/
|
||||
@NotNull
|
||||
private Set<Long> contentIds;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.删除 2.驳回).
|
||||
*/
|
||||
@NotNull
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 审批人.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long approvalUserId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.red.circle.other.inner.model.cmd.approval;
|
||||
|
||||
import com.red.circle.common.business.dto.cmd.HistoryRangeTimeQryPageCmd;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 投诉动态.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-18
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApprovalDynamicReportQryCmd extends HistoryRangeTimeQryPageCmd {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.违规 2.未违规).
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 违规类型
|
||||
*/
|
||||
private Integer reportType;
|
||||
|
||||
/**
|
||||
* 投诉用户.
|
||||
*/
|
||||
private Long reportUserId;
|
||||
|
||||
/**
|
||||
* 被投诉用户.
|
||||
*/
|
||||
private Long reportedUserId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.CommonCommand;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xiongcheng on 2024/3/26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class CreateDynamicVideoCmd extends CommonCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<DynamicVideoCmd> dynamicVideoCmdList;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public static class DynamicVideoCmd extends CommonCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
|
||||
/**
|
||||
* 用户Id.
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 类型.
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 地址url
|
||||
*/
|
||||
private String sourceUrl;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 是否为自己发的朋友圈(1.是 0.否).
|
||||
*/
|
||||
private Boolean own;
|
||||
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
private String languageType;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.CommonCommand;
|
||||
import java.io.Serial;
|
||||
import java.util.Set;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 投诉动态.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DelDynamicContentCmd extends CommonCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Set<Long> ids;
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.CommonCommand;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-黑名单 .
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DynamicBlacklistCmd extends CommonCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 平台.
|
||||
*/
|
||||
@NotBlank(message = "请选择系统平台")
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 用户.
|
||||
*/
|
||||
@NotBlank(message = "输入账号")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.PageCommand;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态黑名单.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicBlacklistQryCmd extends PageCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 系统平台
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xiongcheng on 2024/3/26
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
public class DynamicContentCmd implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 内容.
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 位置.
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 标签ID.
|
||||
*/
|
||||
private Long tagId;
|
||||
|
||||
/**
|
||||
* 是否已删除(0.否 1.是).
|
||||
*/
|
||||
private Boolean del;
|
||||
|
||||
/**
|
||||
* 动态区域
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
private String languageType;
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.common.business.dto.cmd.HistoryRangeTimeQryPageCmd;
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.checkerframework.common.returnsreceiver.qual.This;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态内容.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicContentQryCmd extends HistoryRangeTimeQryPageCmd {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 是否置顶(true置顶,false不置顶)
|
||||
*/
|
||||
private Boolean top;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime startCreateDate;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime endCreateDate;
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.io.Serial;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态图片
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicPictureCmd extends DTO {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 动态内容ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 资源图片地址.
|
||||
*/
|
||||
private String resourceUrl;
|
||||
|
||||
/**
|
||||
* 压缩后的资源图片地址.
|
||||
*/
|
||||
private String miniResourceUrl;
|
||||
|
||||
/**
|
||||
* 图片宽.
|
||||
*/
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 图片高.
|
||||
*/
|
||||
private Integer height;
|
||||
|
||||
/**
|
||||
* 序号.
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 违规状态.
|
||||
*/
|
||||
private String violation;
|
||||
|
||||
/**
|
||||
* 机器审核标签.
|
||||
*/
|
||||
private String labelNames;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-热门权重分设置 .
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-27
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DynamicPopularConfigCmd implements Serializable {
|
||||
|
||||
/**
|
||||
* 评论计分.
|
||||
*/
|
||||
private Integer commentScore;
|
||||
|
||||
/**
|
||||
* 点赞计分.
|
||||
*/
|
||||
private Integer likeScore;
|
||||
|
||||
/**
|
||||
* 等级限制.
|
||||
*/
|
||||
private Long levelLimit;
|
||||
|
||||
/**
|
||||
* 数量限制.
|
||||
*/
|
||||
private Long quantityLimit;
|
||||
|
||||
/**
|
||||
* 数量限制.
|
||||
*/
|
||||
private Long dynamicFees;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.CommonCommand;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-朋友圈标签.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicTagCmd extends CommonCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 标签.
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 描述.
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 背景图.
|
||||
*/
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 0.上架 1.下架.
|
||||
*/
|
||||
private Boolean del;
|
||||
|
||||
/**
|
||||
* 排序.
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 语言类型
|
||||
*/
|
||||
private String languageType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xiongcheng on 2024/3/26
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
public class DynamicTimelineCmd {
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 朋友圈信息ID.
|
||||
*/
|
||||
private Long dynamicContentId;
|
||||
|
||||
/**
|
||||
* 是否为自己发的朋友圈(1.是 0.否).
|
||||
*/
|
||||
private Boolean own;
|
||||
|
||||
/**
|
||||
* 动态区域
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private Long updateUser;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.dto.PageCommand;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-朋友圈标签.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PageDynamicTagQryCmd extends PageCommand {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 0.上架 1.下架.
|
||||
*/
|
||||
private Boolean del;
|
||||
|
||||
/**
|
||||
* 语言类型
|
||||
*/
|
||||
private String languageType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.red.circle.other.inner.model.cmd.dynamic;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 投诉动态.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class TopDynamicCmd implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 动态id.
|
||||
*/
|
||||
@NotNull
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 归属系统.
|
||||
*/
|
||||
@NotBlank
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 权重.
|
||||
*/
|
||||
@NotNull
|
||||
private Integer weights;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.red.circle.other.inner.model.dto.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPictureDTO;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 审批动态
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 动态内容id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 审批状态.
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 动态文字内容
|
||||
*/
|
||||
private String dynamicContent;
|
||||
|
||||
/**
|
||||
* 动态内容图片
|
||||
*/
|
||||
private List<DynamicPictureDTO> pictures;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男,2 变性人
|
||||
*/
|
||||
private String userSexName;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.red.circle.other.inner.model.dto.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPictureDTO;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 被举报动态
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-19
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicReportedDTO implements Serializable {
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 举报用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long reportUserId;
|
||||
|
||||
/**
|
||||
* 被举报用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long reportedUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 0.非法信息 1.人身攻击 2.不适当的内容 3.发送垃圾邮件 4.诈骗 5.涉及色情.
|
||||
*/
|
||||
private Integer reportType;
|
||||
|
||||
/**
|
||||
* 0.非法信息 1.人身攻击 2.不适当的内容 3.发送垃圾邮件 4.诈骗 5.涉及色情.
|
||||
*/
|
||||
private String reportTypeName;
|
||||
|
||||
/**
|
||||
* 举报类容.
|
||||
*/
|
||||
private String reportedContent;
|
||||
|
||||
/**
|
||||
* 举报图片
|
||||
*/
|
||||
private String reportedUrls;
|
||||
|
||||
/**
|
||||
* 动态图片.
|
||||
*/
|
||||
private List<DynamicPictureDTO> dynamicPictures;
|
||||
|
||||
/**
|
||||
* 动态内容.
|
||||
*/
|
||||
private String dynamicContent;
|
||||
|
||||
/**
|
||||
* 动态内容ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicContentId;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.违规 2.未违规).
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.违规 2.未违规).
|
||||
*/
|
||||
private String approvalStatusName;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xiongcheng on 2024/3/26
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
public class DynamicContentDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 内容.
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 位置.
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 标签ID.
|
||||
*/
|
||||
private Long tagId;
|
||||
|
||||
/**
|
||||
* 是否已删除(0.否 1.是).
|
||||
*/
|
||||
private Boolean del;
|
||||
|
||||
/**
|
||||
* 动态区域
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private Long updateUser;
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.io.Serial;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态图片
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicPictureDTO extends DTO {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 动态内容ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 创建动态的用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 资源图片地址.
|
||||
*/
|
||||
private String resourceUrl;
|
||||
|
||||
/**
|
||||
* 图片宽.
|
||||
*/
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 图片高.
|
||||
*/
|
||||
private Integer height;
|
||||
|
||||
/**
|
||||
* 序号.
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 违规状态.
|
||||
*/
|
||||
private String violation;
|
||||
private String violationName;
|
||||
|
||||
/**
|
||||
* 机器审核标签.
|
||||
*/
|
||||
private String labelNames;
|
||||
|
||||
/**
|
||||
* 用户昵称.
|
||||
*/
|
||||
private String userNickname;
|
||||
|
||||
/**
|
||||
* 年龄.
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男.
|
||||
*/
|
||||
private String userSexName;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男.
|
||||
*/
|
||||
private Integer userSex;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-热门权重分设置 .
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-27
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DynamicPopularConfigDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 评论计分.
|
||||
*/
|
||||
private Integer commentScore;
|
||||
|
||||
/**
|
||||
* 点赞计分.
|
||||
*/
|
||||
private Integer likeScore;
|
||||
|
||||
/**
|
||||
* 等级限制.
|
||||
*/
|
||||
private Long levelLimit;
|
||||
|
||||
/**
|
||||
* 数量限制.
|
||||
*/
|
||||
private Long quantityLimit;
|
||||
|
||||
/**
|
||||
* 数量限制.
|
||||
*/
|
||||
private Long dynamicFees;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.io.Serial;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-朋友圈标签.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class DynamicTagDTO extends DTO {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 标签.
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 描述.
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 背景图.
|
||||
*/
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 0.上架 1.下架.
|
||||
*/
|
||||
private Boolean del;
|
||||
|
||||
/**
|
||||
* 排序.
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 语言类型
|
||||
*/
|
||||
private String languageType;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.io.Serial;
|
||||
import java.sql.Timestamp;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-黑名单.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PageDynamicBlacklistDTO extends DTO {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 用户ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 修改用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long updateUser;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.red.circle.other.inner.model.dto.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态内容
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PageDynamicContentDTO extends DTO {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 动态文字内容.
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 是否置顶(true置顶, false不置顶).
|
||||
*/
|
||||
private Boolean top;
|
||||
|
||||
/**
|
||||
* 权重.
|
||||
*/
|
||||
private Integer weights;
|
||||
|
||||
/**
|
||||
* 动态内容图片.
|
||||
*/
|
||||
private List<DynamicPictureDTO> pictures;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男,2 变性人.
|
||||
*/
|
||||
private String userSexName;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long createUser;
|
||||
|
||||
}
|
||||
@ -10,7 +10,7 @@ import com.red.circle.other.inner.model.dto.user.props.UserUsePropsDTO;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户简化资料(用于列表等场景,减少数据传输量).
|
||||
* 用户简化资料(用于动态列表等场景,减少数据传输量).
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2025-01-29
|
||||
|
||||
@ -534,8 +534,13 @@ public enum GoldOrigin {
|
||||
*/
|
||||
BUY_EMOJI("Buy Emoji"),
|
||||
|
||||
/**
|
||||
* 每周游戏任务奖励.
|
||||
/**
|
||||
* 超限制发动态支付金币.
|
||||
*/
|
||||
SEND_DYNAMIC_PAY_GOLD("Send a post to pay coins"),
|
||||
|
||||
/**
|
||||
* 每周游戏任务奖励.
|
||||
*/
|
||||
WEEKLY_GAME_TASKS("Weekly game tasks"),
|
||||
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
package com.red.circle.console.adapter.app.approval;
|
||||
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicCO;
|
||||
import com.red.circle.console.app.service.app.approval.ApprovalDynamicContentService;
|
||||
import com.red.circle.console.infra.annotations.OpsOperationReqLog;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicQryCmd;
|
||||
import java.util.Set;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态图片审批 前端控制器
|
||||
*
|
||||
* @author pegnshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/approval/dynamic/content")
|
||||
@AllArgsConstructor
|
||||
public class ApprovalDynamicContentController extends BaseController {
|
||||
|
||||
private final ApprovalDynamicContentService approvalDynamicContentService;
|
||||
|
||||
/**
|
||||
* 加载动态图片
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public PageResult<ApprovalDynamicCO> page(
|
||||
ApprovalDynamicQryCmd query) {
|
||||
return approvalDynamicContentService.page(query);
|
||||
}
|
||||
|
||||
@OpsOperationReqLog("动态内容审批-通过")
|
||||
@PostMapping("/pass")
|
||||
public void approvalPass(@RequestBody Set<Long> ids) {
|
||||
approvalDynamicContentService.approvalPass(ids);
|
||||
}
|
||||
|
||||
@OpsOperationReqLog("动态内容审批-不通过")
|
||||
@PostMapping("/not/pass")
|
||||
public void approvalNotPass(@RequestBody Set<Long> ids) {
|
||||
approvalDynamicContentService.approvalNotPass(ids, getReqUserId());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.red.circle.console.adapter.app.approval;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicReportedCO;
|
||||
import com.red.circle.console.app.service.app.approval.ApprovalDynamicReportService;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportQryCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态-投诉 前端控制器.
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-18
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/dynamic/report")
|
||||
public class ApprovalDynamicReportRestController extends BaseController {
|
||||
|
||||
private final ApprovalDynamicReportService approvalDynamicReportService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public PageResult<ApprovalDynamicReportedCO> pageData(ApprovalDynamicReportQryCmd query) {
|
||||
return approvalDynamicReportService.pageData(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理投诉
|
||||
*/
|
||||
@PostMapping
|
||||
public void report(@RequestBody @Validated ApprovalDynamicReportCmd cmd) {
|
||||
cmd.setApprovalUserId(getReqUserId());
|
||||
approvalDynamicReportService.report(cmd);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.red.circle.console.adapter.app.dynamic;
|
||||
|
||||
import com.red.circle.console.app.service.app.dynamic.DynamicBlacklistService;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态-黑名单 前端控制器.
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/dynamic/blacklist")
|
||||
public class DynamicBlacklistRestController extends BaseController {
|
||||
|
||||
private final DynamicBlacklistService dynamicBlacklistService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public PageResult<UserProfileDTO> pageData(DynamicBlacklistQryCmd query) {
|
||||
return dynamicBlacklistService.page(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加.
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public void add(@RequestBody @Validated DynamicBlacklistCmd param) {
|
||||
dynamicBlacklistService.add(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除.
|
||||
*/
|
||||
@GetMapping("/delete/{userId}")
|
||||
public void deleteByUserId(@PathVariable("userId") Long userId) {
|
||||
dynamicBlacklistService.deleteByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.red.circle.console.adapter.app.dynamic;
|
||||
|
||||
import com.red.circle.console.app.service.app.dynamic.DynamicPopularConfigService;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPopularConfigCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPopularConfigDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态-热门权重分设置 前端控制器.
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-27
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/dynamic/popular/config")
|
||||
public class DynamicPopularConfigRestController extends BaseController {
|
||||
|
||||
private final DynamicPopularConfigService dynamicPopularConfigService;
|
||||
|
||||
/**
|
||||
* 获得配置
|
||||
*/
|
||||
@GetMapping
|
||||
public DynamicPopularConfigDTO config() {
|
||||
|
||||
return dynamicPopularConfigService.config();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
*/
|
||||
@PostMapping
|
||||
public void addOrUpdate(@RequestBody @Validated DynamicPopularConfigCmd cmd) {
|
||||
dynamicPopularConfigService.addOrUpdate(cmd);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.red.circle.console.adapter.app.dynamic;
|
||||
|
||||
import com.red.circle.console.app.service.app.dynamic.DynamicTagService;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTagCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.PageDynamicTagQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态-标签 前端控制器.
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-15
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/dynamic/tag")
|
||||
public class DynamicTagRestController extends BaseController {
|
||||
|
||||
private final DynamicTagService dynamicTagService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public PageResult<DynamicTagDTO> pageData(PageDynamicTagQryCmd query) {
|
||||
return dynamicTagService.pageData(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加、更新
|
||||
*/
|
||||
@PostMapping("/add-or-update")
|
||||
public void addOrUpdate(@RequestBody @Validated DynamicTagCmd param) {
|
||||
dynamicTagService.addOrUpdate(param);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.red.circle.console.adapter.app.dynamic;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.dynamic.PageDynamicContentCO;
|
||||
import com.red.circle.console.app.service.app.dynamic.DynamicContentService;
|
||||
import com.red.circle.console.app.service.app.dynamic.TopDynamicService;
|
||||
import com.red.circle.console.infra.annotations.OpsOperationReqLog;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.CreateDynamicVideoCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DelDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentQryCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.TopDynamicCmd;
|
||||
import java.util.Set;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 用户动态 前端控制器
|
||||
*
|
||||
* @author pegnshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping(value = "/user/dynamic", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequiredArgsConstructor
|
||||
public class UserDynamicListController extends BaseController {
|
||||
|
||||
private final TopDynamicService topDynamicService;
|
||||
private final DynamicContentService dynamicContentService;
|
||||
|
||||
/**
|
||||
* 加载用户动态.
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public PageResult<PageDynamicContentCO> page(DynamicContentQryCmd query) {
|
||||
return dynamicContentService.page(query);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入动态视频
|
||||
*/
|
||||
@PostMapping("/create/video")
|
||||
public Integer createVideo(@Validated @RequestBody CreateDynamicVideoCmd cmd) {
|
||||
return dynamicContentService.createVideo(cmd);
|
||||
}
|
||||
|
||||
@OpsOperationReqLog("用户动态列表-删除用户动态")
|
||||
@PostMapping("/delete")
|
||||
public void deleteDynamic(@RequestBody Set<Long> ids) {
|
||||
DelDynamicContentCmd cmd = new DelDynamicContentCmd();
|
||||
cmd.setIds(ids);
|
||||
cmd.setReqUserId(getReqUserId());
|
||||
dynamicContentService.deleteByIds(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭置顶.
|
||||
*/
|
||||
@GetMapping("/closeTop/{dynamicId}")
|
||||
public void closeTop(@PathVariable("dynamicId") Long dynamicId) {
|
||||
topDynamicService.closeTop(dynamicId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加置顶.
|
||||
*/
|
||||
@PostMapping("/setUpTop")
|
||||
public void setUpTop(@Validated @RequestBody TopDynamicCmd param) {
|
||||
topDynamicService.setUpTop(param);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.red.circle.console.app.convertor.approval;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicCO;
|
||||
import com.red.circle.framework.core.convertor.ConvertorModel;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
@Mapper(componentModel = ConvertorModel.SPRING)
|
||||
public interface ApprovalDynamicAppConvertor {
|
||||
|
||||
ApprovalDynamicCO toApprovalDynamicCO(ApprovalDynamicDTO approvalDynamicDTO);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.red.circle.console.app.convertor.approval;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicReportedCO;
|
||||
import com.red.circle.framework.core.convertor.ConvertorModel;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicReportedDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
@Mapper(componentModel = ConvertorModel.SPRING)
|
||||
public interface ApprovalDynamicReportAppConvertor {
|
||||
|
||||
ApprovalDynamicReportedCO toApprovalDynamicReportedCO(
|
||||
ApprovalDynamicReportedDTO approvalDynamicReportedDTO);
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.red.circle.console.app.convertor.dynamic;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.dynamic.PageDynamicContentCO;
|
||||
import com.red.circle.framework.core.convertor.ConvertorModel;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.PageDynamicContentDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* @author pengliang on 2023/5/12
|
||||
*/
|
||||
@Mapper(componentModel = ConvertorModel.SPRING)
|
||||
public interface DynamicAppConvertor {
|
||||
|
||||
PageDynamicContentCO toPageDynamicContentCO(PageDynamicContentDTO dto);
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.red.circle.console.app.service.app.approval;
|
||||
|
||||
import com.red.circle.other.inner.endpoint.approval.ApprovalDataInfoClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalDataInfoClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDateInfoCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -0,0 +1,98 @@
|
||||
package com.red.circle.console.app.service.app.approval;
|
||||
|
||||
import com.red.circle.console.app.convertor.approval.ApprovalDynamicAppConvertor;
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicCO;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalDynamicClient;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicDTO;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 审批动态
|
||||
*
|
||||
* @author zongpubin on 2024/1/12
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ApprovalDynamicContentServiceImpl implements ApprovalDynamicContentService {
|
||||
|
||||
|
||||
private final UserProfileClient userProfileClient;
|
||||
|
||||
private final ApprovalDynamicClient approvalDynamicClient;
|
||||
private final ApprovalDynamicAppConvertor approvalDynamicAppConvertor;
|
||||
|
||||
@Override
|
||||
public PageResult<ApprovalDynamicCO> page(ApprovalDynamicQryCmd query) {
|
||||
|
||||
PageResult<ApprovalDynamicDTO> pageResult = ResponseAssert.requiredSuccess(
|
||||
approvalDynamicClient.pageApprovalDynamic(query));
|
||||
if (CollectionUtils.isEmpty(pageResult.getRecords())) {
|
||||
return pageResult.convert(approvalDynamicAppConvertor::toApprovalDynamicCO);
|
||||
}
|
||||
|
||||
Map<Long, UserProfileDTO> userMap = ResponseAssert.requiredSuccess(
|
||||
userProfileClient.mapByUserIds(getUserIds(pageResult)));
|
||||
|
||||
return pageResult.convert(approvalDynamicDTO -> {
|
||||
UserProfileDTO user = userMap.get(approvalDynamicDTO.getUserId());
|
||||
|
||||
ApprovalDynamicCO approvalDynamicCO = approvalDynamicAppConvertor.toApprovalDynamicCO(
|
||||
approvalDynamicDTO);
|
||||
|
||||
if (Objects.nonNull(user)) {
|
||||
approvalDynamicCO.setUserBaseInfo(user);
|
||||
approvalDynamicCO.setUserSexName(getSexName(user.getUserSex()));
|
||||
}else{
|
||||
approvalDynamicCO.setUserBaseInfo(new UserProfileDTO());
|
||||
approvalDynamicCO.setUserSexName(getSexName(2));
|
||||
}
|
||||
|
||||
return approvalDynamicCO;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void approvalPass(Set<Long> ids) {
|
||||
approvalDynamicClient.approvalPass(ids);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void approvalNotPass(Set<Long> ids, Long reqUserId) {
|
||||
ApprovalDynamicCmd approvalDynamicCmd = new ApprovalDynamicCmd();
|
||||
approvalDynamicCmd.setIds(ids);
|
||||
approvalDynamicCmd.setUserId(reqUserId);
|
||||
approvalDynamicClient.approvalNotPass(approvalDynamicCmd);
|
||||
|
||||
}
|
||||
|
||||
private String getSexName(Integer sex) {
|
||||
//用户性别:0 女,1 男,2 变性人
|
||||
if (Objects.equals(sex, 0)) {
|
||||
return "女";
|
||||
}
|
||||
if (Objects.equals(sex, 1)) {
|
||||
return "男";
|
||||
}
|
||||
return "未知";
|
||||
}
|
||||
|
||||
private Set<Long> getUserIds(PageResult<ApprovalDynamicDTO> iPage) {
|
||||
return iPage.getRecords().stream().map(ApprovalDynamicDTO::getUserId)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.red.circle.console.app.service.app.approval;
|
||||
|
||||
import com.red.circle.console.app.convertor.approval.ApprovalDynamicReportAppConvertor;
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicReportedCO;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalDynamicReportClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalDynamicReportedDTO;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 动态投诉
|
||||
*
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ApprovalDynamicReportServiceImpl implements ApprovalDynamicReportService {
|
||||
|
||||
private final UserProfileClient userProfileClient;
|
||||
private final ApprovalDynamicReportClient approvalDynamicReportClient;
|
||||
private final ApprovalDynamicReportAppConvertor approvalDynamicReportAppConvertor;
|
||||
|
||||
@Override
|
||||
public PageResult<ApprovalDynamicReportedCO> pageData(ApprovalDynamicReportQryCmd query) {
|
||||
PageResult<ApprovalDynamicReportedDTO> pageResult = ResponseAssert.requiredSuccess(
|
||||
approvalDynamicReportClient.pageData(query));
|
||||
if (CollectionUtils.isEmpty(pageResult.getRecords())) {
|
||||
return pageResult.convert(approvalDynamicReportAppConvertor::toApprovalDynamicReportedCO);
|
||||
}
|
||||
Map<Long, UserProfileDTO> userMap = ResponseAssert.requiredSuccess(
|
||||
userProfileClient.mapByUserIds(getUserIds(pageResult)));
|
||||
|
||||
var result = pageResult.convert(record -> {
|
||||
UserProfileDTO reportUser = userMap.get(record.getReportUserId());
|
||||
UserProfileDTO reportedUser = userMap.get(record.getReportedUserId());
|
||||
if (Objects.isNull(reportUser) || Objects.isNull(reportedUser)) {
|
||||
return null;
|
||||
}
|
||||
ApprovalDynamicReportedCO approvalDynamicReportedCO = approvalDynamicReportAppConvertor.toApprovalDynamicReportedCO(
|
||||
record);
|
||||
|
||||
approvalDynamicReportedCO.setReportUser(reportUser);
|
||||
approvalDynamicReportedCO.setReportedUser(reportedUser);
|
||||
return approvalDynamicReportedCO;
|
||||
});
|
||||
result.setRecords(result.getRecords().stream().filter(Objects::nonNull).collect(
|
||||
Collectors.toList()));
|
||||
return result;
|
||||
}
|
||||
|
||||
private Set<Long> getUserIds(PageResult<ApprovalDynamicReportedDTO> iPage) {
|
||||
Set<Long> userIds = iPage.getRecords().stream().map(ApprovalDynamicReportedDTO::getReportUserId)
|
||||
.collect(Collectors.toSet());
|
||||
userIds.addAll(
|
||||
iPage.getRecords().stream().map(ApprovalDynamicReportedDTO::getReportedUserId).collect(
|
||||
Collectors.toSet()));
|
||||
return userIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void report(ApprovalDynamicReportCmd cmd) {
|
||||
approvalDynamicReportClient.report(cmd);
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ import com.red.circle.console.app.convertor.approval.ApprovalFamilySettingDataAp
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalFamilyCO;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.approval.ApprovalFamilySettingDataClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalFamilySettingDataClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalFamilyCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalFamilyDTO;
|
||||
|
||||
@ -8,7 +8,7 @@ import com.red.circle.console.infra.database.rds.entity.admin.User;
|
||||
import com.red.circle.console.infra.database.rds.service.admin.UserService;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.approval.ApprovalUserSettingInfoClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalUserSettingInfoClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalProfileDescQryCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalUserProfileQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.approval.ApprovalProfileDescDTO;
|
||||
|
||||
@ -416,6 +416,11 @@ public class CountryDashboardServiceImpl implements CountryDashboardService {
|
||||
List<Criteria> criteria = baseGiftCriteria(condition);
|
||||
criteria.add(Criteria.where("luckyGift").ne(Boolean.TRUE));
|
||||
criteria.add(Criteria.where("originId").regex("^\\d+$"));
|
||||
criteria.add(new Criteria().orOperator(
|
||||
Criteria.where("dynamicContentId").exists(false),
|
||||
Criteria.where("dynamicContentId").is(null),
|
||||
Criteria.where("dynamicContentId").is("")
|
||||
));
|
||||
return aggregateGiftAmount(criteria, "$giftValue.actualAmount", false, condition.statTimezone);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicBlacklistClient;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.PageDynamicBlacklistDTO;
|
||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-黑名单 服务实现类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicBlacklistServiceImpl implements DynamicBlacklistService {
|
||||
|
||||
private final UserProfileClient userProfileClient;
|
||||
private final DynamicBlacklistClient dynamicBlacklistClient;
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByUserId(Long userId) {
|
||||
ResponseAssert.requiredSuccess(dynamicBlacklistClient.deleteByUserId(userId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(DynamicBlacklistCmd param) {
|
||||
|
||||
UserProfileDTO userProfile = ResponseAssert.requiredSuccess(userProfileClient
|
||||
.getByAccount(param.getSysOrigin(), param.getAccount()));
|
||||
|
||||
ResponseAssert.notNull(UserErrorCode.ACCOUNT_NOT_MATCH, userProfile);
|
||||
param.setUserId(userProfile.getId());
|
||||
ResponseAssert.requiredSuccess(dynamicBlacklistClient.add(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<UserProfileDTO> page(DynamicBlacklistQryCmd query) {
|
||||
PageResult<PageDynamicBlacklistDTO> pageResult = ResponseAssert.requiredSuccess(
|
||||
dynamicBlacklistClient.pageDynamicBlacklist(query));
|
||||
Map<Long, UserProfileDTO> userMap = ResponseAssert.requiredSuccess(
|
||||
userProfileClient.mapByUserIds(
|
||||
pageResult.getRecords().stream().map(PageDynamicBlacklistDTO::getUserId)
|
||||
.collect(Collectors.toSet())));
|
||||
|
||||
return pageResult.convert(blacklist -> {
|
||||
UserProfileDTO userProfile = userMap.get(blacklist.getUserId());
|
||||
userProfile.setCreateTime(blacklist.getCreateTime());
|
||||
return userProfile;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,198 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import com.alibaba.excel.exception.ExcelCommonException;
|
||||
import com.red.circle.common.business.core.enums.ApprovalStatusEnum;
|
||||
import com.red.circle.common.business.enums.ViolationEnum;
|
||||
import com.red.circle.component.redis.service.RedisService;
|
||||
import com.red.circle.console.app.convertor.dynamic.DynamicAppConvertor;
|
||||
import com.red.circle.console.app.dto.clienobject.dynamic.PageDynamicContentCO;
|
||||
import com.red.circle.console.inner.error.ConsoleErrorCode;
|
||||
import com.red.circle.external.inner.endpoint.oss.OssServiceClient;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.ApprovalDynamicClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicContentClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicPictureClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicTagClient;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicTimelineClient;
|
||||
import com.red.circle.other.inner.endpoint.user.region.RegionConfigClient;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.CreateDynamicVideoCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.CreateDynamicVideoCmd.DynamicVideoCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DelDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentQryCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPictureCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTimelineCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.PageDynamicContentDTO;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import com.red.circle.tool.core.sequence.IdWorkerUtils;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态内容 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-15
|
||||
*/
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicContentServiceImpl implements DynamicContentService {
|
||||
|
||||
private final RedisService redisService;
|
||||
private final OssServiceClient ossServiceClient;
|
||||
private final DynamicTagClient dynamicTagClient;
|
||||
private final UserProfileClient userProfileClient;
|
||||
private final RegionConfigClient regionConfigClient;
|
||||
private final DynamicAppConvertor dynamicAppConvertor;
|
||||
private final DynamicContentClient dynamicContentClient;
|
||||
private final DynamicPictureClient dynamicPictureClient;
|
||||
private final DynamicTimelineClient dynamicTimelineClient;
|
||||
private final ApprovalDynamicClient approvalDynamicClient;
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByIds(DelDynamicContentCmd cmd) {
|
||||
ResponseAssert.requiredSuccess(dynamicContentClient.deleteByIds(cmd));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PageDynamicContentCO> page(DynamicContentQryCmd query) {
|
||||
|
||||
PageResult<PageDynamicContentDTO> iPage = ResponseAssert.requiredSuccess(
|
||||
dynamicContentClient.pageDynamicContent(query));
|
||||
if (CollectionUtils.isEmpty(iPage.getRecords())) {
|
||||
return iPage.convert(dynamicAppConvertor::toPageDynamicContentCO);
|
||||
}
|
||||
|
||||
Map<Long, UserProfileDTO> userMap = ResponseAssert.requiredSuccess(
|
||||
userProfileClient.mapByUserIds(getUserIds(iPage)));
|
||||
|
||||
return iPage.convert(vo -> {
|
||||
PageDynamicContentCO dynamicContentCO = dynamicAppConvertor.toPageDynamicContentCO(vo);
|
||||
UserProfileDTO user = userMap.get(vo.getCreateUser());
|
||||
if (Objects.nonNull(user)) {
|
||||
dynamicContentCO.setUserBaseInfo(user);
|
||||
dynamicContentCO.setUserId(user.getId());
|
||||
dynamicContentCO.setUserSexName(getSexName(user.getUserSex()));
|
||||
}
|
||||
return dynamicContentCO;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer createVideo(CreateDynamicVideoCmd cmd) {
|
||||
// 获取导入的数据列表
|
||||
List<DynamicVideoCmd> dynamicVideoCmdList = cmd.getDynamicVideoCmdList();
|
||||
if (CollectionUtils.isEmpty(dynamicVideoCmdList)) {
|
||||
throw new RuntimeException("数据为空!");
|
||||
}
|
||||
String key = "create_user_dynamic_video_" + DigestUtil.md5Hex16(cmd.toString());
|
||||
ResponseAssert.isTrue(ConsoleErrorCode.USER_DYNAMICS_CANNOT_BE_INSERTED_REPEATEDLY,
|
||||
redisService.lock(key, 60 * 5));
|
||||
Set<Long> userIdSet = dynamicVideoCmdList.stream()
|
||||
.map(DynamicVideoCmd::getUserId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toSet());
|
||||
//获取用户所在的区域
|
||||
Map<Long, String> regionIdMap = regionConfigClient.mapRegionIdByUserIds(userIdSet).getBody();
|
||||
//获取所有标签
|
||||
Map<String, DynamicTagDTO> dynamicTagMap = dynamicTagClient.getAllDynamicTag().getBody();
|
||||
dynamicVideoCmdList.forEach(dynamicVideoCmd -> {
|
||||
Timestamp date = new Timestamp(System.currentTimeMillis());
|
||||
Long dynamicId = IdWorkerUtils.getId();
|
||||
//获取用户区域
|
||||
String regionId = regionIdMap.get(dynamicVideoCmd.getUserId());
|
||||
Long tagId = null;
|
||||
//获取动态标签
|
||||
if (CharSequenceUtil.isNotBlank(dynamicVideoCmd.getTag())) {
|
||||
DynamicTagDTO dynamicTagDTO = dynamicTagMap.get(dynamicVideoCmd.getTag());
|
||||
if (Objects.nonNull(dynamicTagDTO)) {
|
||||
tagId = dynamicTagDTO.getId();
|
||||
}
|
||||
}
|
||||
dynamicContentClient.save(DynamicContentCmd.builder()
|
||||
.id(dynamicId)
|
||||
.sysOrigin(dynamicVideoCmd.getSysOrigin())
|
||||
.content(dynamicVideoCmd.getContent())
|
||||
.del(Boolean.FALSE)
|
||||
.location("")
|
||||
.tagId(tagId)
|
||||
.region(regionId)
|
||||
.type(dynamicVideoCmd.getType())
|
||||
.languageType(dynamicVideoCmd.getLanguageType())
|
||||
.createTime(date)
|
||||
.createUser(cmd.requiredReqUserId())
|
||||
.updateTime(date)
|
||||
.build()
|
||||
);
|
||||
dynamicPictureClient.save(DynamicPictureCmd.builder()
|
||||
.id(IdWorkerUtils.getId())
|
||||
.dynamicId(dynamicId)
|
||||
.resourceUrl(ossServiceClient.getAccessUrl(dynamicVideoCmd.getSourceUrl()).getBody())
|
||||
.miniResourceUrl(
|
||||
ossServiceClient.processImgSaveAsCompressZoom(dynamicVideoCmd.getSourceUrl(),
|
||||
dynamicVideoCmd.getSourceUrl().replace(".", "-MINI-DYNAMIC."), 300).getBody())
|
||||
.violation(ViolationEnum.NORMAL.name())
|
||||
.createTime(date)
|
||||
.updateTime(date)
|
||||
.build()
|
||||
);
|
||||
dynamicTimelineClient.save(DynamicTimelineCmd.builder()
|
||||
.dynamicContentId(dynamicId)
|
||||
.own(dynamicVideoCmd.getOwn())
|
||||
.region(regionId)
|
||||
.createTime(date)
|
||||
.createUser(cmd.requiredReqUserId())
|
||||
.updateTime(date)
|
||||
.build()
|
||||
);
|
||||
approvalDynamicClient.save(ApprovalDynamicContentCmd.builder()
|
||||
.id(IdWorkerUtils.getId())
|
||||
.sysOrigin(dynamicVideoCmd.getSysOrigin())
|
||||
.userId(dynamicVideoCmd.getUserId())
|
||||
.dynamicId(dynamicId)
|
||||
.dynamicType(dynamicVideoCmd.getType())
|
||||
.approveStatus(ApprovalStatusEnum.PENDING.name())
|
||||
.originType(Boolean.FALSE)
|
||||
.createTime(date)
|
||||
.createUser(cmd.requiredReqUserId())
|
||||
.updateTime(date)
|
||||
.build()
|
||||
);
|
||||
});
|
||||
return dynamicVideoCmdList.size();
|
||||
}
|
||||
|
||||
private String getSexName(Integer sex) {
|
||||
//用户性别:0 女,1 男,2 变性人
|
||||
if (Objects.equals(sex, 0)) {
|
||||
return "女";
|
||||
}
|
||||
if (Objects.equals(sex, 1)) {
|
||||
return "男";
|
||||
}
|
||||
return "未知";
|
||||
}
|
||||
|
||||
private Set<Long> getUserIds(PageResult<PageDynamicContentDTO> iPage) {
|
||||
return iPage.getRecords().stream().map(PageDynamicContentDTO::getCreateUser)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicCacheClient;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPopularConfigCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPopularConfigDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-热门权重分设置 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-15
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicPopularConfigServiceImpl implements DynamicPopularConfigService {
|
||||
|
||||
private final DynamicCacheClient dynamicCacheClient;
|
||||
|
||||
/**
|
||||
* 获得配置
|
||||
*/
|
||||
@Override
|
||||
public DynamicPopularConfigDTO config() {
|
||||
return ResponseAssert.requiredSuccess(dynamicCacheClient.getDynamicPopularConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
*/
|
||||
@Override
|
||||
public void addOrUpdate(@RequestBody @Validated DynamicPopularConfigCmd param) {
|
||||
ResponseAssert.requiredSuccess(dynamicCacheClient.updateDynamicPopularConfig(param));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.DynamicTagClient;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTagCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.PageDynamicTagQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态标签 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-15
|
||||
*/
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicTagServiceImpl implements DynamicTagService {
|
||||
|
||||
private final DynamicTagClient dynamicTagClient;
|
||||
|
||||
@Override
|
||||
public void addOrUpdate(DynamicTagCmd tag) {
|
||||
|
||||
ResponseAssert.requiredSuccess(dynamicTagClient.addOrUpdate(tag));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<DynamicTagDTO> pageData(PageDynamicTagQryCmd query) {
|
||||
|
||||
return ResponseAssert.requiredSuccess(dynamicTagClient.pageData(query));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
import com.red.circle.other.inner.endpoint.dynamic.TopDynamicClient;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.TopDynamicCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统置顶动态 服务实现类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-17
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TopDynamicServiceImpl implements
|
||||
TopDynamicService {
|
||||
|
||||
private final TopDynamicClient topDynamicClient;
|
||||
|
||||
@Override
|
||||
public void setUpTop(TopDynamicCmd param) {
|
||||
|
||||
ResponseAssert.requiredSuccess(topDynamicClient.setUpTop(param));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeTop(Long dynamicId) {
|
||||
|
||||
ResponseAssert.requiredSuccess(topDynamicClient.closeTop(dynamicId));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.red.circle.console.app.dto.clienobject.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPictureDTO;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 审批动态
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicCO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 动态内容id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicId;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 审批状态.
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 动态文字内容
|
||||
*/
|
||||
private String dynamicContent;
|
||||
|
||||
/**
|
||||
* 动态内容图片
|
||||
*/
|
||||
private List<DynamicPictureDTO> pictures;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男,2 变性人
|
||||
*/
|
||||
private String userSexName;
|
||||
|
||||
/**
|
||||
* 被审批用户信息
|
||||
*/
|
||||
private UserProfileDTO userBaseInfo;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.red.circle.console.app.dto.clienobject.approval;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPictureDTO;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 被举报动态
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-19
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ApprovalDynamicReportedCO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 举报用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long reportUserId;
|
||||
|
||||
/**
|
||||
* 被举报用户.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long reportedUserId;
|
||||
|
||||
/**
|
||||
* 举报用户.
|
||||
*/
|
||||
private UserProfileDTO reportUser;
|
||||
|
||||
/**
|
||||
* 被举报用户.
|
||||
*/
|
||||
private UserProfileDTO reportedUser;
|
||||
|
||||
/**
|
||||
* 0.非法信息 1.人身攻击 2.不适当的内容 3.发送垃圾邮件 4.诈骗 5.涉及色情.
|
||||
*/
|
||||
private Integer reportType;
|
||||
|
||||
/**
|
||||
* 0.非法信息 1.人身攻击 2.不适当的内容 3.发送垃圾邮件 4.诈骗 5.涉及色情.
|
||||
*/
|
||||
private String reportTypeName;
|
||||
|
||||
/**
|
||||
* 举报类容.
|
||||
*/
|
||||
private String reportedContent;
|
||||
|
||||
|
||||
/**
|
||||
* 举报图片
|
||||
*/
|
||||
private String reportedUrls;
|
||||
|
||||
/**
|
||||
* 动态图片.
|
||||
*/
|
||||
private List<DynamicPictureDTO> dynamicPictures;
|
||||
|
||||
/**
|
||||
* 动态内容.
|
||||
*/
|
||||
private String dynamicContent;
|
||||
|
||||
/**
|
||||
* 动态内容ID.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long dynamicContentId;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.违规 2.未违规).
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 状态(0.待处理 1.违规 2.未违规).
|
||||
*/
|
||||
private String approvalStatusName;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.red.circle.console.app.dto.clienobject.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPictureDTO;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态内容
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-27
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PageDynamicContentCO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 来源系统.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 动态文字内容.
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 是否置顶(true置顶, false不置顶).
|
||||
*/
|
||||
private Boolean top;
|
||||
|
||||
/**
|
||||
* 权重.
|
||||
*/
|
||||
private Integer weights;
|
||||
|
||||
/**
|
||||
* 动态内容图片.
|
||||
*/
|
||||
private List<DynamicPictureDTO> pictures;
|
||||
|
||||
/**
|
||||
* 用户信息.
|
||||
*/
|
||||
private UserProfileDTO userBaseInfo;
|
||||
|
||||
/**
|
||||
* 用户性别:0 女,1 男,2 变性人.
|
||||
*/
|
||||
private String userSexName;
|
||||
|
||||
/**
|
||||
* 创建时间.
|
||||
*/
|
||||
private Timestamp createTime;
|
||||
|
||||
/**
|
||||
* 修改时间.
|
||||
*/
|
||||
private Timestamp updateTime;
|
||||
|
||||
/**
|
||||
* 创建用户.
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.red.circle.console.app.service.app.approval;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicCO;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicQryCmd;
|
||||
import java.util.Set;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 动态图片审批
|
||||
* @author zongpubin on 2024/1/12
|
||||
*/
|
||||
public interface ApprovalDynamicContentService {
|
||||
|
||||
PageResult<ApprovalDynamicCO> page(ApprovalDynamicQryCmd query);
|
||||
|
||||
void approvalPass(Set<Long> ids);
|
||||
|
||||
void approvalNotPass(Set<Long> ids, Long reqUserId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.red.circle.console.app.service.app.approval;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.approval.ApprovalDynamicReportedCO;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportCmd;
|
||||
import com.red.circle.other.inner.model.cmd.approval.ApprovalDynamicReportQryCmd;
|
||||
|
||||
/**
|
||||
* 动态投诉
|
||||
* @author zongpubin on 2024/1/19
|
||||
*/
|
||||
public interface ApprovalDynamicReportService {
|
||||
|
||||
PageResult<ApprovalDynamicReportedCO> pageData(ApprovalDynamicReportQryCmd query);
|
||||
|
||||
void report(ApprovalDynamicReportCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicBlacklistQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-黑名单 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
public interface DynamicBlacklistService {
|
||||
|
||||
void deleteByUserId(Long userId);
|
||||
|
||||
void add(DynamicBlacklistCmd cmd);
|
||||
|
||||
PageResult<UserProfileDTO> page(DynamicBlacklistQryCmd query);
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.console.app.dto.clienobject.dynamic.PageDynamicContentCO;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.CreateDynamicVideoCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DelDynamicContentCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicContentQryCmd;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态内容 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-18
|
||||
*/
|
||||
public interface DynamicContentService {
|
||||
|
||||
|
||||
/**
|
||||
* 删除动态.
|
||||
*/
|
||||
void deleteByIds(DelDynamicContentCmd delDynamicContentCmd);
|
||||
|
||||
/**
|
||||
* 动态内容.
|
||||
*/
|
||||
PageResult<PageDynamicContentCO> page(DynamicContentQryCmd query);
|
||||
|
||||
/**
|
||||
* 插入动态视频
|
||||
* @param cmd
|
||||
* @return
|
||||
*/
|
||||
Integer createVideo(CreateDynamicVideoCmd cmd);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicPopularConfigCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicPopularConfigDTO;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-热门权重分设置 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-30
|
||||
*/
|
||||
public interface DynamicPopularConfigService {
|
||||
|
||||
DynamicPopularConfigDTO config();
|
||||
|
||||
void addOrUpdate(@RequestBody @Validated DynamicPopularConfigCmd param);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.DynamicTagCmd;
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.PageDynamicTagQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.dynamic.DynamicTagDTO;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态标签 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-4-15
|
||||
*/
|
||||
public interface DynamicTagService {
|
||||
|
||||
void addOrUpdate(DynamicTagCmd tag);
|
||||
|
||||
PageResult<DynamicTagDTO> pageData(
|
||||
PageDynamicTagQryCmd query);
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态-时间轴表 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-04-27
|
||||
*/
|
||||
public interface DynamicTimelineService {
|
||||
|
||||
void deleteByDynamicContentId(Long dynamicId);
|
||||
|
||||
void deleteByDynamicContentIds(Set<Long> dynamicIds);
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.red.circle.console.app.service.app.dynamic;
|
||||
|
||||
import com.red.circle.other.inner.model.cmd.dynamic.TopDynamicCmd;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统置顶动态 服务类.
|
||||
* </p>
|
||||
*
|
||||
* @author pengshigang
|
||||
* @since 2022-06-17
|
||||
*/
|
||||
public interface TopDynamicService {
|
||||
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
void setUpTop(TopDynamicCmd param);
|
||||
|
||||
/**
|
||||
* 关闭置顶
|
||||
*/
|
||||
void closeTop(Long dynamicId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,392 @@
|
||||
package com.red.circle.other.adapter.app.dynamic;
|
||||
|
||||
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.red.circle.common.business.dto.cmd.AppExtCommand;
|
||||
import com.red.circle.common.business.dto.cmd.IdLongCmd;
|
||||
import com.red.circle.common.business.dto.cmd.app.AppIdLongCmd;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.app.dto.clientobject.dynamic.*;
|
||||
import com.red.circle.other.app.dto.cmd.dynamic.*;
|
||||
import com.red.circle.other.app.service.dynamic.DynamicService;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 动态相关接口
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping(value = "/dynamic", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequiredArgsConstructor
|
||||
public class DynamicRestController extends BaseController {
|
||||
|
||||
private final DynamicService dynamicService;
|
||||
|
||||
/**
|
||||
* 创建动态.
|
||||
*
|
||||
* @eo.name 创建动态.
|
||||
* @eo.url /create
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
public DynamicListCO create(@RequestBody DynamicContentAddCmd cmd) {
|
||||
return dynamicService.createDynamic(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态.
|
||||
*
|
||||
* @eo.name 删除动态.
|
||||
* @eo.url /delete
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public void delete(@RequestBody @Validated IdLongCmd cmd) {
|
||||
dynamicService.deleteDynamic(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态评论列表.
|
||||
*
|
||||
* @eo.name 动态评论列表.
|
||||
* @eo.url /list/comment
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/comment")
|
||||
public PageResult<DynamicCommentListCO> listDynamicComment(@Validated DynamicCommentLimitCmd cmd) {
|
||||
return dynamicService.listDynamicComment(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态子评论列表.
|
||||
*
|
||||
* @eo.name 动态子评论列表.
|
||||
* @eo.url /list/comment/children
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/comment/children")
|
||||
public PageResult<DynamicCommentListCO> listDynamicChildComment(
|
||||
@Validated DynamicChildCommentLimitCmd cmd) {
|
||||
return dynamicService.listDynamicChildComment(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态点赞列表.
|
||||
*
|
||||
* @eo.name 动态点赞列表.
|
||||
* @eo.url /list/like
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/like")
|
||||
public PageResult<DynamicLikeListCO> listDynamicLike(@Validated DynamicLikeLimitCmd cmd) {
|
||||
return dynamicService.listDynamicLike(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态礼物列表.
|
||||
*
|
||||
* @eo.name 动态礼物列表.
|
||||
* @eo.url /list/gift
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/gift")
|
||||
public PageResult<DynamicGiftListCO> listDynamicGift(@Validated DynamicGiftLimitCmd cmd) {
|
||||
return dynamicService.listDynamicGift(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态内容详情.
|
||||
*
|
||||
* @eo.name 动态内容详情.
|
||||
* @eo.url /details
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/details")
|
||||
public DynamicListCO details(@Validated IdLongCmd cmd) {
|
||||
return dynamicService.getDynamicDetails(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态关注列表.
|
||||
*
|
||||
* @eo.name 动态关注列表.
|
||||
* @eo.url /list/follow
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/follow")
|
||||
public PageResult<DynamicListCO> listDynamicFollow(@Validated DynamicLimitCmd cmd) {
|
||||
return dynamicService.listDynamicFollow(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的动态列表.
|
||||
*
|
||||
* @eo.name 我的动态列表.
|
||||
* @eo.url /my/list
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/my/page")
|
||||
public PageResult<DynamicListCO> listMyDynamic(@Validated DynamicMyLimitCmd cmd) {
|
||||
return dynamicService.listMyDynamic(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 最新动态列表.
|
||||
*
|
||||
* @eo.name 最新动态列表.
|
||||
* @eo.url /list/latest
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/latest")
|
||||
public PageResult<DynamicListCO> listDynamicLatest(@Validated DynamicLimitCmd cmd) {
|
||||
return dynamicService.listDynamicLatest(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 热门动态列表.
|
||||
*
|
||||
* @eo.name 热门动态列表.
|
||||
* @eo.url /list/popular
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/popular")
|
||||
public List<DynamicListCO> listDynamicPopular(@Validated DynamicLimitCmd cmd) {
|
||||
return dynamicService.listDynamicPopular(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标签id查询动态列表.
|
||||
*
|
||||
* @eo.name 根据标签id查询动态列表.
|
||||
* @eo.url /list/by/tag
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/by/tag")
|
||||
public List<DynamicListCO> listDynamicByTagId(@Validated DynamicByTagLimitCmd cmd) {
|
||||
return dynamicService.listDynamicByTagId(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签列表.
|
||||
*
|
||||
* @eo.name 标签列表.
|
||||
* @eo.url /list/tag
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/tag")
|
||||
public List<DynamicTagCO> listDynamicTag(AppExtCommand cmd) {
|
||||
return dynamicService.listDynamicTag(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除评论.
|
||||
*
|
||||
* @eo.name 删除评论.
|
||||
* @eo.url /delete/comment
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/delete/comment")
|
||||
public Long deleteComment(@RequestBody @Validated AppIdLongCmd cmd) {
|
||||
return dynamicService.deleteComment(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论动态或回复用户.
|
||||
*
|
||||
* @return 数量
|
||||
* @eo.name 评论动态或回复用户.
|
||||
* @eo.url /comment
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/comment")
|
||||
public DynamicCommentListCO comment(@RequestBody @Validated DynamicCommentCmd cmd) {
|
||||
return dynamicService.comment(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞评论.
|
||||
*
|
||||
* @return 数量
|
||||
* @eo.name 点赞评论.
|
||||
* @eo.url /like/comment
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/like/comment")
|
||||
public Long likeComment(@RequestBody @Validated DynamicLikeCmd cmd) {
|
||||
return dynamicService.likeComment(cmd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 点赞动态.
|
||||
*
|
||||
* @return 数量
|
||||
* @eo.name 点赞动态.
|
||||
* @eo.url /like
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/like")
|
||||
public Long likeDynamic(@RequestBody @Validated DynamicLikeCmd cmd) {
|
||||
return dynamicService.likeDynamic(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的消息列表.
|
||||
*
|
||||
* @eo.name 我的消息列表.
|
||||
* @eo.url /list/message
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/message")
|
||||
public PageResult<DynamicMessageListCO> listDynamicMessage(@Validated DynamicLimitCmd cmd) {
|
||||
return dynamicService.listDynamicMessage(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除自己全部消息.
|
||||
*
|
||||
* @eo.name 删除自己全部消息.
|
||||
* @eo.url /delete/message/all
|
||||
* @eo.method post
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@PostMapping("/delete/message/all")
|
||||
public void deleteMessageAll(AppExtCommand cmd) {
|
||||
dynamicService.deleteMessageAll(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将我的消息设置为已读.
|
||||
*
|
||||
* @eo.name 将我的消息设置为已读.
|
||||
* @eo.url /message/update/read
|
||||
* @eo.method post
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@PostMapping("/message/update/read")
|
||||
public void updateReadMessage(AppExtCommand cmd) {
|
||||
dynamicService.updateReadMessage(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息.
|
||||
*
|
||||
* @eo.name 删除消息.
|
||||
* @eo.url /delete/message
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/delete/message")
|
||||
public void deleteMessage(@RequestBody @Validated IdLongCmd cmd) {
|
||||
dynamicService.deleteMessage(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标签id获得标签.
|
||||
*
|
||||
* @eo.name 根据标签id获得标签.
|
||||
* @eo.url /tag
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/tag")
|
||||
public DynamicTagCO getDynamicTag(@Validated IdLongCmd cmd) {
|
||||
return dynamicService.getDynamicTag(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 举报.
|
||||
*
|
||||
* @eo.name 举报.
|
||||
* @eo.url /report
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/report")
|
||||
public void report(@RequestBody @Validated DynamicReportCmd cmd) {
|
||||
dynamicService.report(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验发送动态权限.
|
||||
*
|
||||
* @eo.name 校验发送动态权限.
|
||||
* @eo.url /check/send/permission
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/check/send/permission")
|
||||
public Boolean checkSendPermission(AppExtCommand cmd, Long userId) {
|
||||
if (userId != null) {
|
||||
cmd.setReqUserId(userId);
|
||||
}
|
||||
return dynamicService.checkSendPermission2(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加黑名单.
|
||||
*
|
||||
* @eo.name 添加黑名单.
|
||||
* @eo.url /blacklist/add
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/admin/blacklist/add")
|
||||
public void addBlacklist(@RequestBody @Validated DynamicBlacklistAddCmd cmd) {
|
||||
dynamicService.addBlacklist(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除黑名单.
|
||||
*
|
||||
* @eo.name 删除黑名单.
|
||||
* @eo.url /blacklist/delete
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/admin/blacklist/delete")
|
||||
public void deleteBlacklist(@RequestBody @Validated DynamicBlacklistDelCmd cmd) {
|
||||
dynamicService.deleteBlacklist(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增待审核动态
|
||||
*/
|
||||
@PostMapping("/approval")
|
||||
public void addApprovalDynamic(DynamicContentAddCmd cmd) {
|
||||
dynamicService.addApprovalDynamic(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.red.circle.other.adapter.app.dynamic;
|
||||
|
||||
import com.red.circle.framework.web.controller.BaseController;
|
||||
import com.red.circle.other.app.dto.clientobject.dynamic.UserThumbsUpCO;
|
||||
import com.red.circle.other.app.dto.cmd.dynamic.UserRelationThumbsUpCmd;
|
||||
import com.red.circle.other.app.service.dynamic.UserRelationThumbsUpService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户点赞列表 前端控制器.
|
||||
* </p>
|
||||
*
|
||||
* @author zongpubin on 2023-04-06 11:41
|
||||
* @eo.api-type http
|
||||
* @eo.groupName 动态服务.用户点赞
|
||||
* @eo.path /dynamic/thumbs-up
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/dynamic/thumbs-up", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequiredArgsConstructor
|
||||
public class ThumbsUpRestController extends BaseController {
|
||||
|
||||
private final UserRelationThumbsUpService userRelationThumbsUpService;
|
||||
|
||||
/**
|
||||
* 点赞
|
||||
*
|
||||
* @eo.name 点赞
|
||||
* @eo.url /like
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/like")
|
||||
public Boolean like(@RequestBody @Validated UserRelationThumbsUpCmd cmd) {
|
||||
return userRelationThumbsUpService.thumbsUp(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞数量,是否已经点赞
|
||||
*
|
||||
* @eo.name 点赞数量,是否已经点赞
|
||||
* @eo.url /info
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/info")
|
||||
public UserThumbsUpCO thumbsUpInfo(UserRelationThumbsUpCmd cmd) {
|
||||
return userRelationThumbsUpService.thumbsUpInfo(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,7 +12,7 @@ import com.red.circle.other.infra.database.mongo.entity.activity.ConsumeActivity
|
||||
import com.red.circle.other.infra.database.mongo.service.activity.ConsumeActivityCountService;
|
||||
import com.red.circle.other.infra.database.rds.entity.activity.PropsActivityRuleConfig;
|
||||
import com.red.circle.other.infra.database.rds.service.activity.PropsActivityRuleConfigService;
|
||||
import com.red.circle.other.inner.asserts.OtherErrorCode;
|
||||
import com.red.circle.other.inner.asserts.DynamicErrorCode;
|
||||
import com.red.circle.other.inner.asserts.PropsErrorCode;
|
||||
import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum;
|
||||
import com.red.circle.other.inner.model.dto.activity.rule.CumulativeRechargeContent;
|
||||
@ -72,7 +72,7 @@ public class ActivityConsumeRewardReceiveCmdExe {
|
||||
count.getTarget() >= consumeActivityContent.getQuantity().longValue());
|
||||
|
||||
// 防止重复触发领取 3分钟后可重试领取
|
||||
ResponseAssert.isTrue(OtherErrorCode.REPEATED_SUBMIT, redisService.setIfAbsent(
|
||||
ResponseAssert.isTrue(DynamicErrorCode.REPEATED_SUBMIT, redisService.setIfAbsent(
|
||||
PropsActivityTypeEnum.CONSUMPTION_ACTIVITY + ":" + cmd.getReqUserId() + ":" + cmd.getId(),
|
||||
3, TimeUnit.MINUTES));
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user