feat(client): 实现自定义开屏图片功能
- 在 ClientAccount 实体中新增 splashImage 字段用于存储开屏图片URL - 在 ClientAccountController 中添加上传、获取和删除开屏图片的接口 - 集成七牛云存储实现图片上传功能,支持图片格式和大小校验 - 使用 Redis 缓存开屏图片URL,提升访问性能 - 在客户端登录成功后异步加载并保存开屏图片配置 - 新增 splashApi 模块封装开屏图片相关HTTP请求- 在主进程中实现开屏图片配置的持久化存储和读取 - 在设置页面中增加开屏图片管理界面,支持上传、预览和删除操作 - 修改 splash.html 支持动态加载自定义开屏图片 - 调整 CSP 策略允许加载本地和HTTPS图片资源
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
@@ -9,7 +8,6 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
*/
|
||||
public class BanmaAccount extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
/** 显示名 */
|
||||
private String name;
|
||||
|
||||
@@ -55,6 +55,9 @@ public class ClientAccount extends BaseEntity
|
||||
@Excel(name = "账号类型")
|
||||
private String accountType; // trial试用, paid付费
|
||||
|
||||
/** 开屏图片URL */
|
||||
private String splashImage;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@@ -161,4 +164,14 @@ public class ClientAccount extends BaseEntity
|
||||
{
|
||||
return accountType;
|
||||
}
|
||||
|
||||
public void setSplashImage(String splashImage)
|
||||
{
|
||||
this.splashImage = splashImage;
|
||||
}
|
||||
|
||||
public String getSplashImage()
|
||||
{
|
||||
return splashImage;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="permissions" column="permissions" />
|
||||
<result property="deviceLimit" column="device_limit" />
|
||||
<result property="accountType" column="account_type" />
|
||||
<result property="splashImage" column="splash_image" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectClientAccountVo">
|
||||
select id, account_name, username, password, status, expire_time,
|
||||
allowed_ip_range, remark, permissions, device_limit, account_type, create_by, create_time, update_by, update_time
|
||||
allowed_ip_range, remark, permissions, device_limit, account_type, splash_image, create_by, create_time, update_by, update_time
|
||||
from client_account
|
||||
</sql>
|
||||
|
||||
@@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="permissions != null">permissions,</if>
|
||||
<if test="deviceLimit != null">device_limit,</if>
|
||||
<if test="accountType != null">account_type,</if>
|
||||
<if test="splashImage != null">splash_image,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time
|
||||
</trim>
|
||||
@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="permissions != null">#{permissions},</if>
|
||||
<if test="deviceLimit != null">#{deviceLimit},</if>
|
||||
<if test="accountType != null">#{accountType},</if>
|
||||
<if test="splashImage != null">#{splashImage},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
sysdate()
|
||||
</trim>
|
||||
@@ -93,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="permissions != null">permissions = #{permissions},</if>
|
||||
<if test="deviceLimit != null">device_limit = #{deviceLimit},</if>
|
||||
<if test="accountType != null">account_type = #{accountType},</if>
|
||||
<if test="splashImage != null">splash_image = #{splashImage},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</trim>
|
||||
|
||||
Reference in New Issue
Block a user