diff --git a/src/main/java/com/upchina/common/config/cache/CacheKey.java b/src/main/java/com/upchina/common/config/cache/CacheKey.java index 8f36f97..8c45e73 100644 --- a/src/main/java/com/upchina/common/config/cache/CacheKey.java +++ b/src/main/java/com/upchina/common/config/cache/CacheKey.java @@ -212,31 +212,6 @@ public class CacheKey { public static final String APP_RECOMMEND_LIST = "app_recommend_list|"; } - //定价策略 - public static final String PRICING_STRATEGY = "pricing_strategy"; - - public static class PricingStrategyKey { - // id -> PricingFeesVO - public static final String PRICING_FEES = "pricing_fees|"; - public static final String PRICING_STRATEGY_DETAIL = "pricing_strategy_detail|"; - } - - // 组合详情map - public static final String PORTFOLIO = "portfolio"; - - public static class PortfolioKey { - // id -> PortfolioVO - public static final String PORTFOLIO_OBJ = "portfolio_obj|"; - // type -> List - public static final String PORTFOLIO_SORT_MAP = "portfolio_sort_map|"; - // id:startDate:endDate -> List - public static final String PORTFOLIO_HIS_MAP = "portfolio_his_map|"; - // id:startDate:endDate -> List - public static final String PORTFOLIO_HIS_TRADE_LIST = "portfolio_his_trade_list|"; - // orderId -> PortfolioTradeVO - public static final String PORTFOLIO_TRADE_OBJ = "portfolio_trade_obj|"; - } - // 视频直播信息 public static final String VIDEO_LIVE = "video_live"; // 视频直播自定义缓存过期时间(put方法设置的过期时间不生效,所以这样处理) @@ -426,19 +401,11 @@ public class CacheKey { public static final String COURSE_PACKAGE_CONTENT = "course_package_content|"; } - // C端APP缓存 - public static final String APP = "app"; - - public static final class AppKey { - public static final String APP_RELS_LIST = "app_rels_list|"; - public static final String LIVE_LIST = "live_list|"; - } - public static final String GROUP = "group"; public static class GroupKey { - public static final String GROUP_INFO = "group:info:"; - public static final String MAIN_GROUP_LIST = "group:main:list:"; + public static final String GROUP_INFO = "group|info|"; + public static final String MAIN_GROUP_LIST = "group|main|list|"; } } diff --git a/src/main/java/com/upchina/common/config/cache/HazelcastConfiguration.java b/src/main/java/com/upchina/common/config/cache/HazelcastConfiguration.java index c826cd0..d938d16 100644 --- a/src/main/java/com/upchina/common/config/cache/HazelcastConfiguration.java +++ b/src/main/java/com/upchina/common/config/cache/HazelcastConfiguration.java @@ -67,10 +67,8 @@ public class HazelcastConfiguration { configMap.put(VIEW_CARD, new LocalMapConfig(10000, 300)); configMap.put(RECOMMEND, new LocalMapConfig(10000, 300)); - configMap.put(PRICING_STRATEGY, new LocalMapConfig(500, 300)); configMap.put(USER, new LocalMapConfig(10000, 3600)); configMap.put(CAPTCHA, new LocalMapConfig(10000, 300)); - configMap.put(PORTFOLIO, new LocalMapConfig(10000, 60)); configMap.put(RBAC, new LocalMapConfig(10000, 300)); configMap.put(URL_MAP, new LocalMapConfig(10000, 300, InMemoryFormat.OBJECT)); @@ -87,8 +85,7 @@ public class HazelcastConfiguration { configMap.put(QUESTION, new LocalMapConfig(1000, 30)); configMap.put(COURSE, new LocalMapConfig(10000, 300)); - - configMap.put(APP, new LocalMapConfig(1000, 10, InMemoryFormat.OBJECT)); + configMap.put(GROUP, new LocalMapConfig(10000, 300)); } @Bean diff --git a/src/main/java/com/upchina/common/query/PricingFeesQuery.java b/src/main/java/com/upchina/common/query/PricingFeesQuery.java deleted file mode 100644 index e331f2f..0000000 --- a/src/main/java/com/upchina/common/query/PricingFeesQuery.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.upchina.common.query; - -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; - -public class PricingFeesQuery { - - @ApiModelProperty(value = "周期:0永久 1周 2月 3季度 4半年 5年", name = "period") - @NotNull(message = "周期不能为空") - private Integer period; - - @ApiModelProperty(value = "价格(分)", name = "price") - @NotNull(message = "价格不能为空") - @Min(1) - private Integer price; - - @ApiModelProperty(value = "是否默认展示:0否 1是", name = "defaultDisplay") - @NotNull(message = "默认展示不能为空") - @Min(0) - @Max(1) - private Integer defaultDisplay; - - public Integer getPeriod() { - return period; - } - - public void setPeriod(Integer period) { - this.period = period; - } - - public Integer getPrice() { - return price; - } - - public void setPrice(Integer price) { - this.price = price; - } - - public Integer getDefaultDisplay() { - return defaultDisplay; - } - - public void setDefaultDisplay(Integer defaultDisplay) { - this.defaultDisplay = defaultDisplay; - } - -} diff --git a/src/main/java/com/upchina/common/query/PricingStrategyQuery.java b/src/main/java/com/upchina/common/query/PricingStrategyQuery.java deleted file mode 100644 index 3147fe3..0000000 --- a/src/main/java/com/upchina/common/query/PricingStrategyQuery.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.upchina.common.query; - -import io.swagger.annotations.ApiModelProperty; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; - -public class PricingStrategyQuery { - - @ApiModelProperty(value = "主键", name = "id") - private Integer id; - - @ApiModelProperty(value = "定价策略名称", name = "strategyName") - @NotBlank(message = "定价策略名称不能为空") - private String strategyName; - - @ApiModelProperty(value = "定价策略类型:0通用 1观点包 2单篇观点 3视频 5交易圈 6图文直播间 7组合 8锦囊", name = "strategyType") - @NotNull(message = "定价策略类型不能为空") - @Min(0) - private Integer strategyType; - - @ApiModelProperty(value = "支付类型:1一次性付费 2周期性付费", name = "paymentType") - @NotNull(message = "支付类型不能为空") - @Min(1) - @Max(2) - private Integer paymentType; - - @Valid - @ApiModelProperty(value = "策略价格", name = "feesList") - @NotNull(message = "策略价格不能为空") - @Size(min = 1, message = "策略价格至少有一条") - private List feesList; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getStrategyName() { - return strategyName; - } - - public void setStrategyName(String strategyName) { - this.strategyName = strategyName; - } - - public Integer getStrategyType() { - return strategyType; - } - - public void setStrategyType(Integer strategyType) { - this.strategyType = strategyType; - } - - public Integer getPaymentType() { - return paymentType; - } - - public void setPaymentType(Integer paymentType) { - this.paymentType = paymentType; - } - - public List getFeesList() { - return feesList; - } - - public void setFeesList(List feesList) { - this.feesList = feesList; - } -} diff --git a/src/main/java/com/upchina/common/query/PricingStrategySearchQuery.java b/src/main/java/com/upchina/common/query/PricingStrategySearchQuery.java deleted file mode 100644 index 20f8c3f..0000000 --- a/src/main/java/com/upchina/common/query/PricingStrategySearchQuery.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.upchina.common.query; - -import io.swagger.annotations.ApiModelProperty; - -import java.util.List; - -public class PricingStrategySearchQuery extends PageQuery { - - @ApiModelProperty(value = "定价策略名称", name = "strategyName") - private String strategyName; - - @ApiModelProperty(value = "定价策略类型:0通用 1观点包 2单篇观点 3视频 5交易圈 6图文直播间 7组合 8锦囊", name = "strategyType") - private List strategyType; - - @ApiModelProperty(value = "支付类型:1一次性付费 2周期性付费", name = "paymentType") - private Integer paymentType = 0; - - @ApiModelProperty(value = "创建人姓名", name = "createUserName") - private String createUserName; - - public String getStrategyName() { - return strategyName; - } - - public void setStrategyName(String strategyName) { - this.strategyName = strategyName; - } - - public List getStrategyType() { - return strategyType; - } - - public void setStrategyType(List strategyType) { - this.strategyType = strategyType; - } - - public String getCreateUserName() { - return createUserName; - } - - public void setCreateUserName(String createUserName) { - this.createUserName = createUserName; - } - - public Integer getPaymentType() { - return paymentType; - } - - public void setPaymentType(Integer paymentType) { - this.paymentType = paymentType; - } -} diff --git a/src/main/java/com/upchina/group/entity/GroupMessage.java b/src/main/java/com/upchina/group/entity/GroupMessage.java new file mode 100644 index 0000000..afb9edd --- /dev/null +++ b/src/main/java/com/upchina/group/entity/GroupMessage.java @@ -0,0 +1,360 @@ +package com.upchina.group.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 交易圈互动消息 + *

