订单和权限同步逻辑
This commit is contained in:
parent
74b9f93218
commit
fb70723f50
1
pom.xml
1
pom.xml
@ -43,7 +43,6 @@
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.31</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
|
||||
@ -34,7 +34,7 @@ import java.util.Map;
|
||||
* 投顾信息 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
@Api(tags = "投顾信息")
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 用户关注投顾信息
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public class AdvisorFollow implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 投顾信息
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public class AdvisorInfo implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
* 投顾基本信息
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public class AdvisorSortEntity implements Serializable, Comparable<AdvisorSortEntity> {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* 投顾标签关系表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public class AdvisorTagRel implements Serializable {
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package com.syzb.advisor.mapper;
|
||||
|
||||
import com.syzb.advisor.entity.AdvisorFollow;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.syzb.advisor.entity.AdvisorFollow;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户关注投顾信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public interface AdvisorFollowMapper extends BaseMapper<AdvisorFollow> {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.syzb.advisor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.syzb.advisor.entity.AdvisorInfo;
|
||||
import com.syzb.advisor.entity.AdvisorSortEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@ -13,7 +13,7 @@ import java.util.List;
|
||||
* 投顾信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public interface AdvisorInfoMapper extends BaseMapper<AdvisorInfo> {
|
||||
|
||||
@ -13,7 +13,7 @@ import java.util.List;
|
||||
* 投顾标签关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-27
|
||||
*/
|
||||
public interface AdvisorTagRelMapper extends EasyBaseMapper<AdvisorTagRel> {
|
||||
|
||||
@ -2,6 +2,11 @@ package com.syzb.advisor.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.advisor.constant.AdvisorInfoStatus;
|
||||
import com.syzb.advisor.constant.FollowChannel;
|
||||
import com.syzb.advisor.constant.FollowOption;
|
||||
@ -13,9 +18,6 @@ import com.syzb.advisor.query.*;
|
||||
import com.syzb.advisor.vo.AdvisorBasicVO;
|
||||
import com.syzb.advisor.vo.AdvisorInfoAdminVO;
|
||||
import com.syzb.advisor.vo.AdvisorInfoAppVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.syzb.common.constant.AdvertPosition;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
@ -32,8 +34,6 @@ import com.syzb.common.state.StateMachine;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.CountVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.rbac.constant.DeptType;
|
||||
import com.syzb.rbac.entity.Dept;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
package com.syzb.app.constants;
|
||||
|
||||
// 订单状态 新订单180、已开通220、已停用/已退款90、已过期80、已取消70,关闭权限但未退款230
|
||||
public enum AppOrderStatus {
|
||||
NEW(180, "新订单"),
|
||||
OPENED(220, "已开通"),
|
||||
REFUNDED(90, "已停用/已退款"),
|
||||
EXPIRED(80, "已过期"),
|
||||
CANCELED(70, "已取消"),
|
||||
CLOSED_UN_REFUNDED(230, "关闭权限但未退款");
|
||||
|
||||
public final Integer value;
|
||||
public final String name;
|
||||
|
||||
AppOrderStatus(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,292 +0,0 @@
|
||||
package com.syzb.app.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* C端订单
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @since 2024-11-07
|
||||
*/
|
||||
public class AppOrder implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@TableId("order_id")
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
@TableField("product_id")
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@TableField("product_name")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 用户名\UPID
|
||||
*/
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 订单状态 新订单180、已开通220、已停用/已退款90、已过期80、已取消70,关闭权限但未退款230
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 支付状态 1:已支付 2:未支付
|
||||
*/
|
||||
@TableField("pay_status")
|
||||
private Integer payStatus;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@TableField("total_price")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 支付金额
|
||||
*/
|
||||
@TableField("pay_total")
|
||||
private BigDecimal payTotal;
|
||||
|
||||
/**
|
||||
* 下单渠道
|
||||
*/
|
||||
private Integer currch;
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
@TableField("ext_info")
|
||||
private String extInfo;
|
||||
|
||||
/**
|
||||
* 传参
|
||||
*/
|
||||
private String bvideo;
|
||||
|
||||
/**
|
||||
* 视频ID
|
||||
*/
|
||||
@TableField("video_id")
|
||||
private Integer videoId;
|
||||
|
||||
/**
|
||||
* 视频类型 3:直播
|
||||
*/
|
||||
@TableField("product_type")
|
||||
private Integer productType;
|
||||
|
||||
/**
|
||||
* 营销人员
|
||||
*/
|
||||
@TableField("sale_user_id")
|
||||
private Integer saleUserId;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@TableField("order_time")
|
||||
private LocalDateTime orderTime;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@TableField("pay_time")
|
||||
private LocalDateTime payTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(String productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
public void setPayStatus(Integer payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
return totalPrice;
|
||||
}
|
||||
|
||||
public void setTotalPrice(BigDecimal totalPrice) {
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getPayTotal() {
|
||||
return payTotal;
|
||||
}
|
||||
|
||||
public void setPayTotal(BigDecimal payTotal) {
|
||||
this.payTotal = payTotal;
|
||||
}
|
||||
|
||||
public Integer getCurrch() {
|
||||
return currch;
|
||||
}
|
||||
|
||||
public void setCurrch(Integer currch) {
|
||||
this.currch = currch;
|
||||
}
|
||||
|
||||
public String getExtInfo() {
|
||||
return extInfo;
|
||||
}
|
||||
|
||||
public void setExtInfo(String extInfo) {
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getBvideo() {
|
||||
return bvideo;
|
||||
}
|
||||
|
||||
public void setBvideo(String bvideo) {
|
||||
this.bvideo = bvideo;
|
||||
}
|
||||
|
||||
public Integer getVideoId() {
|
||||
return videoId;
|
||||
}
|
||||
|
||||
public void setVideoId(Integer videoId) {
|
||||
this.videoId = videoId;
|
||||
}
|
||||
|
||||
public Integer getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
||||
public void setProductType(Integer productType) {
|
||||
this.productType = productType;
|
||||
}
|
||||
|
||||
public Integer getSaleUserId() {
|
||||
return saleUserId;
|
||||
}
|
||||
|
||||
public void setSaleUserId(Integer saleUserId) {
|
||||
this.saleUserId = saleUserId;
|
||||
}
|
||||
|
||||
public LocalDateTime getOrderTime() {
|
||||
return orderTime;
|
||||
}
|
||||
|
||||
public void setOrderTime(LocalDateTime orderTime) {
|
||||
this.orderTime = orderTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getPayTime() {
|
||||
return payTime;
|
||||
}
|
||||
|
||||
public void setPayTime(LocalDateTime payTime) {
|
||||
this.payTime = payTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppOrder{" +
|
||||
"orderId=" + orderId +
|
||||
", productId=" + productId +
|
||||
", productName=" + productName +
|
||||
", userName=" + userName +
|
||||
", status=" + status +
|
||||
", totalPrice=" + totalPrice +
|
||||
", payTotal=" + payTotal +
|
||||
", currch=" + currch +
|
||||
", extInfo=" + extInfo +
|
||||
", bvideo=" + bvideo +
|
||||
", videoId=" + videoId +
|
||||
", productType=" + productType +
|
||||
", saleUserId=" + saleUserId +
|
||||
", orderTime=" + orderTime +
|
||||
", payTime=" + payTime +
|
||||
", createTime=" + createTime +
|
||||
", updateTime=" + updateTime +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package com.syzb.app.service;
|
||||
|
||||
import com.syzb.app.entity.AppOrder;
|
||||
import com.syzb.app.mapper.AppOrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
public class OrderSyncService {
|
||||
|
||||
@Resource
|
||||
private AppOrderMapper appOrderMapper;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void syncAppOrder(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
private boolean isEqual(AppOrder a, AppOrder b) {
|
||||
return Objects.equals(a.getOrderId(), b.getOrderId())
|
||||
&& Objects.equals(a.getProductId(), b.getProductId())
|
||||
&& Objects.equals(a.getProductName(), b.getProductName())
|
||||
&& Objects.equals(a.getUserName(), b.getUserName())
|
||||
&& Objects.equals(a.getStatus(), b.getStatus())
|
||||
&& Objects.equals(a.getPayStatus(), b.getPayStatus())
|
||||
&& isEqual(a.getTotalPrice(), b.getTotalPrice())
|
||||
&& isEqual(a.getPayTotal(), b.getPayTotal())
|
||||
&& Objects.equals(a.getCurrch(), b.getCurrch())
|
||||
&& Objects.equals(a.getExtInfo(), b.getExtInfo())
|
||||
&& Objects.equals(a.getBvideo(), b.getBvideo())
|
||||
&& Objects.equals(a.getVideoId(), b.getVideoId())
|
||||
&& Objects.equals(a.getProductType(), b.getProductType())
|
||||
&& Objects.equals(a.getSaleUserId(), b.getSaleUserId())
|
||||
&& Objects.equals(a.getOrderTime(), b.getOrderTime())
|
||||
&& Objects.equals(a.getPayTime(), b.getPayTime());
|
||||
}
|
||||
|
||||
// BigDecimal忽略精度比较
|
||||
private boolean isEqual(BigDecimal a, BigDecimal b) {
|
||||
return a == null ? b == null : a.compareTo(b) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,189 +0,0 @@
|
||||
package com.syzb.app.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.syzb.advisor.entity.AdvisorBasic;
|
||||
import com.syzb.video.entity.VideoLive;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class LiveDetailVO implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
private String title;
|
||||
private String listCoverUrl;
|
||||
private String coverUrl;
|
||||
private Integer advisorId;
|
||||
private String advisorName;
|
||||
private String advisorAvatar;
|
||||
private String liveUrl;
|
||||
private Integer liveStatus;
|
||||
private Integer status;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private Integer readCount;
|
||||
private Integer messageCount;
|
||||
private Integer favorCount;
|
||||
private Integer isRecommend;
|
||||
private Integer isDisplay;
|
||||
|
||||
public LiveDetailVO() {
|
||||
}
|
||||
|
||||
public LiveDetailVO(VideoLive live, AdvisorBasic advisor, String liveUrl, Integer readCount, Integer messageCount, Integer favorCount) {
|
||||
this.id = live.getId();
|
||||
this.title = live.getTitle();
|
||||
this.listCoverUrl = live.getListCoverUrl();
|
||||
this.advisorId = live.getAdvisorId();
|
||||
if (advisor != null) {
|
||||
this.advisorName = advisor.getShowName();
|
||||
this.advisorAvatar = advisor.getAvatar();
|
||||
}
|
||||
this.liveUrl = liveUrl;
|
||||
this.coverUrl = live.getImgUrl();
|
||||
this.liveStatus = live.getLiveStatus();
|
||||
this.status = live.getStatus();
|
||||
this.startTime = live.getStartTime().format(DatePattern.NORM_DATETIME_FORMATTER);
|
||||
this.endTime = live.getEndTime().format(DatePattern.NORM_DATETIME_FORMATTER);
|
||||
this.readCount = readCount;
|
||||
this.messageCount = messageCount;
|
||||
this.favorCount = favorCount;
|
||||
this.isRecommend = live.getIsRecommend();
|
||||
this.isDisplay = live.getIsDisplay();
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getListCoverUrl() {
|
||||
return listCoverUrl;
|
||||
}
|
||||
|
||||
public void setListCoverUrl(String listCoverUrl) {
|
||||
this.listCoverUrl = listCoverUrl;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Integer getAdvisorId() {
|
||||
return advisorId;
|
||||
}
|
||||
|
||||
public void setAdvisorId(Integer advisorId) {
|
||||
this.advisorId = advisorId;
|
||||
}
|
||||
|
||||
public String getAdvisorName() {
|
||||
return advisorName;
|
||||
}
|
||||
|
||||
public void setAdvisorName(String advisorName) {
|
||||
this.advisorName = advisorName;
|
||||
}
|
||||
|
||||
public String getAdvisorAvatar() {
|
||||
return advisorAvatar;
|
||||
}
|
||||
|
||||
public void setAdvisorAvatar(String advisorAvatar) {
|
||||
this.advisorAvatar = advisorAvatar;
|
||||
}
|
||||
|
||||
public String getLiveUrl() {
|
||||
return liveUrl;
|
||||
}
|
||||
|
||||
public void setLiveUrl(String liveUrl) {
|
||||
this.liveUrl = liveUrl;
|
||||
}
|
||||
|
||||
public Integer getLiveStatus() {
|
||||
return liveStatus;
|
||||
}
|
||||
|
||||
public void setLiveStatus(Integer liveStatus) {
|
||||
this.liveStatus = liveStatus;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getReadCount() {
|
||||
return readCount;
|
||||
}
|
||||
|
||||
public void setReadCount(Integer readCount) {
|
||||
this.readCount = readCount;
|
||||
}
|
||||
|
||||
public Integer getMessageCount() {
|
||||
return messageCount;
|
||||
}
|
||||
|
||||
public void setMessageCount(Integer messageCount) {
|
||||
this.messageCount = messageCount;
|
||||
}
|
||||
|
||||
public Integer getFavorCount() {
|
||||
return favorCount;
|
||||
}
|
||||
|
||||
public void setFavorCount(Integer favorCount) {
|
||||
this.favorCount = favorCount;
|
||||
}
|
||||
|
||||
public Integer getIsRecommend() {
|
||||
return isRecommend;
|
||||
}
|
||||
|
||||
public void setIsRecommend(Integer isRecommend) {
|
||||
this.isRecommend = isRecommend;
|
||||
}
|
||||
|
||||
public Integer getIsDisplay() {
|
||||
return isDisplay;
|
||||
}
|
||||
|
||||
public void setIsDisplay(Integer isDisplay) {
|
||||
this.isDisplay = isDisplay;
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package com.syzb.app.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveListVO implements Serializable {
|
||||
|
||||
public List<LiveDetailVO> result;
|
||||
public Integer total;
|
||||
public String listUrl;
|
||||
|
||||
public LiveListVO() {
|
||||
}
|
||||
|
||||
public LiveListVO(List<LiveDetailVO> result, Integer total, String listUrl) {
|
||||
this.result = result;
|
||||
this.total = total;
|
||||
this.listUrl = listUrl;
|
||||
}
|
||||
|
||||
public List<LiveDetailVO> getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(List<LiveDetailVO> result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Integer total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public String getListUrl() {
|
||||
return listUrl;
|
||||
}
|
||||
|
||||
public void setListUrl(String listUrl) {
|
||||
this.listUrl = listUrl;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.syzb.business.constants;
|
||||
|
||||
// 订单状态
|
||||
// 180:新订单
|
||||
// 200:已支付
|
||||
// 220:已开通
|
||||
// 205:已升级
|
||||
// 90:已退款
|
||||
// 80:已过期
|
||||
// 60:已关闭
|
||||
// 50:已暂停
|
||||
public enum AppOrderStatus {
|
||||
|
||||
NEW(180, "新订单"),
|
||||
PAID(200, "已支付"),
|
||||
OPENED(220, "已开通"),
|
||||
UPGRADED(205, "已升级"),
|
||||
REFUNDED(90, "已退款"),
|
||||
EXPIRED(80, "已过期"),
|
||||
CLOSED(60, "已关闭"),
|
||||
PAUSED(50, "已暂停"),
|
||||
;
|
||||
|
||||
public final Integer value;
|
||||
public final String name;
|
||||
|
||||
AppOrderStatus(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
563
src/main/java/com/syzb/business/entity/AppOrder.java
Normal file
563
src/main/java/com/syzb/business/entity/AppOrder.java
Normal file
@ -0,0 +1,563 @@
|
||||
package com.syzb.business.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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单表
|
||||
* </p>
|
||||
*
|
||||
* @author helloSyzb
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
public class AppOrder implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@TableId(value = "order_id", type = IdType.AUTO)
|
||||
private Integer orderId;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@TableField("product_name")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 订购天数
|
||||
*/
|
||||
@TableField("order_day")
|
||||
private Integer orderDay;
|
||||
|
||||
/**
|
||||
* 当前价格
|
||||
*/
|
||||
@TableField("current_price")
|
||||
private BigDecimal currentPrice;
|
||||
|
||||
/**
|
||||
* 订单状态 180:新订单 200:已支付 220:已开通 205:已升级 90:已退款 80:已过期 60:已关闭 50:已暂停
|
||||
*/
|
||||
@TableField("order_state")
|
||||
private Integer orderState;
|
||||
|
||||
/**
|
||||
* 支付状态 1:已支付 2:未支付
|
||||
*/
|
||||
@TableField("pay_status")
|
||||
private Integer payStatus;
|
||||
|
||||
/**
|
||||
* 订单原价
|
||||
*/
|
||||
@TableField("original_price")
|
||||
private BigDecimal originalPrice;
|
||||
|
||||
/**
|
||||
* 开通状态 0:未开通 1:已开通
|
||||
*/
|
||||
@TableField("is_open")
|
||||
private Integer isOpen;
|
||||
|
||||
/**
|
||||
* 到账金额(多笔付款合计)
|
||||
*/
|
||||
@TableField("received_amount")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 手机号(脱敏)
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 手机号(无规则的唯一键)
|
||||
*/
|
||||
@TableField("um_id")
|
||||
private String umId;
|
||||
|
||||
/**
|
||||
* 订单批次号
|
||||
*/
|
||||
@TableField("batch_id")
|
||||
private String batchId;
|
||||
|
||||
/**
|
||||
* 产品的唯一ID
|
||||
*/
|
||||
private String sku;
|
||||
|
||||
/**
|
||||
* 渠道号
|
||||
*/
|
||||
private Integer channel;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
@TableField("department_id")
|
||||
private Integer departmentId;
|
||||
|
||||
/**
|
||||
* 开通时间
|
||||
*/
|
||||
@TableField("open_time")
|
||||
private LocalDateTime openTime;
|
||||
|
||||
/**
|
||||
* 暂停时间
|
||||
*/
|
||||
@TableField("suspend_time")
|
||||
private LocalDateTime suspendTime;
|
||||
|
||||
/**
|
||||
* 暂停原因
|
||||
*/
|
||||
@TableField("suspend_remark")
|
||||
private String suspendRemark;
|
||||
|
||||
/**
|
||||
* 剩余天数
|
||||
*/
|
||||
@TableField("remaining_day")
|
||||
private Integer remainingDay;
|
||||
|
||||
/**
|
||||
* 到账时间
|
||||
*/
|
||||
@TableField("received_amount_time")
|
||||
private LocalDateTime receivedAmountTime;
|
||||
|
||||
/**
|
||||
* 终止类型 1:升级 2:退款 3:作废 4:过期
|
||||
*/
|
||||
@TableField("stop_type")
|
||||
private Integer stopType;
|
||||
|
||||
/**
|
||||
* 终止时间
|
||||
*/
|
||||
@TableField("stop_time")
|
||||
private LocalDateTime stopTime;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@TableField("order_time")
|
||||
private LocalDateTime orderTime;
|
||||
|
||||
/**
|
||||
* 附加信息
|
||||
*/
|
||||
@TableField("ext_info")
|
||||
private String extInfo;
|
||||
|
||||
/**
|
||||
* 订单备注:可以填写客户昵称、备注作为区分
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
@TableField("activity_name")
|
||||
private String activityName;
|
||||
|
||||
/**
|
||||
* 是否有合同
|
||||
*/
|
||||
@TableField("has_pdf")
|
||||
private Boolean hasPdf;
|
||||
|
||||
/**
|
||||
* 是否可以签约
|
||||
*/
|
||||
@TableField("can_sign")
|
||||
private Boolean canSign;
|
||||
|
||||
/**
|
||||
* 产品ID(ext_info解析)
|
||||
*/
|
||||
@TableField("product_id")
|
||||
private Integer productId;
|
||||
|
||||
/**
|
||||
* 产品类型(ext_info解析)
|
||||
*/
|
||||
@TableField("product_type")
|
||||
private Integer productType;
|
||||
|
||||
/**
|
||||
* 营销人员ID(ext_info解析)
|
||||
*/
|
||||
@TableField("sale_user_id")
|
||||
private Integer saleUserId;
|
||||
|
||||
/**
|
||||
* 插入数据时间
|
||||
*/
|
||||
@TableField("insert_time")
|
||||
private LocalDateTime insertTime;
|
||||
|
||||
/**
|
||||
* 数据更新时间
|
||||
*/
|
||||
@TableField("modify_time")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
public Integer getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Integer orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public Integer getOrderDay() {
|
||||
return orderDay;
|
||||
}
|
||||
|
||||
public void setOrderDay(Integer orderDay) {
|
||||
this.orderDay = orderDay;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentPrice() {
|
||||
return currentPrice;
|
||||
}
|
||||
|
||||
public void setCurrentPrice(BigDecimal currentPrice) {
|
||||
this.currentPrice = currentPrice;
|
||||
}
|
||||
|
||||
public Integer getOrderState() {
|
||||
return orderState;
|
||||
}
|
||||
|
||||
public void setOrderState(Integer orderState) {
|
||||
this.orderState = orderState;
|
||||
}
|
||||
|
||||
public Integer getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
public void setPayStatus(Integer payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getOriginalPrice() {
|
||||
return originalPrice;
|
||||
}
|
||||
|
||||
public void setOriginalPrice(BigDecimal originalPrice) {
|
||||
this.originalPrice = originalPrice;
|
||||
}
|
||||
|
||||
public Integer getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public void setIsOpen(Integer isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
}
|
||||
|
||||
public BigDecimal getReceivedAmount() {
|
||||
return receivedAmount;
|
||||
}
|
||||
|
||||
public void setReceivedAmount(BigDecimal receivedAmount) {
|
||||
this.receivedAmount = receivedAmount;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getUmId() {
|
||||
return umId;
|
||||
}
|
||||
|
||||
public void setUmId(String umId) {
|
||||
this.umId = umId;
|
||||
}
|
||||
|
||||
public String getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(String batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getSku() {
|
||||
return sku;
|
||||
}
|
||||
|
||||
public void setSku(String sku) {
|
||||
this.sku = sku;
|
||||
}
|
||||
|
||||
public Integer getChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public void setChannel(Integer channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public Integer getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(Integer departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public LocalDateTime getOpenTime() {
|
||||
return openTime;
|
||||
}
|
||||
|
||||
public void setOpenTime(LocalDateTime openTime) {
|
||||
this.openTime = openTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getSuspendTime() {
|
||||
return suspendTime;
|
||||
}
|
||||
|
||||
public void setSuspendTime(LocalDateTime suspendTime) {
|
||||
this.suspendTime = suspendTime;
|
||||
}
|
||||
|
||||
public String getSuspendRemark() {
|
||||
return suspendRemark;
|
||||
}
|
||||
|
||||
public void setSuspendRemark(String suspendRemark) {
|
||||
this.suspendRemark = suspendRemark;
|
||||
}
|
||||
|
||||
public Integer getRemainingDay() {
|
||||
return remainingDay;
|
||||
}
|
||||
|
||||
public void setRemainingDay(Integer remainingDay) {
|
||||
this.remainingDay = remainingDay;
|
||||
}
|
||||
|
||||
public LocalDateTime getReceivedAmountTime() {
|
||||
return receivedAmountTime;
|
||||
}
|
||||
|
||||
public void setReceivedAmountTime(LocalDateTime receivedAmountTime) {
|
||||
this.receivedAmountTime = receivedAmountTime;
|
||||
}
|
||||
|
||||
public Integer getStopType() {
|
||||
return stopType;
|
||||
}
|
||||
|
||||
public void setStopType(Integer stopType) {
|
||||
this.stopType = stopType;
|
||||
}
|
||||
|
||||
public LocalDateTime getStopTime() {
|
||||
return stopTime;
|
||||
}
|
||||
|
||||
public void setStopTime(LocalDateTime stopTime) {
|
||||
this.stopTime = stopTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getOrderTime() {
|
||||
return orderTime;
|
||||
}
|
||||
|
||||
public void setOrderTime(LocalDateTime orderTime) {
|
||||
this.orderTime = orderTime;
|
||||
}
|
||||
|
||||
public String getExtInfo() {
|
||||
return extInfo;
|
||||
}
|
||||
|
||||
public void setExtInfo(String extInfo) {
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getActivityName() {
|
||||
return activityName;
|
||||
}
|
||||
|
||||
public void setActivityName(String activityName) {
|
||||
this.activityName = activityName;
|
||||
}
|
||||
|
||||
public Boolean getHasPdf() {
|
||||
return hasPdf;
|
||||
}
|
||||
|
||||
public void setHasPdf(Boolean hasPdf) {
|
||||
this.hasPdf = hasPdf;
|
||||
}
|
||||
|
||||
public Boolean getCanSign() {
|
||||
return canSign;
|
||||
}
|
||||
|
||||
public void setCanSign(Boolean canSign) {
|
||||
this.canSign = canSign;
|
||||
}
|
||||
|
||||
public Integer getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Integer productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Integer getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
||||
public void setProductType(Integer productType) {
|
||||
this.productType = productType;
|
||||
}
|
||||
|
||||
public Integer getSaleUserId() {
|
||||
return saleUserId;
|
||||
}
|
||||
|
||||
public void setSaleUserId(Integer saleUserId) {
|
||||
this.saleUserId = saleUserId;
|
||||
}
|
||||
|
||||
public LocalDateTime getInsertTime() {
|
||||
return insertTime;
|
||||
}
|
||||
|
||||
public void setInsertTime(LocalDateTime insertTime) {
|
||||
this.insertTime = insertTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(LocalDateTime modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppOrder{" +
|
||||
"orderId=" + orderId +
|
||||
", productName='" + productName + '\'' +
|
||||
", orderDay=" + orderDay +
|
||||
", currentPrice=" + currentPrice +
|
||||
", orderState=" + orderState +
|
||||
", payStatus=" + payStatus +
|
||||
", originalPrice=" + originalPrice +
|
||||
", isOpen=" + isOpen +
|
||||
", receivedAmount=" + receivedAmount +
|
||||
", createTime=" + createTime +
|
||||
", userId=" + userId +
|
||||
", mobile='" + mobile + '\'' +
|
||||
", umId='" + umId + '\'' +
|
||||
", batchId='" + batchId + '\'' +
|
||||
", sku='" + sku + '\'' +
|
||||
", channel=" + channel +
|
||||
", departmentId=" + departmentId +
|
||||
", openTime=" + openTime +
|
||||
", suspendTime=" + suspendTime +
|
||||
", suspendRemark='" + suspendRemark + '\'' +
|
||||
", remainingDay=" + remainingDay +
|
||||
", receivedAmountTime=" + receivedAmountTime +
|
||||
", stopType=" + stopType +
|
||||
", stopTime=" + stopTime +
|
||||
", orderTime=" + orderTime +
|
||||
", extInfo='" + extInfo + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
", updateTime=" + updateTime +
|
||||
", activityName='" + activityName + '\'' +
|
||||
", hasPdf=" + hasPdf +
|
||||
", canSign=" + canSign +
|
||||
", productId=" + productId +
|
||||
", productType=" + productType +
|
||||
", saleUserId=" + saleUserId +
|
||||
", insertTime=" + insertTime +
|
||||
", modifyTime=" + modifyTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.syzb.app.entity;
|
||||
package com.syzb.business.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* B端C端关系表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-10-29
|
||||
*/
|
||||
public class AppRels implements Serializable {
|
||||
112
src/main/java/com/syzb/business/entity/ModuleUser.java
Normal file
112
src/main/java/com/syzb/business/entity/ModuleUser.java
Normal file
@ -0,0 +1,112 @@
|
||||
package com.syzb.business.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class ModuleUser implements Serializable {
|
||||
|
||||
@TableId("id")
|
||||
private Integer id;
|
||||
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
|
||||
@TableField("module_id")
|
||||
private Integer moduleId;
|
||||
|
||||
@TableField("end_time")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField("insert_time")
|
||||
private LocalDateTime insertTime;
|
||||
|
||||
@TableField("modify_time")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getModuleId() {
|
||||
return moduleId;
|
||||
}
|
||||
|
||||
public void setModuleId(Integer moduleId) {
|
||||
this.moduleId = moduleId;
|
||||
}
|
||||
|
||||
public LocalDateTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(LocalDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getInsertTime() {
|
||||
return insertTime;
|
||||
}
|
||||
|
||||
public void setInsertTime(LocalDateTime insertTime) {
|
||||
this.insertTime = insertTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(LocalDateTime modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ModuleUser{" +
|
||||
"id=" + id +
|
||||
", userId=" + userId +
|
||||
", moduleId=" + moduleId +
|
||||
", endTime=" + endTime +
|
||||
", createTime=" + createTime +
|
||||
", updateTime=" + updateTime +
|
||||
", insertTime=" + insertTime +
|
||||
", modifyTime=" + modifyTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -1,15 +1,15 @@
|
||||
package com.syzb.app.mapper;
|
||||
package com.syzb.business.mapper;
|
||||
|
||||
import com.syzb.app.entity.AppOrder;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.syzb.business.entity.AppOrder;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* C端订单 Mapper 接口
|
||||
* 订单表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @since 2024-11-07
|
||||
* @author helloSyzb
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
public interface AppOrderMapper extends BaseMapper<AppOrder> {
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package com.syzb.app.mapper;
|
||||
package com.syzb.business.mapper;
|
||||
|
||||
import com.syzb.app.entity.AppRels;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.syzb.business.entity.AppRels;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* B端C端关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-10-29
|
||||
*/
|
||||
public interface AppRelsMapper extends BaseMapper<AppRels> {
|
||||
16
src/main/java/com/syzb/business/mapper/ModuleUserMapper.java
Normal file
16
src/main/java/com/syzb/business/mapper/ModuleUserMapper.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.syzb.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.syzb.business.entity.ModuleUser;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 权限用户表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author helloSyzb
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
public interface ModuleUserMapper extends BaseMapper<ModuleUser> {
|
||||
|
||||
}
|
||||
39
src/main/java/com/syzb/business/schedule/BusinessTask.java
Normal file
39
src/main/java/com/syzb/business/schedule/BusinessTask.java
Normal file
@ -0,0 +1,39 @@
|
||||
package com.syzb.business.schedule;
|
||||
|
||||
import com.syzb.business.service.BusinessDataService;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.service.CacheService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Component
|
||||
public class BusinessTask {
|
||||
|
||||
@Resource
|
||||
private CacheService cacheService;
|
||||
|
||||
@Resource
|
||||
private BusinessDataService businessDataService;
|
||||
|
||||
@Scheduled(cron = "${cron.syncOrder}")
|
||||
public void syncOrder() {
|
||||
cacheService.lock(CacheKey.LockKey.SYNC_ORDER,
|
||||
0, TimeUnit.SECONDS,
|
||||
30, TimeUnit.SECONDS,
|
||||
businessDataService::syncOrder
|
||||
);
|
||||
}
|
||||
|
||||
@Scheduled(cron = "${cron.syncModuleUser}")
|
||||
public void syncModuleUser() {
|
||||
cacheService.lock(CacheKey.LockKey.SYNC_MODULE_USER,
|
||||
0, TimeUnit.SECONDS,
|
||||
30, TimeUnit.SECONDS,
|
||||
businessDataService::syncModuleUser
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -35,6 +35,8 @@ public class BusinessApiService {
|
||||
|
||||
private String getOrderListUrl = "/order/getAllBatchOrderListByPage";
|
||||
|
||||
private String getModuleUserListUrl = "/order/getUserModuleListByPage";
|
||||
|
||||
private String authorizationDeptId = "16";
|
||||
|
||||
private String authorizationKey = "56e670eea5ff3a1aebbc02820e908ceb56e670eea5ff3a1aebbc02820e908ceb";
|
||||
@ -73,12 +75,15 @@ public class BusinessApiService {
|
||||
|
||||
public List<BusinessOrderVO> getOrderList(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
List<BusinessOrderVO> result = new ArrayList<>();
|
||||
String startTimeStr = LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATETIME_PATTERN);
|
||||
String endTimeStr = LocalDateTimeUtil.format(endTime, DatePattern.NORM_DATETIME_PATTERN);
|
||||
String startTimeStr = LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATETIME_FORMATTER);
|
||||
String endTimeStr = LocalDateTimeUtil.format(endTime, DatePattern.NORM_DATETIME_FORMATTER);
|
||||
Integer currentPage = 1;
|
||||
Integer pageSize = 100;
|
||||
while (true) {
|
||||
BusinessOrderExtVO extVO = getOrderList(startTimeStr, endTimeStr, currentPage, pageSize);
|
||||
if (extVO == null || extVO.getData() == null) {
|
||||
break;
|
||||
}
|
||||
result.addAll(extVO.getData());
|
||||
if (extVO.getData().size() < pageSize || result.size() >= extVO.getTotal()) {
|
||||
break;
|
||||
@ -88,7 +93,7 @@ public class BusinessApiService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public BusinessOrderExtVO getOrderList(String startTime, String endTime, Integer currentPage, Integer pageSize) {
|
||||
private BusinessOrderExtVO getOrderList(String startTime, String endTime, Integer currentPage, Integer pageSize) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("currentPage", currentPage);
|
||||
params.put("pageSize", pageSize);
|
||||
@ -98,6 +103,37 @@ public class BusinessApiService {
|
||||
return vo.getData();
|
||||
}
|
||||
|
||||
public List<BusinessModuleUserVO> getModuleUserList(Integer moduleId, LocalDateTime startTime, LocalDateTime endTime) {
|
||||
List<BusinessModuleUserVO> result = new ArrayList<>();
|
||||
String startTimeStr = LocalDateTimeUtil.format(startTime, DatePattern.NORM_DATETIME_FORMATTER);
|
||||
String endTimeStr = LocalDateTimeUtil.format(endTime, DatePattern.NORM_DATETIME_FORMATTER);
|
||||
Integer currentPage = 1;
|
||||
Integer pageSize = 100;
|
||||
while (true) {
|
||||
BusinessModuleUserExtVO extVO = getModuleUserList(moduleId, startTimeStr, endTimeStr, currentPage, pageSize);
|
||||
if (extVO == null || extVO.getData() == null) {
|
||||
break;
|
||||
}
|
||||
result.addAll(extVO.getData());
|
||||
if (extVO.getData().size() < pageSize || result.size() >= extVO.getTotal()) {
|
||||
break;
|
||||
}
|
||||
currentPage++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private BusinessModuleUserExtVO getModuleUserList(Integer moduleId, String startTime, String endTime, Integer currentPage, Integer pageSize) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("moduleId", moduleId);
|
||||
params.put("currentPage", currentPage);
|
||||
params.put("pageSize", pageSize);
|
||||
params.put("updateStartTime", startTime);
|
||||
params.put("updateEndTime", endTime);
|
||||
BusinessModuleUserRspVO vo = post(getModuleUserListUrl, params, BusinessModuleUserRspVO.class);
|
||||
return vo.getData();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
BusinessApiService service = new BusinessApiService();
|
||||
// BusinessLoginVO loginVO = service.loginByUserName("sz545138", "Abc@123");
|
||||
@ -106,8 +142,10 @@ public class BusinessApiService {
|
||||
// BusinessUserVO userVO = service.getUser(token);
|
||||
// System.out.println(JSONUtil.toJsonStr(userVO));
|
||||
// service.getModuleList(userVO.getUserId().toString());
|
||||
List<BusinessOrderVO> orderList = service.getOrderList(LocalDate.now().withDayOfYear(1).atStartOfDay(), LocalDateTime.now());
|
||||
System.out.println(JSONUtil.toJsonStr(orderList));
|
||||
// List<BusinessOrderVO> orderList = service.getOrderList(LocalDate.now().withDayOfYear(1).atStartOfDay(), LocalDateTime.now());
|
||||
// System.out.println(JSONUtil.toJsonStr(orderList));
|
||||
List<BusinessModuleUserVO> moduleUserList = service.getModuleUserList(1000, LocalDate.now().withDayOfYear(1).atStartOfDay(), LocalDateTime.now());
|
||||
System.out.println(JSONUtil.toJsonStr(moduleUserList));
|
||||
}
|
||||
|
||||
private <T extends BusinessVO> T post(String url, Map<String, Object> params, Class<T> type) {
|
||||
|
||||
218
src/main/java/com/syzb/business/service/BusinessDataService.java
Normal file
218
src/main/java/com/syzb/business/service/BusinessDataService.java
Normal file
@ -0,0 +1,218 @@
|
||||
package com.syzb.business.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.syzb.business.entity.AppOrder;
|
||||
import com.syzb.business.entity.ModuleUser;
|
||||
import com.syzb.business.mapper.AppOrderMapper;
|
||||
import com.syzb.business.mapper.ModuleUserMapper;
|
||||
import com.syzb.business.vo.BusinessModuleUserVO;
|
||||
import com.syzb.business.vo.BusinessOrderVO;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
@Service
|
||||
public class BusinessDataService {
|
||||
|
||||
private LocalDateTime INIT_SYNC_TIME = LocalDateTime.of(2025, 1, 1, 0, 0, 0);
|
||||
|
||||
@Resource
|
||||
private BusinessApiService businessApiService;
|
||||
|
||||
@Resource
|
||||
private AppOrderMapper appOrderMapper;
|
||||
|
||||
@Resource
|
||||
private ModuleUserMapper moduleUserMapper;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void syncOrder() {
|
||||
QueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>query()
|
||||
.select("max(update_time) as update_time");
|
||||
AppOrder appOrder = appOrderMapper.selectOne(wrapper);
|
||||
LocalDateTime startTime = INIT_SYNC_TIME;
|
||||
if (appOrder != null && appOrder.getUpdateTime() != null) {
|
||||
startTime = appOrder.getUpdateTime();
|
||||
}
|
||||
LocalDateTime endTime = LocalDateTime.now();
|
||||
List<BusinessOrderVO> orderList = businessApiService.getOrderList(startTime, endTime);
|
||||
if (CollUtil.isNotEmpty(orderList)) {
|
||||
for (BusinessOrderVO order : orderList) {
|
||||
Integer orderId = order.getOrderId();
|
||||
AppOrder existOrder = appOrderMapper.selectById(orderId);
|
||||
if (existOrder == null) {
|
||||
appOrderMapper.insert(convertOrder(order, true));
|
||||
} else {
|
||||
AppOrder updateOrder = convertOrder(order, false);
|
||||
if (!isEquals(existOrder, updateOrder)) {
|
||||
appOrderMapper.updateById(updateOrder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void syncModuleUser() {
|
||||
QueryWrapper<ModuleUser> wrapper = Wrappers.<ModuleUser>query()
|
||||
.select("max(update_time) as update_time");
|
||||
ModuleUser moduleUser = moduleUserMapper.selectOne(wrapper);
|
||||
LocalDateTime startTime = INIT_SYNC_TIME;
|
||||
if (moduleUser != null && moduleUser.getUpdateTime() != null) {
|
||||
startTime = moduleUser.getUpdateTime();
|
||||
}
|
||||
LocalDateTime endTime = LocalDateTime.now();
|
||||
Set<Integer> moduleIds = getModuleIds();
|
||||
for (Integer moduleId : moduleIds) {
|
||||
List<BusinessModuleUserVO> moduleUserList = businessApiService.getModuleUserList(moduleId, startTime, endTime);
|
||||
if (CollUtil.isNotEmpty(moduleUserList)) {
|
||||
for (BusinessModuleUserVO moduleUserVO : moduleUserList) {
|
||||
Integer id = moduleUserVO.getId();
|
||||
ModuleUser existModuleUser = moduleUserMapper.selectById(id);
|
||||
if (existModuleUser == null) {
|
||||
moduleUserMapper.insert(convertModuleUser(moduleUserVO, true));
|
||||
} else {
|
||||
ModuleUser updateModuleUser = convertModuleUser(moduleUserVO, false);
|
||||
if (!isEquals(existModuleUser, updateModuleUser)) {
|
||||
moduleUserMapper.updateById(updateModuleUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Set<Integer> getModuleIds() {
|
||||
// TODO
|
||||
Set<Integer> set = new HashSet<>();
|
||||
set.add(1000);
|
||||
return set;
|
||||
}
|
||||
|
||||
private AppOrder convertOrder(BusinessOrderVO order, boolean isNew) {
|
||||
AppOrder appOrder = new AppOrder();
|
||||
appOrder.setOrderId(order.getOrderId());
|
||||
appOrder.setProductName(order.getProductName());
|
||||
appOrder.setOrderDay(order.getOrderDay());
|
||||
appOrder.setCurrentPrice(order.getCurrentPrice());
|
||||
appOrder.setOrderState(order.getOrderState());
|
||||
appOrder.setPayStatus(order.getReceivedAmount() == null || order.getReceivedAmount().compareTo(BigDecimal.ZERO) == 0 ? IsOrNot.NOT.value : IsOrNot.IS.value);
|
||||
appOrder.setOriginalPrice(order.getOriginalPrice());
|
||||
appOrder.setIsOpen(order.getIsOpen());
|
||||
appOrder.setReceivedAmount(order.getReceivedAmount());
|
||||
appOrder.setCreateTime(LocalDateTimeUtil.parse(order.getCreateTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setUserId(order.getUserId().toString());
|
||||
appOrder.setMobile(order.getMobile());
|
||||
appOrder.setUmId(order.getUmId());
|
||||
appOrder.setBatchId(order.getBatchId());
|
||||
appOrder.setSku(order.getSku());
|
||||
appOrder.setChannel(order.getChannel());
|
||||
appOrder.setDepartmentId(order.getDepartmentId());
|
||||
appOrder.setOpenTime(LocalDateTimeUtil.parse(order.getOpenTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setSuspendTime(LocalDateTimeUtil.parse(order.getSuspendTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setSuspendRemark(order.getSuspendRemark());
|
||||
appOrder.setRemainingDay(order.getRemainingDay());
|
||||
appOrder.setReceivedAmountTime(LocalDateTimeUtil.parse(order.getReceivedAmountTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setStopType(order.getStopType());
|
||||
appOrder.setStopTime(LocalDateTimeUtil.parse(order.getStopTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setOrderTime(LocalDateTimeUtil.parse(order.getOrderTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setExtInfo(order.getExtInfo());
|
||||
appOrder.setRemark(order.getRemark());
|
||||
appOrder.setUpdateTime(LocalDateTimeUtil.parse(order.getUpdateTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
appOrder.setActivityName(order.getActivityName());
|
||||
appOrder.setHasPdf(order.getHasPdf());
|
||||
appOrder.setCanSign(order.getCanSign());
|
||||
if (StrUtil.isNotBlank(order.getExtInfo())) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(order.getExtInfo());
|
||||
appOrder.setProductId(jsonObject.getInteger("productId"));
|
||||
appOrder.setProductType(jsonObject.getInteger("productType"));
|
||||
appOrder.setSaleUserId(jsonObject.getInteger("saleUserId"));
|
||||
}
|
||||
if (isNew) {
|
||||
appOrder.setInsertTime(LocalDateTime.now());
|
||||
} else {
|
||||
appOrder.setModifyTime(LocalDateTime.now());
|
||||
}
|
||||
return appOrder;
|
||||
}
|
||||
|
||||
private ModuleUser convertModuleUser(BusinessModuleUserVO moduleUserVO, boolean isNew) {
|
||||
ModuleUser moduleUser = new ModuleUser();
|
||||
moduleUser.setId(moduleUserVO.getId());
|
||||
moduleUser.setUserId(moduleUserVO.getUserId());
|
||||
moduleUser.setModuleId(moduleUserVO.getModuleId());
|
||||
moduleUser.setEndTime(LocalDateTimeUtil.parse(moduleUserVO.getEndTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
moduleUser.setCreateTime(LocalDateTimeUtil.parse(moduleUserVO.getCreateTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
moduleUser.setUpdateTime(LocalDateTimeUtil.parse(moduleUserVO.getUpdateTime(), DatePattern.NORM_DATETIME_FORMATTER));
|
||||
if (isNew) {
|
||||
moduleUser.setInsertTime(LocalDateTime.now());
|
||||
} else {
|
||||
moduleUser.setModifyTime(LocalDateTime.now());
|
||||
}
|
||||
return moduleUser;
|
||||
}
|
||||
|
||||
private boolean isEquals(AppOrder a, AppOrder b) {
|
||||
return Objects.equals(a.getOrderId(), b.getOrderId())
|
||||
&& Objects.equals(a.getProductName(), b.getProductName())
|
||||
&& Objects.equals(a.getOrderDay(), b.getOrderDay())
|
||||
&& isEquals(a.getCurrentPrice(), b.getCurrentPrice())
|
||||
&& Objects.equals(a.getOrderState(), b.getOrderState())
|
||||
&& isEquals(a.getOriginalPrice(), b.getOriginalPrice())
|
||||
&& Objects.equals(a.getIsOpen(), b.getIsOpen())
|
||||
&& isEquals(a.getReceivedAmount(), b.getReceivedAmount())
|
||||
&& Objects.equals(a.getCreateTime(), b.getCreateTime())
|
||||
&& Objects.equals(a.getUserId(), b.getUserId())
|
||||
&& Objects.equals(a.getMobile(), b.getMobile())
|
||||
&& Objects.equals(a.getUmId(), b.getUmId())
|
||||
&& Objects.equals(a.getBatchId(), b.getBatchId())
|
||||
&& Objects.equals(a.getSku(), b.getSku())
|
||||
&& Objects.equals(a.getChannel(), b.getChannel())
|
||||
&& Objects.equals(a.getDepartmentId(), b.getDepartmentId())
|
||||
&& Objects.equals(a.getOpenTime(), b.getOpenTime())
|
||||
&& Objects.equals(a.getSuspendTime(), b.getSuspendTime())
|
||||
&& Objects.equals(a.getSuspendRemark(), b.getSuspendRemark())
|
||||
&& Objects.equals(a.getRemainingDay(), b.getRemainingDay())
|
||||
&& Objects.equals(a.getReceivedAmountTime(), b.getReceivedAmountTime())
|
||||
&& Objects.equals(a.getStopType(), b.getStopType())
|
||||
&& Objects.equals(a.getStopTime(), b.getStopTime())
|
||||
&& Objects.equals(a.getOrderTime(), b.getOrderTime())
|
||||
&& Objects.equals(a.getExtInfo(), b.getExtInfo())
|
||||
&& Objects.equals(a.getRemark(), b.getRemark())
|
||||
&& Objects.equals(a.getUpdateTime(), b.getUpdateTime())
|
||||
&& Objects.equals(a.getActivityName(), b.getActivityName())
|
||||
&& Objects.equals(a.getHasPdf(), b.getHasPdf())
|
||||
&& Objects.equals(a.getCanSign(), b.getCanSign())
|
||||
&& Objects.equals(a.getProductId(), b.getProductId())
|
||||
&& Objects.equals(a.getProductType(), b.getProductType())
|
||||
&& Objects.equals(a.getSaleUserId(), b.getSaleUserId());
|
||||
}
|
||||
|
||||
private boolean isEquals(ModuleUser a, ModuleUser b) {
|
||||
return Objects.equals(a.getId(), b.getId())
|
||||
&& Objects.equals(a.getUserId(), b.getUserId())
|
||||
&& Objects.equals(a.getModuleId(), b.getModuleId())
|
||||
&& Objects.equals(a.getEndTime(), b.getEndTime())
|
||||
&& Objects.equals(a.getCreateTime(), b.getCreateTime())
|
||||
&& Objects.equals(a.getUpdateTime(), b.getUpdateTime());
|
||||
}
|
||||
|
||||
private boolean isEquals(BigDecimal a, BigDecimal b) {
|
||||
return a == null ? b == null : a.compareTo(b) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,20 +1,18 @@
|
||||
package com.syzb.app.service;
|
||||
package com.syzb.business.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.syzb.app.constants.AppOrderStatus;
|
||||
import com.syzb.app.entity.AppOrder;
|
||||
import com.syzb.app.mapper.AppOrderMapper;
|
||||
import com.syzb.app.vo.OrderStatCollect;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.syzb.business.entity.AppOrder;
|
||||
import com.syzb.business.mapper.AppOrderMapper;
|
||||
import com.syzb.business.vo.order.OrderStatCollect;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Table;
|
||||
import com.syzb.video.vo.statistic.VideoLiveProductSaleVO;
|
||||
import com.syzb.video.vo.statistic.ProductSaleVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -29,45 +27,32 @@ public class OrderQueryService {
|
||||
@Resource
|
||||
private AppOrderMapper appOrderMapper;
|
||||
|
||||
/*
|
||||
* 订单状态 新订单180、已开通220、已停用/已退款90、已过期80、已取消70,关闭权限但未退款230
|
||||
* 已支付包含: 已开通220、已停用/已退款90、已过期80、关闭权限但未退款230
|
||||
* 未支付包含: 新订单180、已取消70
|
||||
*/
|
||||
public static final Set<Integer> PAID_STATUS = ImmutableSet.of(AppOrderStatus.OPENED.value, AppOrderStatus.REFUNDED.value, AppOrderStatus.EXPIRED.value, AppOrderStatus.CLOSED_UN_REFUNDED.value);
|
||||
|
||||
public static final Set<Integer> UNPAID_STATUS = ImmutableSet.of(AppOrderStatus.NEW.value, AppOrderStatus.CANCELED.value);
|
||||
|
||||
public static final String PAID_STATUS_STR = PAID_STATUS.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
|
||||
public static final String UNPAID_STATUS_STR = UNPAID_STATUS.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
|
||||
public OrderStatCollect queryOrderCollect(Integer videoId, ProductType productType) {
|
||||
return queryOrderCollect(videoId, null, productType);
|
||||
public OrderStatCollect queryOrderCollect(Integer productId, ProductType productType) {
|
||||
return queryOrderCollect(productId, null, productType);
|
||||
}
|
||||
|
||||
public OrderStatCollect queryOrderCollect(Collection<Integer> videoIds, ProductType productType) {
|
||||
return queryOrderCollect(null, videoIds, productType);
|
||||
public OrderStatCollect queryOrderCollect(Collection<Integer> productIds, ProductType productType) {
|
||||
return queryOrderCollect(null, productIds, productType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单支付状态Map
|
||||
*
|
||||
* @param videoId 视频ID
|
||||
* @param productId 产品ID
|
||||
* @param productType 产品类型
|
||||
* @return 订单支付状态Map key: 是否支付 value: 订单统计
|
||||
*/
|
||||
public OrderStatCollect queryOrderCollect(Integer videoId, Collection<Integer> videoIds, @NotNull ProductType productType) {
|
||||
public OrderStatCollect queryOrderCollect(Integer productId, Collection<Integer> productIds, @NotNull ProductType productType) {
|
||||
// 计算订单汇总
|
||||
QueryWrapper<AppOrder> orderWrapper = Wrappers.<AppOrder>query()
|
||||
// 用sale_user_id保存订单数量
|
||||
.select("pay_status",
|
||||
"ifnull(count(1), 0) as sale_user_id",
|
||||
"IFNULL(SUM(total_price), 0) AS total_price",
|
||||
"IFNULL(SUM(pay_total), 0) AS pay_total",
|
||||
"IFNULL(COUNT(distinct user_name), 0) AS product_type")
|
||||
.eq(videoId != null, "video_id", videoId)
|
||||
.in(CollUtil.isNotEmpty(videoIds), "video_id", videoIds)
|
||||
"IFNULL(SUM(original_price), 0) AS original_price",
|
||||
"IFNULL(SUM(received_amount), 0) AS received_amount",
|
||||
"IFNULL(COUNT(distinct user_id), 0) AS product_type")
|
||||
.eq(productId != null, "product_id", productId)
|
||||
.in(CollUtil.isNotEmpty(productIds), "product_id", productIds)
|
||||
.eq("product_type", productType.value)
|
||||
.isNotNull("pay_status")
|
||||
.groupBy("pay_status WITH ROLLUP");
|
||||
@ -77,15 +62,15 @@ public class OrderQueryService {
|
||||
for (AppOrder order : orders) {
|
||||
if (IsOrNot.IS.value.equals(order.getPayStatus())) {
|
||||
result.setPayCount(order.getSaleUserId());
|
||||
result.setPayAmount(order.getPayTotal());
|
||||
result.setPayAmount(order.getReceivedAmount());
|
||||
result.setPayUserCount(order.getProductType());
|
||||
} else if (IsOrNot.NOT.value.equals(order.getPayStatus())) {
|
||||
result.setUnPayCount(order.getSaleUserId());
|
||||
result.setUnPayAmount(order.getTotalPrice());
|
||||
result.setUnPayAmount(order.getOriginalPrice());
|
||||
result.setUnPayUserCount(order.getProductType());
|
||||
} else if (order.getPayStatus() == null) {
|
||||
result.setCount(order.getSaleUserId());
|
||||
result.setOrderAmount(order.getTotalPrice());
|
||||
result.setOrderAmount(order.getOriginalPrice());
|
||||
result.setUserCount(order.getProductType());
|
||||
}
|
||||
}
|
||||
@ -100,10 +85,10 @@ public class OrderQueryService {
|
||||
*/
|
||||
public Set<String> querySubUserBySaleUser(Integer saleUserId) {
|
||||
QueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>query()
|
||||
.select("distinct user_name")
|
||||
.select("distinct user_id")
|
||||
.eq(saleUserId != null && saleUserId != 0, "sale_user_id", saleUserId);
|
||||
List<AppOrder> orders = appOrderMapper.selectList(wrapper);
|
||||
return orders.stream().map(AppOrder::getUserName).collect(Collectors.toSet());
|
||||
return orders.stream().map(order -> order.getUserId().toString()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,17 +103,17 @@ public class OrderQueryService {
|
||||
}
|
||||
QueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>query()
|
||||
.select("user_name",
|
||||
"IFNULL(SUM(total_price), 0) AS total_price",
|
||||
"IFNULL(SUM(pay_total), 0) AS pay_total",
|
||||
"IFNULL(SUM(original_price), 0) AS original_price",
|
||||
"IFNULL(SUM(received_amount), 0) AS received_amount",
|
||||
"IFNULL(COUNT(1), 0) AS sale_user_id")
|
||||
.in("user_name", userIds)
|
||||
.eq("pay_status", IsOrNot.IS.value)
|
||||
.groupBy("user_name");
|
||||
List<AppOrder> orders = appOrderMapper.selectList(wrapper);
|
||||
return orders.stream().collect(Collectors.toMap(AppOrder::getUserName, order -> {
|
||||
return orders.stream().collect(Collectors.toMap(order -> order.getUserId().toString(), order -> {
|
||||
OrderStatCollect orderStatCollect = new OrderStatCollect();
|
||||
orderStatCollect.setOrderAmount(order.getTotalPrice());
|
||||
orderStatCollect.setPayAmount(order.getPayTotal());
|
||||
orderStatCollect.setOrderAmount(order.getOriginalPrice());
|
||||
orderStatCollect.setPayAmount(order.getReceivedAmount());
|
||||
orderStatCollect.setPayCount(order.getSaleUserId());
|
||||
return orderStatCollect;
|
||||
}));
|
||||
@ -138,9 +123,9 @@ public class OrderQueryService {
|
||||
* 查询某位用户各产品的订阅订单
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return Table row:产品类型 column:视频ID value:订单列表
|
||||
* @return Table row:产品类型 column:产品ID value:订单列表
|
||||
*/
|
||||
public Table<Integer, Integer, List<AppOrder>> queryUserSignVideoOrders(String userId) {
|
||||
public Table<Integer, Integer, List<AppOrder>> queryUserSignProductOrders(String userId) {
|
||||
Table<Integer, Integer, List<AppOrder>> table = HashBasedTable.create();
|
||||
if (StrUtil.isEmpty(userId)) {
|
||||
return table;
|
||||
@ -151,11 +136,11 @@ public class OrderQueryService {
|
||||
List<AppOrder> orders = appOrderMapper.selectList(wrapper);
|
||||
for (AppOrder order : orders) {
|
||||
Integer productType = order.getProductType();
|
||||
Integer videoId = order.getVideoId();
|
||||
List<AppOrder> list = table.get(productType, videoId);
|
||||
Integer productId = order.getProductId();
|
||||
List<AppOrder> list = table.get(productType, productId);
|
||||
if (list == null) {
|
||||
list = CollUtil.newArrayList();
|
||||
table.put(productType, videoId, list);
|
||||
table.put(productType, productId, list);
|
||||
}
|
||||
list.add(order);
|
||||
}
|
||||
@ -163,19 +148,19 @@ public class OrderQueryService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询某些视频的订单周期汇总数据
|
||||
* 查询某些产品的订单周期汇总数据
|
||||
*
|
||||
* @param productType 产品类型
|
||||
* @param videoIds 视频ID集合
|
||||
* @param productIds 产品ID集合
|
||||
* @param format 周期格式
|
||||
* @return 订单周期汇总Map key:周期 value:订单统计
|
||||
*/
|
||||
public Map<String, OrderStatCollect> queryCycleOrderCollect(@NotNull ProductType productType, Set<Integer> videoIds, CycleFormat format) {
|
||||
public Map<String, OrderStatCollect> queryCycleOrderCollect(@NotNull ProductType productType, Set<Integer> productIds, CycleFormat format) {
|
||||
QueryWrapper<AppOrder> totalWrapper = Wrappers.<AppOrder>query()
|
||||
.select("DATE_FORMAT(order_time, '" + format + "') AS order_id",
|
||||
"IFNULL(SUM(total_price), 0) AS total_price",
|
||||
.select("DATE_FORMAT(order_time, '" + format + "') AS product_name",
|
||||
"IFNULL(SUM(original_price), 0) AS original_price",
|
||||
"IFNULL(COUNT(1), 0) AS sale_user_id")
|
||||
.in(CollUtil.isNotEmpty(videoIds), "video_id", videoIds)
|
||||
.in(CollUtil.isNotEmpty(productIds), "product_id", productIds)
|
||||
.eq(productType != null, "product_type", productType.value)
|
||||
.groupBy("DATE_FORMAT(order_time, '" + format.format + "')")
|
||||
// 必须用last替代orderBy不然MyBatis会移除格式里面的空格
|
||||
@ -183,25 +168,25 @@ public class OrderQueryService {
|
||||
List<AppOrder> totalOrders = appOrderMapper.selectList(totalWrapper);
|
||||
|
||||
QueryWrapper<AppOrder> paidWrapper = Wrappers.<AppOrder>query()
|
||||
.select("DATE_FORMAT(order_time, '" + format.format + "') AS order_id",
|
||||
"IFNULL(SUM(pay_total), 0) AS pay_total",
|
||||
.select("DATE_FORMAT(order_time, '" + format.format + "') AS product_name",
|
||||
"IFNULL(SUM(received_amount), 0) AS received_amount",
|
||||
"IFNULL(COUNT(1), 0) AS sale_user_id")
|
||||
.in(CollUtil.isNotEmpty(videoIds), "video_id", videoIds)
|
||||
.in(CollUtil.isNotEmpty(productIds), "product_id", productIds)
|
||||
.eq(productType != null, "product_type", productType.value)
|
||||
.eq("pay_status", IsOrNot.IS.value)
|
||||
.groupBy("DATE_FORMAT(order_time, '" + format.format + "')")
|
||||
// 必须用last替代orderBy不然MyBatis会移除格式里面的空格
|
||||
.last("ORDER BY DATE_FORMAT(order_time, '" + format.format + "')");
|
||||
List<AppOrder> paidOrders = appOrderMapper.selectList(paidWrapper);
|
||||
Map<String, AppOrder> paidOrderMap = paidOrders.stream().collect(Collectors.toMap(AppOrder::getOrderId, order -> order));
|
||||
return totalOrders.stream().collect(Collectors.toMap(AppOrder::getOrderId, order -> {
|
||||
Map<Integer, AppOrder> paidOrderMap = paidOrders.stream().collect(Collectors.toMap(AppOrder::getOrderId, order -> order));
|
||||
return totalOrders.stream().collect(Collectors.toMap(AppOrder::getProductName, order -> {
|
||||
OrderStatCollect orderStatCollect = new OrderStatCollect();
|
||||
orderStatCollect.setCount(order.getSaleUserId());
|
||||
orderStatCollect.setOrderAmount(order.getTotalPrice());
|
||||
orderStatCollect.setOrderAmount(order.getOriginalPrice());
|
||||
AppOrder paidOrder = paidOrderMap.get(order.getOrderId());
|
||||
if (paidOrder != null) {
|
||||
orderStatCollect.setPayCount(paidOrder.getSaleUserId());
|
||||
orderStatCollect.setPayAmount(paidOrder.getPayTotal());
|
||||
orderStatCollect.setPayAmount(paidOrder.getReceivedAmount());
|
||||
orderStatCollect.setUnPayCount(order.getSaleUserId() - paidOrder.getSaleUserId());
|
||||
} else {
|
||||
orderStatCollect.setPayCount(0);
|
||||
@ -213,25 +198,25 @@ public class OrderQueryService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询某些视频的订单统计数据
|
||||
* 查询某些产品的订单统计数据
|
||||
*/
|
||||
public Map<Integer, OrderStatCollect> queryVideoOrderCollect(ProductType productType, Set<Integer> videoIds) {
|
||||
public Map<Integer, OrderStatCollect> queryProductOrderCollect(ProductType productType, Set<Integer> productIds) {
|
||||
QueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>query()
|
||||
.select("video_id",
|
||||
"IFNULL(SUM(total_price), 0) AS total_price",
|
||||
"IFNULL(SUM(pay_total), 0) AS pay_total",
|
||||
.select("product_id",
|
||||
"IFNULL(SUM(original_price), 0) AS original_price",
|
||||
"IFNULL(SUM(received_amount), 0) AS received_amount",
|
||||
"IFNULL(COUNT(1), 0) AS sale_user_id")
|
||||
.in(CollUtil.isNotEmpty(videoIds), "video_id", videoIds)
|
||||
.in(CollUtil.isNotEmpty(productIds), "product_id", productIds)
|
||||
.eq(productType != null, "product_type", productType.value)
|
||||
.eq("pay_status", IsOrNot.IS.value)
|
||||
.groupBy("video_id");
|
||||
.groupBy("product_id");
|
||||
List<AppOrder> orders = appOrderMapper.selectList(wrapper);
|
||||
return orders.stream().collect(Collectors.toMap(AppOrder::getVideoId, order -> {
|
||||
return orders.stream().collect(Collectors.toMap(AppOrder::getProductId, order -> {
|
||||
OrderStatCollect orderStatCollect = new OrderStatCollect();
|
||||
orderStatCollect.setCount(order.getSaleUserId());
|
||||
orderStatCollect.setPayCount(order.getSaleUserId());
|
||||
orderStatCollect.setOrderAmount(order.getTotalPrice());
|
||||
orderStatCollect.setPayAmount(order.getPayTotal());
|
||||
orderStatCollect.setOrderAmount(order.getOriginalPrice());
|
||||
orderStatCollect.setPayAmount(order.getReceivedAmount());
|
||||
return orderStatCollect;
|
||||
}));
|
||||
}
|
||||
@ -239,34 +224,34 @@ public class OrderQueryService {
|
||||
/**
|
||||
* 查询直播间产品销量
|
||||
*/
|
||||
public List<VideoLiveProductSaleVO> queryVideoLiveProductSale(Integer videoId) {
|
||||
public List<ProductSaleVO> queryVideoLiveProductSale(Integer productId) {
|
||||
QueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>query()
|
||||
.select("product_id, product_name",
|
||||
"IFNULL(SUM(pay_total), 0) AS pay_total",
|
||||
"IFNULL(SUM(received_amount), 0) AS received_amount",
|
||||
"IFNULL(COUNT(1), 0) AS sale_user_id")
|
||||
.eq("video_id", videoId)
|
||||
.eq("product_id", productId)
|
||||
.eq("product_type", ProductType.VIDEO_SINGLE.value)
|
||||
.eq("pay_status", IsOrNot.IS.value)
|
||||
.groupBy("product_id", "product_name")
|
||||
.orderByDesc("IFNULL(COUNT(1), 0)");
|
||||
List<AppOrder> orders = appOrderMapper.selectList(wrapper);
|
||||
return orders.stream().map(order -> new VideoLiveProductSaleVO(order.getProductName(), order.getSaleUserId(), order.getPayTotal())).collect(Collectors.toList());
|
||||
return orders.stream().map(order -> new ProductSaleVO(order.getProductName(), order.getSaleUserId(), order.getReceivedAmount())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询某视频的订单用户订阅的产品名称
|
||||
* 查询某产品的订单用户订阅的产品名称
|
||||
*
|
||||
* @param videoId 视频ID
|
||||
* @param productId 产品ID
|
||||
* @param payStatus 支付状态
|
||||
* @return 用户订阅的产品名称Map key: 用户名 value: 产品名称列表
|
||||
*/
|
||||
public Map<String, List<String>> calUserOrderName(Integer videoId, Integer payStatus) {
|
||||
public Map<String, List<String>> calUserOrderName(Integer productId, Integer payStatus) {
|
||||
LambdaQueryWrapper<AppOrder> wrapper = Wrappers.<AppOrder>lambdaQuery()
|
||||
.eq(AppOrder::getVideoId, videoId)
|
||||
.in(payStatus != null, AppOrder::getPayStatus, payStatus);
|
||||
.eq(AppOrder::getProductId, productId)
|
||||
.isNotNull(IsOrNot.IS.value.equals(payStatus), AppOrder::getReceivedAmount);
|
||||
List<AppOrder> orderList = appOrderMapper.selectList(wrapper);
|
||||
return orderList.stream()
|
||||
.collect(Collectors.groupingBy(AppOrder::getUserName,
|
||||
.collect(Collectors.groupingBy(order -> order.getUserId().toString(),
|
||||
Collectors.mapping(AppOrder::getProductName, Collectors.toList())));
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.syzb.business.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BusinessModuleUserExtVO {
|
||||
|
||||
private Integer currentPage;
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
private Integer total;
|
||||
|
||||
private List<BusinessModuleUserVO> data;
|
||||
|
||||
public Integer getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(Integer currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Integer total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<BusinessModuleUserVO> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<BusinessModuleUserVO> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.syzb.business.vo;
|
||||
|
||||
public class BusinessModuleUserRspVO extends BusinessVO {
|
||||
|
||||
private BusinessModuleUserExtVO data;
|
||||
|
||||
public BusinessModuleUserExtVO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(BusinessModuleUserExtVO data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
65
src/main/java/com/syzb/business/vo/BusinessModuleUserVO.java
Normal file
65
src/main/java/com/syzb/business/vo/BusinessModuleUserVO.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.syzb.business.vo;
|
||||
|
||||
public class BusinessModuleUserVO {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer moduleId;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String updateTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getModuleId() {
|
||||
return moduleId;
|
||||
}
|
||||
|
||||
public void setModuleId(Integer moduleId) {
|
||||
this.moduleId = moduleId;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.syzb.app.vo;
|
||||
package com.syzb.business.vo.order;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
@ -46,6 +46,8 @@ public class CacheKey {
|
||||
public static final String SAVE_MESSAGE_READ = "save_message_read";
|
||||
public static final String SAVE_GROUP_USER = "save_group_user";
|
||||
public static final String COLLECT_GROUP_DATA = "collect_group_data";
|
||||
public static final String SYNC_ORDER = "sync_order";
|
||||
public static final String SYNC_MODULE_USER = "sync_module_user";
|
||||
}
|
||||
|
||||
// 消息主题
|
||||
|
||||
@ -4,7 +4,6 @@ import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum ProductType {
|
||||
|
||||
@ -27,7 +27,7 @@ import java.util.List;
|
||||
* 广告位 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
@Api(tags = "广告位")
|
||||
|
||||
@ -26,7 +26,7 @@ import java.util.List;
|
||||
* 推荐位 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
@Api(tags = "推荐位")
|
||||
|
||||
@ -18,7 +18,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2021-11-23
|
||||
*/
|
||||
@Api(tags = "定时任务查询")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.syzb.common.controller;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.syzb.common.annotation.Auth;
|
||||
import com.syzb.common.constant.AccessRole;
|
||||
import com.syzb.common.query.KeywordPageQuery;
|
||||
@ -10,7 +11,6 @@ import com.syzb.common.result.Pager;
|
||||
import com.syzb.common.service.SensitiveWordService;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.SensitiveWordVO;
|
||||
import com.google.common.base.Charsets;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
@Api(tags = "敏感词")
|
||||
|
||||
@ -26,7 +26,7 @@ import javax.validation.constraints.NotNull;
|
||||
* 标签表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
@Api(tags = "通用标签")
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 广告位
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-09-26
|
||||
*/
|
||||
public class Advert implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.io.Serializable;
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2021-09-24
|
||||
*/
|
||||
public class BlackStock implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 评论表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-04-25
|
||||
*/
|
||||
public class Comment implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 评论禁言表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-04-25
|
||||
*/
|
||||
public class CommentBlack implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 业务操作日志表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-04-26
|
||||
*/
|
||||
public class OperationLog implements Serializable {
|
||||
|
||||
@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 推荐位
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-09-29
|
||||
*/
|
||||
public class Recommend implements IProduct, Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 风险等级配置
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
public class RiskLevel implements Serializable {
|
||||
|
||||
@ -11,7 +11,7 @@ import java.io.Serializable;
|
||||
* 系统安全设置
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2023-08-16
|
||||
*/
|
||||
public class SafetyConfig implements Serializable {
|
||||
|
||||
@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-11-09
|
||||
*/
|
||||
public class ScheduleLog implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-26
|
||||
*/
|
||||
public class SensitiveWord implements Serializable {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-07-02
|
||||
*/
|
||||
public class ShortUrl implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 标签表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-10-11
|
||||
*/
|
||||
public class Tag implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 用户行为日志
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2023-11-27
|
||||
*/
|
||||
public class UserBehaviorLog implements Serializable {
|
||||
|
||||
@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.auth0.jwt.exceptions.JWTVerificationException;
|
||||
import com.auth0.jwt.exceptions.TokenExpiredException;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.constant.ClientType;
|
||||
import com.syzb.common.handler.BizException;
|
||||
@ -14,8 +16,6 @@ import com.syzb.common.util.RequestIdUtil;
|
||||
import com.syzb.common.util.logger.LoggerUtil;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -29,7 +29,7 @@ public class CodeGenerator {
|
||||
DataSourceConfig dsc = new DataSourceConfig
|
||||
.Builder("jdbc:mysql://47.96.178.171:3306/advisor_video?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8",
|
||||
"eason",
|
||||
"mysql2025easonzhu")
|
||||
"mysql2025helloSyzb")
|
||||
// .Builder("jdbc:mysql://172.16.9.44:3306/db_crm_dyqh?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false",
|
||||
// "taf",
|
||||
// "taf2015")
|
||||
@ -44,7 +44,7 @@ public class CodeGenerator {
|
||||
GlobalConfig globalConfig = new GlobalConfig
|
||||
.Builder()
|
||||
.outputDir(projectPath + "/src/main/java")
|
||||
.author("easonzhu")
|
||||
.author("helloSyzb")
|
||||
.openDir(false)
|
||||
.fileOverride()
|
||||
.build();
|
||||
@ -52,7 +52,7 @@ public class CodeGenerator {
|
||||
// 包配置
|
||||
PackageConfig packageConfig = new PackageConfig
|
||||
.Builder()
|
||||
.parent("com")
|
||||
.parent("com.syzb")
|
||||
.moduleName(moduleName)
|
||||
.build();
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.syzb.common.handler;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.syzb.common.result.CommonResult;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.util.logger.LoggerUtil;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package com.syzb.common.interceptor;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
import com.syzb.common.filter.AuthFilter;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.syzb.common.interceptor;
|
||||
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
import com.syzb.common.entity.OnlineUser;
|
||||
import com.syzb.common.vo.FrontUserVO;
|
||||
import com.syzb.group.service.common.GroupCacheService;
|
||||
import com.syzb.group.service.common.GroupMessageService;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.video.helper.VideoHelper;
|
||||
import com.syzb.video.service.common.VideoCacheService;
|
||||
import com.syzb.video.service.common.VideoMessageService;
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.Advert;
|
||||
* 广告位 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-09-26
|
||||
*/
|
||||
public interface AdvertMapper extends BaseMapper<Advert> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.CommentBlack;
|
||||
* 评论禁言表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-04-25
|
||||
*/
|
||||
public interface CommentBlackMapper extends BaseMapper<CommentBlack> {
|
||||
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
* 评论表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-04-25
|
||||
*/
|
||||
public interface CommentMapper extends BaseMapper<Comment> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.OperationLog;
|
||||
* 业务操作日志表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-04-26
|
||||
*/
|
||||
public interface OperationLogMapper extends BaseMapper<OperationLog> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.Recommend;
|
||||
* 推荐位 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-09-29
|
||||
*/
|
||||
public interface RecommendMapper extends BaseMapper<Recommend> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.RiskLevel;
|
||||
* 风险等级配置 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2021-10-11
|
||||
*/
|
||||
public interface RiskLevelMapper extends BaseMapper<RiskLevel> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.ScheduleLog;
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2021-11-23
|
||||
*/
|
||||
public interface ScheduleLogMapper extends BaseMapper<ScheduleLog> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.SensitiveWord;
|
||||
* 敏感词 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-26
|
||||
*/
|
||||
public interface SensitiveWordMapper extends BaseMapper<SensitiveWord> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.ShortUrl;
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-07-02
|
||||
*/
|
||||
public interface ShortUrlMapper extends BaseMapper<ShortUrl> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.common.entity.Tag;
|
||||
* 标签表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-26
|
||||
*/
|
||||
public interface TagMapper extends BaseMapper<Tag> {
|
||||
|
||||
@ -4,6 +4,10 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.constant.AdvertPosition;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
@ -20,10 +24,6 @@ import com.syzb.common.vo.AdvertAppVO;
|
||||
import com.syzb.common.vo.AdvertVO;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.MergeProductInfoVO;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
import com.syzb.rbac.service.UserService;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
|
||||
@ -120,7 +120,7 @@ public class AppUserService {
|
||||
}
|
||||
List<BusinessModuleVO> moduleList = businessApiService.getModuleList(frontUserVO.getUserId());
|
||||
if (CollUtil.isNotEmpty(moduleList)) {
|
||||
String now = LocalDateTimeUtil.format(LocalDateTimeUtil.now(), DatePattern.NORM_DATETIME_PATTERN);
|
||||
String now = LocalDateTimeUtil.format(LocalDateTimeUtil.now(), DatePattern.NORM_DATETIME_FORMATTER);
|
||||
for (BusinessModuleVO moduleVO : moduleList) {
|
||||
if (auths.contains(moduleVO.getModuleId().toString()) && moduleVO.getEndTime().compareTo(now) > 0) {
|
||||
return new AuthResultVO(true);
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
package com.syzb.common.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.entity.ScheduleLog;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.util.logger.LoggerUtil;
|
||||
import com.hazelcast.collection.ISet;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.crdt.pncounter.PNCounter;
|
||||
import com.hazelcast.instance.impl.HazelcastInstanceProxy;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.entity.ScheduleLog;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.util.logger.LoggerUtil;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@ -5,6 +5,9 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.constant.CommentBlackScope;
|
||||
import com.syzb.common.constant.CommentBlackStatus;
|
||||
import com.syzb.common.constant.CommentBlackType;
|
||||
@ -21,9 +24,6 @@ import com.syzb.common.util.logger.LoggerUtil;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.CommentBlackVO;
|
||||
import com.syzb.common.vo.MergeProductInfoVO;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.rbac.entity.Dept;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
import com.syzb.rbac.service.DeptService;
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
package com.syzb.common.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.syzb.advisor.entity.AdvisorBasic;
|
||||
import com.syzb.advisor.service.AdvisorInfoService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.advisor.entity.AdvisorBasic;
|
||||
import com.syzb.advisor.service.AdvisorInfoService;
|
||||
import com.syzb.common.constant.CommentUserType;
|
||||
import com.syzb.common.constant.IsOrNot;
|
||||
import com.syzb.common.constant.OrderBy;
|
||||
@ -21,9 +24,6 @@ import com.syzb.common.result.Pager;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.util.CodecUtil;
|
||||
import com.syzb.common.vo.*;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.rbac.entity.Dept;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
import com.syzb.rbac.service.DeptService;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.syzb.common.service;
|
||||
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.syzb.advisor.entity.AdvisorBasic;
|
||||
import com.syzb.advisor.service.AdvisorInfoService;
|
||||
import com.syzb.advisor.vo.AdvisorInfoAppVO;
|
||||
@ -10,8 +12,6 @@ import com.syzb.common.vo.MergeProductInfoVO;
|
||||
import com.syzb.course.query.IdAndSaleUserQuery;
|
||||
import com.syzb.course.service.ShortVideoService;
|
||||
import com.syzb.course.vo.ShortVideoVO;
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.syzb.video.service.app.AppVideoColumnService;
|
||||
import com.syzb.video.service.app.AppVideoInfoService;
|
||||
import com.syzb.video.vo.column.VideoColumnAppVO;
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
package com.syzb.common.service;
|
||||
|
||||
import com.syzb.advisor.constant.AdvisorInfoStatus;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.advisor.constant.AdvisorInfoStatus;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
import com.syzb.common.constant.ThirdPartyProductStatus;
|
||||
@ -16,9 +19,6 @@ import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.MergeProductInfoVO;
|
||||
import com.syzb.common.vo.RecommendVO;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Table;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.rbac.entity.UserDept;
|
||||
import com.syzb.rbac.service.UserService;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
|
||||
@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
package com.syzb.common.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.syzb.advisor.service.AdvisorInfoService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.advisor.service.AdvisorInfoService;
|
||||
import com.syzb.common.constant.IsActive;
|
||||
import com.syzb.common.constant.ProductType;
|
||||
import com.syzb.common.entity.Tag;
|
||||
@ -19,7 +20,6 @@ import com.syzb.common.result.Pager;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.syzb.common.vo.TagVO;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.video.service.common.VideoCommonService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -3,6 +3,8 @@ package com.syzb.common.service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import com.syzb.common.config.cache.CacheKey;
|
||||
import com.syzb.common.entity.ShortUrl;
|
||||
import com.syzb.common.handler.BizException;
|
||||
@ -10,8 +12,6 @@ import com.syzb.common.mapper.ShortUrlMapper;
|
||||
import com.syzb.common.query.UrlResizeQuery;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.util.ShortUrlGenerator;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.map.IMap;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.syzb.common.state;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
import com.syzb.common.vo.BackendUserVO;
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
@ -14,7 +14,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 简单状态机
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2022-08-30
|
||||
*/
|
||||
public class StateMachine<T> {
|
||||
|
||||
@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 课程表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public class Course implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 课程内容表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public class CourseContent implements Serializable {
|
||||
|
||||
@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 甄选服务表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-30
|
||||
*/
|
||||
public class CoursePackage implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 甄选服务内容表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-09-03
|
||||
*/
|
||||
public class CoursePackageContent implements Serializable {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* 首页Tab表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-23
|
||||
*/
|
||||
public class MainTab implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-16
|
||||
*/
|
||||
public class Page implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 合集表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public class Serial implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 合集内容表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-16
|
||||
*/
|
||||
public class SerialContent implements Serializable {
|
||||
|
||||
@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
* 短视频
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-21
|
||||
*/
|
||||
public class ShortVideo implements Serializable {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* 短视频购物车商品
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-21
|
||||
*/
|
||||
public class ShortVideoCart implements Serializable {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* 短视频购物车点击
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-10-14
|
||||
*/
|
||||
public class ShortVideoCartClick implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 短视频点赞
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-21
|
||||
*/
|
||||
public class ShortVideoFavor implements Serializable {
|
||||
|
||||
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
* 短视频营销表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-10-14
|
||||
*/
|
||||
public class ShortVideoSale implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 短视频分享
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-09-03
|
||||
*/
|
||||
public class ShortVideoShare implements Serializable {
|
||||
|
||||
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
* 短视频观看
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-09-02
|
||||
*/
|
||||
public class ShortVideoWatch implements Serializable {
|
||||
|
||||
@ -11,7 +11,7 @@ import java.time.LocalDateTime;
|
||||
* 企业微信表
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-30
|
||||
*/
|
||||
public class WorkWeixin implements Serializable {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.CourseContent;
|
||||
* 课程内容表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public interface CourseContentMapper extends EasyBaseMapper<CourseContent> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.Course;
|
||||
* 课程表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public interface CourseMapper extends BaseMapper<Course> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.CoursePackageContent;
|
||||
* 甄选服务内容表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-09-03
|
||||
*/
|
||||
public interface CoursePackageContentMapper extends EasyBaseMapper<CoursePackageContent> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.CoursePackage;
|
||||
* 甄选服务表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-30
|
||||
*/
|
||||
public interface CoursePackageMapper extends BaseMapper<CoursePackage> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.MainTab;
|
||||
* 首页Tab表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-23
|
||||
*/
|
||||
public interface MainTabMapper extends EasyBaseMapper<MainTab> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.Page;
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-16
|
||||
*/
|
||||
public interface PageMapper extends BaseMapper<Page> {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.syzb.course.entity.SerialContent;
|
||||
* 合集内容表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-16
|
||||
*/
|
||||
public interface SerialContentMapper extends EasyBaseMapper<SerialContent> {
|
||||
|
||||
@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Select;
|
||||
* 合集表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author easonzhu
|
||||
* @author helloSyzb
|
||||
* @since 2024-08-15
|
||||
*/
|
||||
public interface SerialMapper extends BaseMapper<Serial> {
|
||||
|
||||
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