账户登录
This commit is contained in:
1 parent
f08dcee83a
commit
8e80e26c91
57 files changed
+1401
-100
No files matched your search
@@ -13,7 +13,7 @@ public enum BusinessCodePrefixEnum {
|
||||
INQUIRY_SETTING("IST"), INQUIRY_FIELD_VALUE("IFV"), INQUIRY_ATTACHMENT("IAT"),
|
||||
INQUIRY_LOG("ILG"), INQUIRY_RECEIVER("IRC"), MAIL_TASK("MLT"), CUSTOMER("CUS"),
|
||||
CONTACT("CON"), LEAD("LED"), FOLLOW_UP("FLW"), MEDIA("MED"), SEO("SEO"), SEO_HEADING("SEH"),
|
||||
PUBLISH("PUB"), JOB("JOB"), USER("USR"), ROLE("ROL");
|
||||
PUBLISH("PUB"), JOB("JOB"), USER("USR"), ROLE("ROL"), FLOW_LOG("FLO");
|
||||
|
||||
/** 三位业务前缀。 */
|
||||
private final String prefix;
|
||||
|
||||
+1
-2
@@ -3,7 +3,6 @@ package com.shoplix.modules.account.repository.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/** 运营后台管理员账户持久化实体。 */
|
||||
@@ -17,6 +16,6 @@ public class AdminUserEntity {
|
||||
/** BCrypt密码哈希。 */ private String passwordHash;
|
||||
/** 管理员显示名称。 */ private String displayName;
|
||||
/** 账户状态。 */ private String status;
|
||||
/** 最近登录时间。 */ private LocalDateTime lastLoginTime;
|
||||
/** 最近登录毫秒时间戳。 */ private Long lastLoginTime;
|
||||
/** 逻辑删除状态。 */ private Integer deleted;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.shoplix.modules.analytics.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** 前台访问打点事件。 */
|
||||
public enum FlowEventEnum {
|
||||
PAGE_VIEW("page_view"),
|
||||
PAGE_LEAVE("page_leave"),
|
||||
SEARCH("search"),
|
||||
SUBMIT_INQUIRY("submit_inquiry"),
|
||||
CLICK("click");
|
||||
|
||||
/** 事件编码。 */
|
||||
private final String value;
|
||||
|
||||
/** 创建事件枚举。 */
|
||||
FlowEventEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/** 获取事件编码。 */
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/** 判断事件编码是否受支持。 */
|
||||
public static boolean supports(String value) {
|
||||
return Arrays.stream(values()).anyMatch(item -> item.value.equals(value));
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.shoplix.modules.analytics.repository.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/** 前台访问打点持久化实体。 */
|
||||
@Data
|
||||
@TableName("flow_log")
|
||||
public class FlowLogEntity {
|
||||
/** 数据库内部主键。 */ @TableId(type = IdType.AUTO) private Long id;
|
||||
/** 打点业务编号。 */ private String flowCode;
|
||||
/** 站点业务编号。 */ private String siteCode;
|
||||
/** 语言编码。 */ private String language;
|
||||
/** 事件发生毫秒时间戳。 */ private Long ts;
|
||||
/** 日期,格式yyyyMMdd。 */ private Integer dt;
|
||||
/** 年份。 */ private Integer yyyy;
|
||||
/** 月份,取值1至12。 */ private Integer mm;
|
||||
/** ISO周序号,取值1至53。 */ private Integer week;
|
||||
/** 小时,取值0至23。 */ private Integer hh;
|
||||
/** 事件编码。 */ private String eventName;
|
||||
/** 事件详情。 */ private String eventDetail;
|
||||
/** 进入页面毫秒时间戳。 */ private Long startTime;
|
||||
/** 离开页面毫秒时间戳。 */ private Long endTime;
|
||||
/** 匿名访客标识。 */ private String cuid;
|
||||
/** 登录用户业务编号。 */ private String userCode;
|
||||
/** 访问场景。 */ private String scene;
|
||||
/** 新访客标识:0否,1是。 */ private Integer newVisitorFlag;
|
||||
/** 会话首次访问标识:0否,1是。 */ private Integer sessionFirstFlag;
|
||||
/** 单次会话标识。 */ private String sessionCode;
|
||||
/** 页面名称。 */ private String pageName;
|
||||
/** 页面类型编码。 */ private String pageCode;
|
||||
/** 页面标题。 */ private String pageTitle;
|
||||
/** 页面关联业务编号。 */ private String targetCode;
|
||||
/** SEO路径。 */ private String seoLink;
|
||||
/** 设备像素比。 */ private String pixelRatio;
|
||||
/** 浏览器平台。 */ private String platform;
|
||||
/** 社媒渠道。 */ private String socialMediaChannel;
|
||||
/** 流量渠道。 */ private String flowChannel;
|
||||
/** UTM来源平台。 */ private String utmSource;
|
||||
/** UTM活动。 */ private String utmCampaign;
|
||||
/** UTM广告组。 */ private String utmAdgroup;
|
||||
/** 落地页域名。 */ private String landingDomain;
|
||||
/** 落地页完整地址。 */ private String landingUrl;
|
||||
/** 落地页路径。 */ private String landingUrlBody;
|
||||
/** 落地页域名及路径。 */ private String landing;
|
||||
/** 窗口高度。 */ private Integer winHeight;
|
||||
/** 窗口宽度。 */ private Integer winWidth;
|
||||
/** 当前域名。 */ private String domain;
|
||||
/** 当前地址,不包含查询参数。 */ private String urlInfo;
|
||||
/** 当前完整地址。 */ private String url;
|
||||
/** 当前路径。 */ private String urlBody;
|
||||
/** 当前查询参数。 */ private String urlArgs;
|
||||
/** 屏幕宽度。 */ private Integer screenWidth;
|
||||
/** 屏幕高度。 */ private Integer screenHeight;
|
||||
/** 客户端IP地址。 */ private String ipAddress;
|
||||
/** 国家或地区ISO编码。 */ private String isoCode;
|
||||
/** 国家或地区名称。 */ private String countryName;
|
||||
/** 省或州名称。 */ private String provinceName;
|
||||
/** 城市名称。 */ private String cityName;
|
||||
/** 来源地址。 */ private String referrerUrl;
|
||||
/** 页面停留秒数。 */ private Integer duration;
|
||||
/** 用户代理。 */ private String ua;
|
||||
/** 网络类型。 */ private String network;
|
||||
/** 操作系统。 */ private String operatingSystem;
|
||||
/** 浏览器名称。 */ private String browser;
|
||||
/** 浏览器版本。 */ private String browserVersion;
|
||||
/** 设备类型。 */ private String device;
|
||||
/** 逻辑删除状态:0未删除,1已删除。 */ private Integer deleted;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.shoplix.modules.analytics.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shoplix.modules.analytics.repository.entity.FlowLogEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/** 前台访问打点Mapper。 */
|
||||
@Mapper
|
||||
public interface FlowLogMapper extends BaseMapper<FlowLogEntity> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.shoplix.modules.analytics.repository.service;
|
||||
|
||||
import com.shoplix.modules.analytics.repository.entity.FlowLogEntity;
|
||||
import com.shoplix.modules.analytics.repository.mapper.FlowLogMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/** 前台访问打点单表数据源服务。 */
|
||||
@Service
|
||||
public class FlowLogRepositoryService {
|
||||
/** 打点Mapper。 */
|
||||
private final FlowLogMapper mapper;
|
||||
|
||||
/** 注入打点Mapper。 */
|
||||
public FlowLogRepositoryService(FlowLogMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
/** 新增一条访问打点。 */
|
||||
public int insert(FlowLogEntity entity) {
|
||||
return mapper.insert(entity);
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** 新闻、案例和帮助统一内容持久化实体。 */
|
||||
@Data
|
||||
@@ -26,10 +25,10 @@ public class ContentEntity {
|
||||
/** 推荐标识。 */ private Integer featuredFlag;
|
||||
/** 排序值。 */ private Integer sortNo;
|
||||
/** 发布状态。 */ private String status;
|
||||
/** 发布时间。 */ private LocalDateTime publishTime;
|
||||
/** 下线时间。 */ private LocalDateTime offlineTime;
|
||||
/** 发布时间毫秒时间戳。 */ private Long publishTime;
|
||||
/** 下线时间毫秒时间戳。 */ private Long offlineTime;
|
||||
/** 浏览次数。 */ private Long viewCount;
|
||||
/** 逻辑删除状态。 */ private Integer deleted;
|
||||
/** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 更新时间。 */ private LocalDateTime updateTime;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+2
-2
@@ -51,8 +51,8 @@ public class ContentRepositoryService {
|
||||
.eq(ContentEntity::getDeleted, 0));
|
||||
}
|
||||
/** 按业务编号更新内容发布状态。 */
|
||||
public int updateStatus(String siteCode, String contentCode, String status, java.time.LocalDateTime publishTime,
|
||||
java.time.LocalDateTime offlineTime) {
|
||||
public int updateStatus(String siteCode, String contentCode, String status, Long publishTime,
|
||||
Long offlineTime) {
|
||||
return mapper.update(null, Wrappers.<ContentEntity>lambdaUpdate().set(ContentEntity::getStatus, status)
|
||||
.set(ContentEntity::getPublishTime, publishTime).set(ContentEntity::getOfflineTime, offlineTime)
|
||||
.eq(ContentEntity::getSiteCode, siteCode).eq(ContentEntity::getContentCode, contentCode)
|
||||
|
||||
+3
-3
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** 前台站自定义代码持久化实体。 */
|
||||
@Data
|
||||
@@ -20,6 +19,7 @@ public class SiteCustomCodeEntity {
|
||||
/** 注入位置:HEAD顶部,BODY_START正文顶部,BODY_END正文底部。 */ private String position;
|
||||
/** 是否启用:0停用,1启用。 */ private Integer enabled;
|
||||
/** 排序号。 */ private Integer sortNo;
|
||||
/** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 更新时间。 */ private LocalDateTime updateTime;
|
||||
/** 逻辑删除状态:0未删除,1已删除。 */ private Integer deleted;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+3
-4
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** 前台站页面装修持久化实体。 */
|
||||
@Data
|
||||
@@ -19,7 +18,7 @@ public class SiteDecorationEntity {
|
||||
/** 已发布版本号。 */ private Integer publishedVersion;
|
||||
/** 装修状态:DRAFT草稿,PUBLISHED已发布。 */ private String status;
|
||||
/** 逻辑删除状态:0未删除,1已删除。 */ private Integer deleted;
|
||||
/** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 更新时间。 */ private LocalDateTime updateTime;
|
||||
/** 最近发布时间。 */ private LocalDateTime publishTime;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
/** 最近发布毫秒时间戳。 */ private Long publishTime;
|
||||
}
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package com.shoplix.modules.inquiry.repository.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data;
|
||||
/** 询盘操作日志持久化实体。 */ @Data @TableName("inquiry_operation_log")
|
||||
public class InquiryOperationLogEntity {
|
||||
/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 日志业务编号。 */ private String logCode;
|
||||
/** 站点业务编号。 */ private String siteCode; /** 询盘业务编号。 */ private String inquiryCode; /** 操作用户编号。 */ private String operatorUserCode;
|
||||
/** 操作类型。 */ private String operationType; /** 操作前状态。 */ private String beforeStatus; /** 操作后状态。 */ private String afterStatus;
|
||||
/** 操作说明。 */ private String operationContent; /** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 操作说明。 */ private String operationContent; /** 逻辑删除状态。 */ private Integer deleted; /** 创建毫秒时间戳。 */ private Long createTime; /** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
package com.shoplix.modules.inquiry.repository.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data;
|
||||
/** 客户原始询盘持久化实体。 */ @Data @TableName("inquiry_record")
|
||||
public class InquiryRecordEntity {
|
||||
/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 询盘业务编号。 */ private String inquiryCode;
|
||||
@@ -16,9 +16,9 @@ public class InquiryRecordEntity {
|
||||
/** UTM来源。 */ private String utmSource; /** UTM媒介。 */ private String utmMedium; /** UTM活动。 */ private String utmCampaign;
|
||||
/** UTM内容。 */ private String utmContent; /** UTM关键词。 */ private String utmTerm; /** 来源地址。 */ private String referrerUrl;
|
||||
/** 落地地址。 */ private String landingUrl; /** 客户访问IP地址。 */ private String clientIp; /** IP摘要。 */ private String ipHash; /** 浏览器标识。 */ private String userAgent;
|
||||
/** 设备类型。 */ private String deviceType; /** 隐私授权标识。 */ private Integer privacyConsentFlag; /** 隐私授权时间。 */ private LocalDateTime privacyConsentTime;
|
||||
/** 设备类型。 */ private String deviceType; /** 隐私授权标识。 */ private Integer privacyConsentFlag; /** 隐私授权毫秒时间戳。 */ private Long privacyConsentTime;
|
||||
/** 重复标识。 */ private Integer duplicateFlag; /** 垃圾标识。 */ private Integer spamFlag; /** 垃圾原因。 */ private String spamReason;
|
||||
/** 首次跟进时间。 */ private LocalDateTime firstFollowTime; /** 最近跟进时间。 */ private LocalDateTime lastFollowTime;
|
||||
/** 下次跟进时间。 */ private LocalDateTime nextFollowTime; /** 关闭时间。 */ private LocalDateTime closeTime;
|
||||
/** 逻辑删除状态。 */ private Integer deleted; /** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 首次跟进毫秒时间戳。 */ private Long firstFollowTime; /** 最近跟进毫秒时间戳。 */ private Long lastFollowTime;
|
||||
/** 下次跟进毫秒时间戳。 */ private Long nextFollowTime; /** 关闭毫秒时间戳。 */ private Long closeTime;
|
||||
/** 逻辑删除状态。 */ private Integer deleted; /** 创建毫秒时间戳。 */ private Long createTime;
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
package com.shoplix.modules.inquiry.repository.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.time.LocalDateTime;
|
||||
/** 邮件任务持久化实体。 */ @Data @TableName("mail_task") public class MailTaskEntity {/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 任务业务编号。 */ private String taskCode; /** 站点业务编号。 */ private String siteCode; /** 业务类型。 */ private String businessType; /** 业务编号。 */ private String businessCode; /** 邮件类型。 */ private String mailType; /** 收件邮箱。 */ private String recipient; /** 邮件主题。 */ private String subject; /** 邮件正文。 */ private String content; /** 任务状态。 */ private String status; /** 重试次数。 */ private Integer retryCount; /** 下次重试时间。 */ private LocalDateTime nextRetryTime; /** 最近错误。 */ private String lastError; /** 发送时间。 */ private LocalDateTime sendTime; /** 逻辑删除状态。 */ private Integer deleted;}
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data;
|
||||
/** 邮件任务持久化实体。 */ @Data @TableName("mail_task") public class MailTaskEntity {/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 任务业务编号。 */ private String taskCode; /** 站点业务编号。 */ private String siteCode; /** 业务类型。 */ private String businessType; /** 业务编号。 */ private String businessCode; /** 邮件类型。 */ private String mailType; /** 收件邮箱。 */ private String recipient; /** 邮件主题。 */ private String subject; /** 邮件正文。 */ private String content; /** 任务状态。 */ private String status; /** 重试次数。 */ private Integer retryCount; /** 下次重试毫秒时间戳。 */ private Long nextRetryTime; /** 最近错误。 */ private String lastError; /** 发送毫秒时间戳。 */ private Long sendTime; /** 逻辑删除状态。 */ private Integer deleted;}
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
package com.shoplix.modules.inquiry.repository.service;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.shoplix.modules.inquiry.repository.entity.InquiryRecordEntity; import com.shoplix.modules.inquiry.repository.mapper.InquiryRecordMapper; import org.springframework.stereotype.Service; import java.time.LocalDateTime; import java.util.*;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.shoplix.modules.inquiry.repository.entity.InquiryRecordEntity; import com.shoplix.modules.inquiry.repository.mapper.InquiryRecordMapper; import org.springframework.stereotype.Service; import java.util.*;
|
||||
/** 询盘记录单表数据源服务。 */ @Service
|
||||
public class InquiryRecordRepositoryService {
|
||||
private final InquiryRecordMapper mapper; /** 注入Mapper。 */ public InquiryRecordRepositoryService(InquiryRecordMapper mapper){this.mapper=mapper;}
|
||||
@@ -7,6 +7,6 @@ public class InquiryRecordRepositoryService {
|
||||
/** 查询后台询盘列表。 */ public List<InquiryRecordEntity> list(String site,String status){var q=Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site);if(status!=null&&!status.isBlank())q.eq(InquiryRecordEntity::getStatus,status);return mapper.selectList(q.orderByDesc(InquiryRecordEntity::getCreateTime).last("LIMIT 500"));}
|
||||
/** 按编号查询询盘。 */ public Optional<InquiryRecordEntity> find(String site,String code){return Optional.ofNullable(mapper.selectOne(Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site).eq(InquiryRecordEntity::getInquiryCode,code)));}
|
||||
/** 更新可变处理字段。 */ public int update(InquiryRecordEntity e){return mapper.update(e,Wrappers.<InquiryRecordEntity>lambdaUpdate().eq(InquiryRecordEntity::getSiteCode,e.getSiteCode()).eq(InquiryRecordEntity::getInquiryCode,e.getInquiryCode()));}
|
||||
/** 统计IP时间窗口提交数。 */ public long countIp(String site,String hash,LocalDateTime start){return mapper.selectCount(Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site).eq(InquiryRecordEntity::getIpHash,hash).ge(InquiryRecordEntity::getCreateTime,start));}
|
||||
/** 统计邮箱时间窗口提交数。 */ public long countEmail(String site,String hash,LocalDateTime start){return mapper.selectCount(Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site).eq(InquiryRecordEntity::getEmailHash,hash).ge(InquiryRecordEntity::getCreateTime,start));}
|
||||
/** 统计IP时间窗口提交数。 */ public long countIp(String site,String hash,Long start){return mapper.selectCount(Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site).eq(InquiryRecordEntity::getIpHash,hash).ge(InquiryRecordEntity::getCreateTime,start));}
|
||||
/** 统计邮箱时间窗口提交数。 */ public long countEmail(String site,String hash,Long start){return mapper.selectCount(Wrappers.<InquiryRecordEntity>lambdaQuery().eq(InquiryRecordEntity::getSiteCode,site).eq(InquiryRecordEntity::getEmailHash,hash).ge(InquiryRecordEntity::getCreateTime,start));}
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
package com.shoplix.modules.media.repository.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.time.LocalDateTime;
|
||||
/** 站点媒体资源持久化实体。 */ @Data @TableName("media_asset") public class MediaAssetEntity {/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 媒体业务编号。 */ private String mediaCode; /** 站点业务编号。 */ private String siteCode; /** 媒体类型。 */ private String mediaType; /** 原始文件名。 */ private String originalFileName; /** 存储文件名。 */ private String storageFileName; /** 相对访问地址。 */ private String relativeUrl; /** MIME类型。 */ private String mimeType; /** 文件扩展名。 */ private String fileExtension; /** 文件字节数。 */ private Long fileSize; /** 图片英文替代文本。 */ private String altText; /** 状态。 */ private String status; /** 逻辑删除状态。 */ private Integer deleted; /** 创建时间。 */ private LocalDateTime createTime;}
|
||||
import com.baomidou.mybatisplus.annotation.*; import lombok.Data;
|
||||
/** 站点媒体资源持久化实体。 */ @Data @TableName("media_asset") public class MediaAssetEntity {/** 数据库内部主键。 */ @TableId(type=IdType.AUTO) private Long id; /** 媒体业务编号。 */ private String mediaCode; /** 站点业务编号。 */ private String siteCode; /** 媒体类型。 */ private String mediaType; /** 原始文件名。 */ private String originalFileName; /** 存储文件名。 */ private String storageFileName; /** 相对访问地址。 */ private String relativeUrl; /** MIME类型。 */ private String mimeType; /** 文件扩展名。 */ private String fileExtension; /** 文件字节数。 */ private Long fileSize; /** 图片英文替代文本。 */ private String altText; /** 状态。 */ private String status; /** 逻辑删除状态。 */ private Integer deleted; /** 创建毫秒时间戳。 */ private Long createTime;}
|
||||
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** 固定页面和自定义页面持久化实体。 */
|
||||
@Data
|
||||
@@ -23,10 +22,10 @@ public class PageEntity {
|
||||
/** 封面媒体业务编号。 */ private String coverMediaCode;
|
||||
/** 排序值。 */ private Integer sortNo;
|
||||
/** 发布状态。 */ private String status;
|
||||
/** 发布时间。 */ private LocalDateTime publishTime;
|
||||
/** 下线时间。 */ private LocalDateTime offlineTime;
|
||||
/** 发布时间毫秒时间戳。 */ private Long publishTime;
|
||||
/** 下线时间毫秒时间戳。 */ private Long offlineTime;
|
||||
/** 已发布版本号。 */ private Integer publishedVersion;
|
||||
/** 逻辑删除状态。 */ private Integer deleted;
|
||||
/** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 更新时间。 */ private LocalDateTime updateTime;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+8
@@ -35,6 +35,14 @@ public class PageRepositoryService {
|
||||
.orderByAsc(PageEntity::getSortNo).orderByDesc(PageEntity::getUpdateTime));
|
||||
}
|
||||
|
||||
/** 查询站点全部已发布固定页面和自定义页面。 */
|
||||
public List<PageEntity> listPublished(String siteCode) {
|
||||
return mapper.selectList(Wrappers.<PageEntity>lambdaQuery()
|
||||
.eq(PageEntity::getSiteCode, siteCode)
|
||||
.eq(PageEntity::getStatus, "PUBLISHED")
|
||||
.orderByAsc(PageEntity::getSortNo));
|
||||
}
|
||||
|
||||
/** 新增页面。 */ public int insert(PageEntity entity) { return mapper.insert(entity); }
|
||||
/** 按页面业务编号更新页面。 */
|
||||
public int updateByCode(PageEntity entity) {
|
||||
|
||||
+4
-5
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** B2B 产品持久化实体。 */
|
||||
@Data
|
||||
@@ -25,9 +24,9 @@ public class ProductEntity {
|
||||
/** 询盘启用标识。 */ private Integer inquiryEnabled;
|
||||
/** 排序值。 */ private Integer sortNo;
|
||||
/** 发布状态。 */ private String status;
|
||||
/** 发布时间。 */ private LocalDateTime publishTime;
|
||||
/** 下线时间。 */ private LocalDateTime offlineTime;
|
||||
/** 发布时间毫秒时间戳。 */ private Long publishTime;
|
||||
/** 下线时间毫秒时间戳。 */ private Long offlineTime;
|
||||
/** 逻辑删除状态。 */ private Integer deleted;
|
||||
/** 创建时间。 */ private LocalDateTime createTime;
|
||||
/** 更新时间。 */ private LocalDateTime updateTime;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+2
-2
@@ -51,8 +51,8 @@ public class ProductRepositoryService {
|
||||
.eq(ProductEntity::getDeleted, 0));
|
||||
}
|
||||
/** 按业务编号更新产品发布状态。 */
|
||||
public int updateStatus(String siteCode, String productCode, String status, java.time.LocalDateTime publishTime,
|
||||
java.time.LocalDateTime offlineTime) {
|
||||
public int updateStatus(String siteCode, String productCode, String status, Long publishTime,
|
||||
Long offlineTime) {
|
||||
return mapper.update(null, Wrappers.<ProductEntity>lambdaUpdate().set(ProductEntity::getStatus, status)
|
||||
.set(ProductEntity::getPublishTime, publishTime).set(ProductEntity::getOfflineTime, offlineTime)
|
||||
.eq(ProductEntity::getSiteCode, siteCode).eq(ProductEntity::getProductCode, productCode)
|
||||
|
||||
+8
@@ -7,6 +7,7 @@ import com.shoplix.modules.seo.repository.mapper.SeoMetadataMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.List;
|
||||
|
||||
/** 封装 SEO 元数据单表读写。 */
|
||||
@Service
|
||||
@@ -36,6 +37,13 @@ public class SeoMetadataRepositoryService {
|
||||
.last("LIMIT 1")));
|
||||
}
|
||||
|
||||
/** 查询站点全部已发布 SEO 配置,用于生成站点地图。 */
|
||||
public List<SeoMetadataEntity> listPublished(String siteCode) {
|
||||
return mapper.selectList(Wrappers.<SeoMetadataEntity>lambdaQuery()
|
||||
.eq(SeoMetadataEntity::getSiteCode, siteCode)
|
||||
.eq(SeoMetadataEntity::getStatus, SeoPublishStatusEnum.PUBLISHED.name()));
|
||||
}
|
||||
|
||||
/** 新增 SEO 配置并返回影响行数。 */
|
||||
public int insert(SeoMetadataEntity entity) { return mapper.insert(entity); }
|
||||
|
||||
|
||||
Reference in new issue
Block a user