+ * + * @author easonzhu + * @since 2025-01-29 + */ +public class GroupMessage implements Serializable { + + + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 消息类型:1普通消息;2推荐产品消息;3进入交易圈消息;4用户关注投顾消息;5分享交易圈消息;6开启互动消息;7关闭互动消息; 8下单产品; 9购物车产品数据量修改; 10购物车产品上架; 11问卷;12用户上下线;13开启、关闭企微二维码;14购物车产品推送;15取消推送产品;16显示完整昵称;17先审后发;18开启私聊;19显示圈子人数; + */ + @TableField("msg_type") + private Integer msgType; + + /** + * 交易圈ID + */ + @TableField("group_id") + private Integer groupId; + + /** + * 交互类型:1群聊;2私聊 + */ + @TableField("interactive_type") + private Integer interactiveType; + + /** + * 用户类型:1投顾;2用户;3助教;4运营人员 + */ + @TableField("user_type") + private Integer userType; + + /** + * 用户ID + */ + @TableField("user_id") + private String userId; + + /** + * 接收用户类型(仅私聊):1投顾;2用户;3助教;4运营人员 + */ + @TableField("to_user_type") + private Integer toUserType; + + /** + * 接受用户ID(仅私聊) + */ + @TableField("to_user_id") + private String toUserId; + + /** + * 用户名称 + */ + @TableField("user_name") + private String userName; + + /** + * 消息内容 + */ + private String content; + + /** + * 发布类型 1:文本 2:图片 3:文件 4:产品 5:问卷 + */ + @TableField("content_type") + private Integer contentType; + + /** + * 回复消息ID + */ + @TableField("reply_id") + private Integer replyId; + + /** + * 引用消息ID + */ + @TableField("quote_id") + private Integer quoteId; + + /** + * 数据状态:1初始;2已审核;3已删除 + */ + private Integer status; + + /** + * 创建人ID + */ + @TableField("create_user_id") + private Integer createUserId; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新人ID + */ + @TableField("update_user_id") + private Integer updateUserId; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 删除时间 + */ + @TableField("delete_time") + private LocalDateTime deleteTime; + + /** + * 删除人id + */ + @TableField("delete_user_id") + private Integer deleteUserId; + + /** + * 审核人id + */ + @TableField("audit_user_id") + private Integer auditUserId; + + /** + * 审核时间 + */ + @TableField("audit_time") + private LocalDateTime auditTime; + + /** + * 投顾id + */ + @TableField("advisor_id") + private Integer advisorId; + + /** + * 是否精选 1是 2否 + */ + @TableField("is_recommend") + private Integer isRecommend; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + public Integer getMsgType() { + return msgType; + } + + public void setMsgType(Integer msgType) { + this.msgType = msgType; + } + public Integer getGroupId() { + return groupId; + } + + public void setGroupId(Integer groupId) { + this.groupId = groupId; + } + public Integer getInteractiveType() { + return interactiveType; + } + + public void setInteractiveType(Integer interactiveType) { + this.interactiveType = interactiveType; + } + public Integer getUserType() { + return userType; + } + + public void setUserType(Integer userType) { + this.userType = userType; + } + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + public Integer getToUserType() { + return toUserType; + } + + public void setToUserType(Integer toUserType) { + this.toUserType = toUserType; + } + public String getToUserId() { + return toUserId; + } + + public void setToUserId(String toUserId) { + this.toUserId = toUserId; + } + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + public Integer getContentType() { + return contentType; + } + + public void setContentType(Integer contentType) { + this.contentType = contentType; + } + public Integer getReplyId() { + return replyId; + } + + public void setReplyId(Integer replyId) { + this.replyId = replyId; + } + public Integer getQuoteId() { + return quoteId; + } + + public void setQuoteId(Integer quoteId) { + this.quoteId = quoteId; + } + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + public Integer getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(Integer createUserId) { + this.createUserId = createUserId; + } + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + public Integer getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Integer updateUserId) { + this.updateUserId = updateUserId; + } + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + public LocalDateTime getDeleteTime() { + return deleteTime; + } + + public void setDeleteTime(LocalDateTime deleteTime) { + this.deleteTime = deleteTime; + } + public Integer getDeleteUserId() { + return deleteUserId; + } + + public void setDeleteUserId(Integer deleteUserId) { + this.deleteUserId = deleteUserId; + } + public Integer getAuditUserId() { + return auditUserId; + } + + public void setAuditUserId(Integer auditUserId) { + this.auditUserId = auditUserId; + } + public LocalDateTime getAuditTime() { + return auditTime; + } + + public void setAuditTime(LocalDateTime auditTime) { + this.auditTime = auditTime; + } + public Integer getAdvisorId() { + return advisorId; + } + + public void setAdvisorId(Integer advisorId) { + this.advisorId = advisorId; + } + public Integer getIsRecommend() { + return isRecommend; + } + + public void setIsRecommend(Integer isRecommend) { + this.isRecommend = isRecommend; + } + + @Override + public String toString() { + return "GroupMessage{" + + "id=" + id + + ", msgType=" + msgType + + ", groupId=" + groupId + + ", interactiveType=" + interactiveType + + ", userType=" + userType + + ", userId=" + userId + + ", toUserType=" + toUserType + + ", toUserId=" + toUserId + + ", userName=" + userName + + ", content=" + content + + ", contentType=" + contentType + + ", replyId=" + replyId + + ", quoteId=" + quoteId + + ", status=" + status + + ", createUserId=" + createUserId + + ", createTime=" + createTime + + ", updateUserId=" + updateUserId + + ", updateTime=" + updateTime + + ", deleteTime=" + deleteTime + + ", deleteUserId=" + deleteUserId + + ", auditUserId=" + auditUserId + + ", auditTime=" + auditTime + + ", advisorId=" + advisorId + + ", isRecommend=" + isRecommend + + "}"; + } +} diff --git a/src/main/java/com/upchina/group/mapper/GroupMessageMapper.java b/src/main/java/com/upchina/group/mapper/GroupMessageMapper.java new file mode 100644 index 0000000..82f115a --- /dev/null +++ b/src/main/java/com/upchina/group/mapper/GroupMessageMapper.java @@ -0,0 +1,16 @@ +package com.upchina.group.mapper; + +import com.upchina.group.entity.GroupMessage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 交易圈互动消息 Mapper 接口 + *

+ * + * @author easonzhu + * @since 2025-01-29 + */ +public interface GroupMessageMapper extends BaseMapper { + +}