修复bug

This commit is contained in:
menxipeng
2025-09-21 17:49:23 +08:00
parent 142c00bc9e
commit 0b75730d37
23 changed files with 1320 additions and 18 deletions

View File

@@ -0,0 +1,62 @@
package com.ruoyi.common.core.domain.entity;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 应用版本更新信息对象 app_version
*
* @author ruoyi
* @date 2025-09-21
*/
@Data
public class AppVersion extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 版本代码(整数) */
@Excel(name = "版本代码", readConverterExp = "整=数")
private Integer versionCode;
/** 版本名称1.2.0 */
@Excel(name = "版本名称", readConverterExp = "如=1.2.0")
private String versionName;
/** 是否强制更新0-否1-是 */
@Excel(name = "是否强制更新0-否1-是")
private Integer isForce;
/** 渠道标识yingyongbao, honor, xiaomi */
@Excel(name = "渠道标识", readConverterExp = "如=yingyongbao,,h=onor,,x=iaomi")
private String channel;
/** APK下载地址 */
@Excel(name = "APK下载地址")
private String downloadUrl;
/** 更新日志 */
@Excel(name = "更新日志")
private String updateLog;
/** 安装包大小15.2MB */
@Excel(name = "安装包大小", readConverterExp = "如=15.2MB")
private String size;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
}

View File

@@ -0,0 +1,139 @@
package com.ruoyi.common.core.domain.entity;
/**
* 应用渠道枚举
*/
public enum ChannelEnum {
/**
* 官方渠道
*/
OFFICIAL("official", "官方渠道"),
/**
* 小米应用商店
*/
XIAOMI("xiaomi", "小米应用商店"),
/**
* 华为应用市场
*/
HUAWEI("huawei", "华为应用市场"),
/**
* OPPO应用商店
*/
OPPO("oppo", "OPPO应用商店"),
/**
* vivo应用商店
*/
VIVO("vivo", "vivo应用商店"),
/**
* 魅族应用商店
*/
MEIZU("meizu", "魅族应用商店"),
/**
* 荣耀应用市场
*/
HONOR("honor", "荣耀应用市场"),
/**
* 应用宝
*/
YINGYONGBAO("yingyongbao", "应用宝"),
/**
* iOS App Store
*/
IOS("ios", "iOS App Store");
/**
* 渠道编码
*/
private final String code;
/**
* 渠道描述
*/
private final String description;
ChannelEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
/**
* 根据渠道编码获取枚举
*
* @param code 渠道编码
* @return 对应的枚举如果找不到返回null
*/
public static ChannelEnum getByCode(String code) {
if (code == null || code.trim().isEmpty()) {
return null;
}
for (ChannelEnum channel : values()) {
if (channel.code.equalsIgnoreCase(code.trim())) {
return channel;
}
}
return null;
}
/**
* 检查渠道编码是否存在
*
* @param code 渠道编码
* @return 是否存在
*/
public static boolean contains(String code) {
return getByCode(code) != null;
}
/**
* 获取所有渠道编码数组
*
* @return 渠道编码数组
*/
public static String[] getAllCodes() {
ChannelEnum[] values = values();
String[] codes = new String[values.length];
for (int i = 0; i < values.length; i++) {
codes[i] = values[i].code;
}
return codes;
}
/**
* 获取所有渠道描述数组
*
* @return 渠道描述数组
*/
public static String[] getAllDescriptions() {
ChannelEnum[] values = values();
String[] descriptions = new String[values.length];
for (int i = 0; i < values.length; i++) {
descriptions[i] = values[i].description;
}
return descriptions;
}
@Override
public String toString() {
return "ChannelEnum{" +
"code='" + code + '\'' +
", description='" + description + '\'' +
'}';
}
}

View File

@@ -51,6 +51,12 @@ public class Notifications extends BaseEntity
@Excel(name = "计划发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date sendTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date findStart;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date findEnd;
private List<ShopUser> shopUsers;
}