增加大屏后端;增加图片管理
This commit is contained in:
@ -0,0 +1,139 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 可视化对象 blade_visual
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public class BladeVisual extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 大屏标题 */
|
||||
@Excel(name = "大屏标题")
|
||||
private String title;
|
||||
|
||||
/** 预览图地址 */
|
||||
@Excel(name = "预览图地址")
|
||||
private String backgroundUrl;
|
||||
|
||||
/** 大屏类型 */
|
||||
@Excel(name = "大屏类型")
|
||||
private Long category;
|
||||
|
||||
/** 发布密码 */
|
||||
@Excel(name = "发布密码")
|
||||
private String password;
|
||||
|
||||
/** 鍒涘缓閮ㄩ棬 */
|
||||
@Excel(name = "鍒涘缓閮ㄩ棬")
|
||||
private Long createDept;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
|
||||
/** 鏄惁宸插垹闄? */
|
||||
@Excel(name = "鏄惁宸插垹闄?")
|
||||
private Long isdeleted;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setBackgroundUrl(String backgroundUrl)
|
||||
{
|
||||
this.backgroundUrl = backgroundUrl;
|
||||
}
|
||||
|
||||
public String getBackgroundUrl()
|
||||
{
|
||||
return backgroundUrl;
|
||||
}
|
||||
public void setCategory(Long category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Long getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
public void setCreateDept(Long createDept)
|
||||
{
|
||||
this.createDept = createDept;
|
||||
}
|
||||
|
||||
public Long getCreateDept()
|
||||
{
|
||||
return createDept;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setIsdeleted(Long isdeleted)
|
||||
{
|
||||
this.isdeleted = isdeleted;
|
||||
}
|
||||
|
||||
public Long getIsdeleted()
|
||||
{
|
||||
return isdeleted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("title", getTitle())
|
||||
.append("backgroundUrl", getBackgroundUrl())
|
||||
.append("category", getCategory())
|
||||
.append("password", getPassword())
|
||||
.append("createDept", getCreateDept())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.append("isdeleted", getIsdeleted())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 可视化分类对象 blade_visual_category
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public class BladeVisualCategory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 鍒嗙被閿€? */
|
||||
@Excel(name = "鍒嗙被閿€?")
|
||||
private String categoryKey;
|
||||
|
||||
/** 鍒嗙被鍚嶇О */
|
||||
@Excel(name = "鍒嗙被鍚嶇О")
|
||||
private String categoryValue;
|
||||
|
||||
/** 鏄惁宸插垹闄? */
|
||||
@Excel(name = "鏄惁宸插垹闄?")
|
||||
private Long isDeleted;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCategoryKey(String categoryKey)
|
||||
{
|
||||
this.categoryKey = categoryKey;
|
||||
}
|
||||
|
||||
public String getCategoryKey()
|
||||
{
|
||||
return categoryKey;
|
||||
}
|
||||
public void setCategoryValue(String categoryValue)
|
||||
{
|
||||
this.categoryValue = categoryValue;
|
||||
}
|
||||
|
||||
public String getCategoryValue()
|
||||
{
|
||||
return categoryValue;
|
||||
}
|
||||
public void setIsDeleted(Long isDeleted)
|
||||
{
|
||||
this.isDeleted = isDeleted;
|
||||
}
|
||||
|
||||
public Long getIsDeleted()
|
||||
{
|
||||
return isDeleted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("categoryKey", getCategoryKey())
|
||||
.append("categoryValue", getCategoryValue())
|
||||
.append("isDeleted", getIsDeleted())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 可视化配置对象 blade_visual_config
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public class BladeVisualConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 鍙鍖栬〃涓婚敭 */
|
||||
@Excel(name = "鍙鍖栬〃涓婚敭")
|
||||
private Long visualId;
|
||||
|
||||
/** 配置json */
|
||||
@Excel(name = "配置json")
|
||||
private String detail;
|
||||
|
||||
/** 组件json */
|
||||
@Excel(name = "组件json")
|
||||
private String component;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setVisualId(Long visualId)
|
||||
{
|
||||
this.visualId = visualId;
|
||||
}
|
||||
|
||||
public Long getVisualId()
|
||||
{
|
||||
return visualId;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
public void setComponent(String component)
|
||||
{
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public String getComponent()
|
||||
{
|
||||
return component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("visualId", getVisualId())
|
||||
.append("detail", getDetail())
|
||||
.append("component", getComponent())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 可视化地图配置对象 blade_visual_map
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public class BladeVisualMap extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 地图名称 */
|
||||
@Excel(name = "地图名称")
|
||||
private String name;
|
||||
|
||||
/** 地图数据 */
|
||||
@Excel(name = "地图数据")
|
||||
private String data;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setData(String data)
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("data", getData())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* 图片管理。管理上传的图片对象 visual_image
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-28
|
||||
*/
|
||||
public class VisualImage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 原始文件名 */
|
||||
@Excel(name = "原始文件名")
|
||||
private String originName;
|
||||
|
||||
/** 新生成的文件名 */
|
||||
@Excel(name = "新生成的文件名")
|
||||
private String newName;
|
||||
|
||||
/** 沿宽度切割的个数 */
|
||||
@Excel(name = "沿宽度切割的个数")
|
||||
@Min(value = 1)
|
||||
private Integer width;
|
||||
|
||||
/** 沿高度切割的个数 */
|
||||
@Excel(name = "沿高度切割的个数")
|
||||
@Min(value = 1)
|
||||
private Integer height;
|
||||
|
||||
/** 描述信息 */
|
||||
@Excel(name = "描述信息")
|
||||
private String descri;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOriginName(String originName)
|
||||
{
|
||||
this.originName = originName;
|
||||
}
|
||||
|
||||
public String getOriginName()
|
||||
{
|
||||
return originName;
|
||||
}
|
||||
public void setNewName(String newName)
|
||||
{
|
||||
this.newName = newName;
|
||||
}
|
||||
|
||||
public String getNewName()
|
||||
{
|
||||
return newName;
|
||||
}
|
||||
public void setWidth(Integer width)
|
||||
{
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public Integer getWidth()
|
||||
{
|
||||
return width;
|
||||
}
|
||||
public void setHeight(Integer height)
|
||||
{
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public Integer getHeight()
|
||||
{
|
||||
return height;
|
||||
}
|
||||
|
||||
public String getDescri() {
|
||||
return descri;
|
||||
}
|
||||
|
||||
public void setDescri(String descri) {
|
||||
this.descri = descri;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("originName", getOriginName())
|
||||
.append("newName", getNewName())
|
||||
.append("width", getWidth())
|
||||
.append("height", getHeight())
|
||||
.append("descri", getDescri())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
public class BladeImageVo {
|
||||
String domain;
|
||||
|
||||
String link;
|
||||
|
||||
String name;
|
||||
|
||||
String originalName;
|
||||
|
||||
public BladeImageVo() {
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOriginalName() {
|
||||
return originalName;
|
||||
}
|
||||
|
||||
public void setOriginalName(String originalName) {
|
||||
this.originalName = originalName;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.ruoyi.system.domain.BladeVisual;
|
||||
import com.ruoyi.system.domain.BladeVisualConfig;
|
||||
|
||||
public class BladeVisualVo {
|
||||
private BladeVisualConfig config;
|
||||
|
||||
private BladeVisual visual;
|
||||
|
||||
public BladeVisualVo() {
|
||||
}
|
||||
|
||||
public BladeVisualConfig getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfig(BladeVisualConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public BladeVisual getVisual() {
|
||||
return visual;
|
||||
}
|
||||
|
||||
public void setVisual(BladeVisual visual) {
|
||||
this.visual = visual;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BladeVisualVo{" +
|
||||
"config=" + config +
|
||||
", visual=" + visual +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualCategory;
|
||||
|
||||
/**
|
||||
* 可视化分类Mapper接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface BladeVisualCategoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询可视化分类
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 可视化分类
|
||||
*/
|
||||
public BladeVisualCategory selectBladeVisualCategoryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化分类列表
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 可视化分类集合
|
||||
*/
|
||||
public List<BladeVisualCategory> selectBladeVisualCategoryList(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 新增可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualCategory(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 修改可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualCategory(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 删除可视化分类
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualCategoryById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除可视化分类
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualCategoryByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualConfig;
|
||||
|
||||
/**
|
||||
* 可视化配置Mapper接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface BladeVisualConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询可视化配置
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 可视化配置
|
||||
*/
|
||||
public BladeVisualConfig selectBladeVisualConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化配置列表
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 可视化配置集合
|
||||
*/
|
||||
public List<BladeVisualConfig> selectBladeVisualConfigList(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 新增可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualConfig(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 修改可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualConfig(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 删除可视化配置
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除可视化配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualConfigByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualMap;
|
||||
|
||||
/**
|
||||
* 可视化地图配置Mapper接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface BladeVisualMapMapper
|
||||
{
|
||||
/**
|
||||
* 查询可视化地图配置
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 可视化地图配置
|
||||
*/
|
||||
public BladeVisualMap selectBladeVisualMapById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化地图配置列表
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 可视化地图配置集合
|
||||
*/
|
||||
public List<BladeVisualMap> selectBladeVisualMapList(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 新增可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualMap(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 修改可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualMap(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 删除可视化地图配置
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualMapById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除可视化地图配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualMapByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisual;
|
||||
|
||||
/**
|
||||
* 可视化Mapper接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface BladeVisualMapper
|
||||
{
|
||||
/**
|
||||
* 查询可视化
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 可视化
|
||||
*/
|
||||
public BladeVisual selectBladeVisualById(Long id);
|
||||
|
||||
/**
|
||||
* 通过分类查找大屏
|
||||
* @param category 分类
|
||||
* @return 大屏列表
|
||||
*/
|
||||
List<BladeVisual> selectVisualByCategory(Long category);
|
||||
|
||||
/**
|
||||
* 查询可视化列表
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 可视化集合
|
||||
*/
|
||||
public List<BladeVisual> selectBladeVisualList(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 新增可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisual(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 修改可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisual(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 删除可视化
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除可视化
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualByIds(Long[] ids);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.VisualImage;
|
||||
|
||||
/**
|
||||
* 图片管理。管理上传的图片Mapper接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-28
|
||||
*/
|
||||
public interface VisualImageMapper
|
||||
{
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 图片管理。管理上传的图片
|
||||
*/
|
||||
public VisualImage selectVisualImageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片列表
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 图片管理。管理上传的图片集合
|
||||
*/
|
||||
public List<VisualImage> selectVisualImageList(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 新增图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertVisualImage(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 修改图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateVisualImage(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 删除图片管理。管理上传的图片
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVisualImageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除图片管理。管理上传的图片
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVisualImageByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualCategory;
|
||||
|
||||
/**
|
||||
* 可视化分类Service接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface IBladeVisualCategoryService
|
||||
{
|
||||
/**
|
||||
* 查询可视化分类
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 可视化分类
|
||||
*/
|
||||
public BladeVisualCategory selectBladeVisualCategoryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化分类列表
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 可视化分类集合
|
||||
*/
|
||||
public List<BladeVisualCategory> selectBladeVisualCategoryList(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 新增可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualCategory(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 修改可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualCategory(BladeVisualCategory bladeVisualCategory);
|
||||
|
||||
/**
|
||||
* 批量删除可视化分类
|
||||
*
|
||||
* @param ids 需要删除的可视化分类主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualCategoryByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除可视化分类信息
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualCategoryById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualConfig;
|
||||
|
||||
/**
|
||||
* 可视化配置Service接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface IBladeVisualConfigService
|
||||
{
|
||||
/**
|
||||
* 查询可视化配置
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 可视化配置
|
||||
*/
|
||||
public BladeVisualConfig selectBladeVisualConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化配置列表
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 可视化配置集合
|
||||
*/
|
||||
public List<BladeVisualConfig> selectBladeVisualConfigList(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 新增可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualConfig(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 修改可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualConfig(BladeVisualConfig bladeVisualConfig);
|
||||
|
||||
/**
|
||||
* 批量删除可视化配置
|
||||
*
|
||||
* @param ids 需要删除的可视化配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除可视化配置信息
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualConfigById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BladeVisualMap;
|
||||
|
||||
/**
|
||||
* 可视化地图配置Service接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface IBladeVisualMapService
|
||||
{
|
||||
/**
|
||||
* 查询可视化地图配置
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 可视化地图配置
|
||||
*/
|
||||
public BladeVisualMap selectBladeVisualMapById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化地图配置列表
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 可视化地图配置集合
|
||||
*/
|
||||
public List<BladeVisualMap> selectBladeVisualMapList(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 新增可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBladeVisualMap(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 修改可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisualMap(BladeVisualMap bladeVisualMap);
|
||||
|
||||
/**
|
||||
* 批量删除可视化地图配置
|
||||
*
|
||||
* @param ids 需要删除的可视化地图配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualMapByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除可视化地图配置信息
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualMapById(Long id);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.page.VisualRespEmbData;
|
||||
import com.ruoyi.system.domain.BladeVisual;
|
||||
import com.ruoyi.system.domain.vo.BladeVisualVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 可视化Service接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
public interface IBladeVisualService
|
||||
{
|
||||
/**
|
||||
* 查询可视化
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 可视化
|
||||
*/
|
||||
public BladeVisualVo selectBladeVisualById(Long id);
|
||||
|
||||
/**
|
||||
* 查询可视化列表
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 可视化集合
|
||||
*/
|
||||
public List<BladeVisual> selectBladeVisualList(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 新增可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertBladeVisual(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 修改可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBladeVisual(BladeVisual bladeVisual);
|
||||
|
||||
/**
|
||||
* 批量删除可视化
|
||||
*
|
||||
* @param ids 需要删除的可视化主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除可视化信息
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBladeVisualById(Long id);
|
||||
|
||||
List<BladeVisual> selectVisualListByCategory(Long category);
|
||||
|
||||
VisualRespEmbData uploadFile(MultipartFile file);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.VisualImage;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 图片管理。管理上传的图片Service接口
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-28
|
||||
*/
|
||||
public interface IVisualImageService
|
||||
{
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 图片管理。管理上传的图片
|
||||
*/
|
||||
public VisualImage selectVisualImageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片列表
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 图片管理。管理上传的图片集合
|
||||
*/
|
||||
public List<VisualImage> selectVisualImageList(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 新增图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertVisualImage(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 修改图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateVisualImage(VisualImage visualImage);
|
||||
|
||||
/**
|
||||
* 批量删除图片管理。管理上传的图片
|
||||
*
|
||||
* @param ids 需要删除的图片管理。管理上传的图片主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVisualImageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除图片管理。管理上传的图片信息
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVisualImageById(Long id);
|
||||
|
||||
int addImage(MultipartFile file, Integer heigth, Integer width);
|
||||
|
||||
String saveImageToLocal(MultipartFile file);
|
||||
|
||||
int divideImage(VisualImage visualImage);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BladeVisualCategoryMapper;
|
||||
import com.ruoyi.system.domain.BladeVisualCategory;
|
||||
import com.ruoyi.system.service.IBladeVisualCategoryService;
|
||||
|
||||
/**
|
||||
* 可视化分类Service业务层处理
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
@Service
|
||||
public class BladeVisualCategoryServiceImpl implements IBladeVisualCategoryService
|
||||
{
|
||||
@Autowired
|
||||
private BladeVisualCategoryMapper bladeVisualCategoryMapper;
|
||||
|
||||
/**
|
||||
* 查询可视化分类
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 可视化分类
|
||||
*/
|
||||
@Override
|
||||
public BladeVisualCategory selectBladeVisualCategoryById(Long id)
|
||||
{
|
||||
return bladeVisualCategoryMapper.selectBladeVisualCategoryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可视化分类列表
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 可视化分类
|
||||
*/
|
||||
@Override
|
||||
public List<BladeVisualCategory> selectBladeVisualCategoryList(BladeVisualCategory bladeVisualCategory)
|
||||
{
|
||||
return bladeVisualCategoryMapper.selectBladeVisualCategoryList(bladeVisualCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBladeVisualCategory(BladeVisualCategory bladeVisualCategory)
|
||||
{
|
||||
return bladeVisualCategoryMapper.insertBladeVisualCategory(bladeVisualCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可视化分类
|
||||
*
|
||||
* @param bladeVisualCategory 可视化分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBladeVisualCategory(BladeVisualCategory bladeVisualCategory)
|
||||
{
|
||||
return bladeVisualCategoryMapper.updateBladeVisualCategory(bladeVisualCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可视化分类
|
||||
*
|
||||
* @param ids 需要删除的可视化分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualCategoryByIds(Long[] ids)
|
||||
{
|
||||
return bladeVisualCategoryMapper.deleteBladeVisualCategoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可视化分类信息
|
||||
*
|
||||
* @param id 可视化分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualCategoryById(Long id)
|
||||
{
|
||||
return bladeVisualCategoryMapper.deleteBladeVisualCategoryById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BladeVisualConfigMapper;
|
||||
import com.ruoyi.system.domain.BladeVisualConfig;
|
||||
import com.ruoyi.system.service.IBladeVisualConfigService;
|
||||
|
||||
/**
|
||||
* 可视化配置Service业务层处理
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
@Service
|
||||
public class BladeVisualConfigServiceImpl implements IBladeVisualConfigService
|
||||
{
|
||||
@Autowired
|
||||
private BladeVisualConfigMapper bladeVisualConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询可视化配置
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 可视化配置
|
||||
*/
|
||||
@Override
|
||||
public BladeVisualConfig selectBladeVisualConfigById(Long id)
|
||||
{
|
||||
return bladeVisualConfigMapper.selectBladeVisualConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可视化配置列表
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 可视化配置
|
||||
*/
|
||||
@Override
|
||||
public List<BladeVisualConfig> selectBladeVisualConfigList(BladeVisualConfig bladeVisualConfig)
|
||||
{
|
||||
return bladeVisualConfigMapper.selectBladeVisualConfigList(bladeVisualConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBladeVisualConfig(BladeVisualConfig bladeVisualConfig)
|
||||
{
|
||||
return bladeVisualConfigMapper.insertBladeVisualConfig(bladeVisualConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可视化配置
|
||||
*
|
||||
* @param bladeVisualConfig 可视化配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBladeVisualConfig(BladeVisualConfig bladeVisualConfig)
|
||||
{
|
||||
return bladeVisualConfigMapper.updateBladeVisualConfig(bladeVisualConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可视化配置
|
||||
*
|
||||
* @param ids 需要删除的可视化配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualConfigByIds(Long[] ids)
|
||||
{
|
||||
return bladeVisualConfigMapper.deleteBladeVisualConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可视化配置信息
|
||||
*
|
||||
* @param id 可视化配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualConfigById(Long id)
|
||||
{
|
||||
return bladeVisualConfigMapper.deleteBladeVisualConfigById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BladeVisualMapMapper;
|
||||
import com.ruoyi.system.domain.BladeVisualMap;
|
||||
import com.ruoyi.system.service.IBladeVisualMapService;
|
||||
|
||||
/**
|
||||
* 可视化地图配置Service业务层处理
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
@Service
|
||||
public class BladeVisualMapServiceImpl implements IBladeVisualMapService
|
||||
{
|
||||
@Autowired
|
||||
private BladeVisualMapMapper bladeVisualMapMapper;
|
||||
|
||||
/**
|
||||
* 查询可视化地图配置
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 可视化地图配置
|
||||
*/
|
||||
@Override
|
||||
public BladeVisualMap selectBladeVisualMapById(Long id)
|
||||
{
|
||||
return bladeVisualMapMapper.selectBladeVisualMapById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可视化地图配置列表
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 可视化地图配置
|
||||
*/
|
||||
@Override
|
||||
public List<BladeVisualMap> selectBladeVisualMapList(BladeVisualMap bladeVisualMap)
|
||||
{
|
||||
return bladeVisualMapMapper.selectBladeVisualMapList(bladeVisualMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBladeVisualMap(BladeVisualMap bladeVisualMap)
|
||||
{
|
||||
return bladeVisualMapMapper.insertBladeVisualMap(bladeVisualMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可视化地图配置
|
||||
*
|
||||
* @param bladeVisualMap 可视化地图配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBladeVisualMap(BladeVisualMap bladeVisualMap)
|
||||
{
|
||||
return bladeVisualMapMapper.updateBladeVisualMap(bladeVisualMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可视化地图配置
|
||||
*
|
||||
* @param ids 需要删除的可视化地图配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualMapByIds(Long[] ids)
|
||||
{
|
||||
return bladeVisualMapMapper.deleteBladeVisualMapByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可视化地图配置信息
|
||||
*
|
||||
* @param id 可视化地图配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualMapById(Long id)
|
||||
{
|
||||
return bladeVisualMapMapper.deleteBladeVisualMapById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.page.VisualRespEmbData;
|
||||
import com.ruoyi.system.domain.BladeVisualConfig;
|
||||
import com.ruoyi.system.domain.vo.BladeImageVo;
|
||||
import com.ruoyi.system.domain.vo.BladeVisualVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BladeVisualMapper;
|
||||
import com.ruoyi.system.domain.BladeVisual;
|
||||
import com.ruoyi.system.service.IBladeVisualService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 可视化Service业务层处理
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-25
|
||||
*/
|
||||
@Service
|
||||
public class BladeVisualServiceImpl implements IBladeVisualService
|
||||
{
|
||||
@Autowired
|
||||
private BladeVisualMapper bladeVisualMapper;
|
||||
|
||||
@Autowired
|
||||
private BladeVisualConfigServiceImpl configService;
|
||||
/**
|
||||
* 查询可视化
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 可视化
|
||||
*/
|
||||
@Override
|
||||
public BladeVisualVo selectBladeVisualById(Long id)
|
||||
{
|
||||
BladeVisualVo bladeVisualVo = new BladeVisualVo();
|
||||
BladeVisual bladeVisual = bladeVisualMapper.selectBladeVisualById(id);
|
||||
BladeVisualConfig config = configService.selectBladeVisualConfigById(id);
|
||||
bladeVisualVo.setVisual(bladeVisual);
|
||||
bladeVisualVo.setConfig(config);
|
||||
return bladeVisualVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可视化列表
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 可视化
|
||||
*/
|
||||
@Override
|
||||
public List<BladeVisual> selectBladeVisualList(BladeVisual bladeVisual)
|
||||
{
|
||||
return bladeVisualMapper.selectBladeVisualList(bladeVisual);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BladeVisual> selectVisualListByCategory(Long category) {
|
||||
return bladeVisualMapper.selectVisualByCategory(category);
|
||||
}
|
||||
|
||||
@Value("${server.port}")
|
||||
private int serverPort;
|
||||
|
||||
public String getUrl() {
|
||||
InetAddress address = null;
|
||||
try {
|
||||
address = InetAddress.getLocalHost();
|
||||
} catch ( UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "http://"+address.getHostAddress() +":"+this.serverPort;
|
||||
}
|
||||
|
||||
@Value("${imageDir.bigScreen}")
|
||||
private String screenPrefix;
|
||||
|
||||
@Override
|
||||
public VisualRespEmbData uploadFile(MultipartFile file) {
|
||||
// 保存到本地
|
||||
String filePath = RuoYiConfig.getProfile() + screenPrefix;
|
||||
File targetFile = new File(filePath);
|
||||
if (!targetFile.exists()) {
|
||||
targetFile.mkdirs();
|
||||
}
|
||||
String filename = file.getOriginalFilename();
|
||||
String fullFileName = filePath + "/" + filename;
|
||||
// System.out.println("image fullName"+fullFileName);
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(fullFileName);
|
||||
out.write(file.getBytes());
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
VisualRespEmbData resp = new VisualRespEmbData();
|
||||
|
||||
BladeImageVo imageVo = new BladeImageVo();
|
||||
imageVo.setDomain(filePath);
|
||||
String link = this.getUrl() + Constants.RESOURCE_PREFIX +screenPrefix +"/"+filename;
|
||||
imageVo.setLink(link);
|
||||
resp.setData(imageVo);
|
||||
return resp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Long insertBladeVisual(BladeVisual bladeVisual)
|
||||
{
|
||||
|
||||
bladeVisual.setId(System.currentTimeMillis());
|
||||
|
||||
bladeVisualMapper.insertBladeVisual(bladeVisual);
|
||||
return bladeVisual.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改可视化
|
||||
*
|
||||
* @param bladeVisual 可视化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBladeVisual(BladeVisual bladeVisual)
|
||||
{
|
||||
return bladeVisualMapper.updateBladeVisual(bladeVisual);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除可视化
|
||||
*
|
||||
* @param ids 需要删除的可视化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualByIds(Long[] ids)
|
||||
{
|
||||
return bladeVisualMapper.deleteBladeVisualByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除可视化信息
|
||||
*
|
||||
* @param id 可视化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBladeVisualById(Long id)
|
||||
{
|
||||
return bladeVisualMapper.deleteBladeVisualById(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,195 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.VisualImageMapper;
|
||||
import com.ruoyi.system.domain.VisualImage;
|
||||
import com.ruoyi.system.service.IVisualImageService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
/**
|
||||
* 图片管理。管理上传的图片Service业务层处理
|
||||
*
|
||||
* @author yangsj
|
||||
* @date 2021-10-28
|
||||
*/
|
||||
@Service
|
||||
public class VisualImageServiceImpl implements IVisualImageService {
|
||||
@Autowired
|
||||
private VisualImageMapper visualImageMapper;
|
||||
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 图片管理。管理上传的图片
|
||||
*/
|
||||
@Override
|
||||
public VisualImage selectVisualImageById(Long id) {
|
||||
return visualImageMapper.selectVisualImageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询图片管理。管理上传的图片列表
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 图片管理。管理上传的图片
|
||||
*/
|
||||
@Override
|
||||
public List<VisualImage> selectVisualImageList(VisualImage visualImage) {
|
||||
return visualImageMapper.selectVisualImageList(visualImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertVisualImage(VisualImage visualImage) {
|
||||
visualImage.setCreateTime(DateUtils.getNowDate());
|
||||
return visualImageMapper.insertVisualImage(visualImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改图片管理。管理上传的图片
|
||||
*
|
||||
* @param visualImage 图片管理。管理上传的图片
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateVisualImage(VisualImage visualImage) {
|
||||
visualImage.setUpdateTime(DateUtils.getNowDate());
|
||||
return visualImageMapper.updateVisualImage(visualImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除图片管理。管理上传的图片
|
||||
*
|
||||
* @param ids 需要删除的图片管理。管理上传的图片主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteVisualImageByIds(Long[] ids) {
|
||||
return visualImageMapper.deleteVisualImageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图片管理。管理上传的图片信息
|
||||
*
|
||||
* @param id 图片管理。管理上传的图片主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteVisualImageById(Long id) {
|
||||
return visualImageMapper.deleteVisualImageById(id);
|
||||
}
|
||||
|
||||
|
||||
@Value("${imageDir.visualImage}")
|
||||
private String imageDir;
|
||||
|
||||
@Override
|
||||
public int addImage(MultipartFile file, Integer heigth, Integer width) {
|
||||
// 1.保存到图片本地
|
||||
saveImageToLocal(file);
|
||||
|
||||
// 2.插入记录到数据库
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveImageToLocal(MultipartFile file) {
|
||||
String filePath = RuoYiConfig.getProfile() + imageDir;
|
||||
File targetFile = new File(filePath);
|
||||
if (!targetFile.exists()) {
|
||||
targetFile.mkdirs();
|
||||
}
|
||||
String[] fileNameSplit = file.getOriginalFilename().split("\\.");
|
||||
String fileType = fileNameSplit[fileNameSplit.length - 1];
|
||||
|
||||
String newFileName = UUID.fastUUID().toString(true) + "." + fileType;
|
||||
String fullFileName = filePath + "/" + newFileName;
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(fullFileName);
|
||||
out.write(file.getBytes());
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return newFileName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int divideImage(VisualImage visualImage) {
|
||||
String rootPath = RuoYiConfig.getProfile() + imageDir;
|
||||
String newFileName = rootPath + "/" + visualImage.getNewName();
|
||||
// 读入大图
|
||||
File file = new File(newFileName);
|
||||
FileInputStream fis;
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
BufferedImage image = ImageIO.read(fis);
|
||||
|
||||
// 分割成4*4(16)个小图
|
||||
int rows = visualImage.getHeight();
|
||||
int cols = visualImage.getWidth();
|
||||
int chunks = rows * cols;
|
||||
|
||||
// 计算每个小图的宽度和高度
|
||||
int chunkWidth = image.getWidth() / cols;
|
||||
int chunkHeight = image.getHeight() / rows;
|
||||
|
||||
// 新建文件夹存放子图
|
||||
String[] split = visualImage.getNewName().split("\\.");
|
||||
String outputDir = rootPath + "/" + split[0];
|
||||
File targetFile = new File(outputDir);
|
||||
if (!targetFile.exists()) {
|
||||
targetFile.mkdirs();
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
BufferedImage imgs[] = new BufferedImage[chunks];
|
||||
for (int x = 0; x < rows; x++) {
|
||||
for (int y = 0; y < cols; y++) {
|
||||
//设置小图的大小和类型
|
||||
imgs[count] = new BufferedImage(chunkWidth, chunkHeight, image.getType());
|
||||
|
||||
//写入图像内容
|
||||
Graphics2D gr = imgs[count].createGraphics();
|
||||
gr.drawImage(image, 0, 0,
|
||||
chunkWidth, chunkHeight,
|
||||
chunkWidth * y, chunkHeight * x,
|
||||
chunkWidth * y + chunkWidth,
|
||||
chunkHeight * x + chunkHeight, null);
|
||||
gr.dispose();
|
||||
|
||||
// 输出小图
|
||||
String outFileName = outputDir + "/" + x + "_" + y + "." + split[split.length - 1];
|
||||
ImageIO.write(imgs[count], split[split.length - 1], new File(outFileName));
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.BladeVisualCategoryMapper">
|
||||
|
||||
<resultMap type="BladeVisualCategory" id="BladeVisualCategoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryKey" column="category_key" />
|
||||
<result property="categoryValue" column="category_value" />
|
||||
<result property="isDeleted" column="is_deleted" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBladeVisualCategoryVo">
|
||||
select id, category_key, category_value, is_deleted from blade_visual_category
|
||||
</sql>
|
||||
|
||||
<select id="selectBladeVisualCategoryList" parameterType="BladeVisualCategory" resultMap="BladeVisualCategoryResult">
|
||||
<include refid="selectBladeVisualCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryKey != null and categoryKey != ''"> and category_key = #{categoryKey}</if>
|
||||
<if test="categoryValue != null and categoryValue != ''"> and category_value = #{categoryValue}</if>
|
||||
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBladeVisualCategoryById" parameterType="Long" resultMap="BladeVisualCategoryResult">
|
||||
<include refid="selectBladeVisualCategoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBladeVisualCategory" parameterType="BladeVisualCategory">
|
||||
insert into blade_visual_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="categoryKey != null">category_key,</if>
|
||||
<if test="categoryValue != null">category_value,</if>
|
||||
<if test="isDeleted != null">is_deleted,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="categoryKey != null">#{categoryKey},</if>
|
||||
<if test="categoryValue != null">#{categoryValue},</if>
|
||||
<if test="isDeleted != null">#{isDeleted},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBladeVisualCategory" parameterType="BladeVisualCategory">
|
||||
update blade_visual_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryKey != null">category_key = #{categoryKey},</if>
|
||||
<if test="categoryValue != null">category_value = #{categoryValue},</if>
|
||||
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBladeVisualCategoryById" parameterType="Long">
|
||||
delete from blade_visual_category where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBladeVisualCategoryByIds" parameterType="String">
|
||||
delete from blade_visual_category where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.BladeVisualConfigMapper">
|
||||
|
||||
<resultMap type="BladeVisualConfig" id="BladeVisualConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="visualId" column="visual_id" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="component" column="component" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBladeVisualConfigVo">
|
||||
select id, visual_id, detail, component from blade_visual_config
|
||||
</sql>
|
||||
|
||||
<select id="selectBladeVisualConfigList" parameterType="BladeVisualConfig" resultMap="BladeVisualConfigResult">
|
||||
<include refid="selectBladeVisualConfigVo"/>
|
||||
<where>
|
||||
<if test="visualId != null "> and visual_id = #{visualId}</if>
|
||||
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
|
||||
<if test="component != null and component != ''"> and component = #{component}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBladeVisualConfigById" parameterType="Long" resultMap="BladeVisualConfigResult">
|
||||
<include refid="selectBladeVisualConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBladeVisualConfig" parameterType="BladeVisualConfig">
|
||||
insert into blade_visual_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="visualId != null">visual_id,</if>
|
||||
<if test="detail != null">detail,</if>
|
||||
<if test="component != null">component,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="visualId != null">#{visualId},</if>
|
||||
<if test="detail != null">#{detail},</if>
|
||||
<if test="component != null">#{component},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBladeVisualConfig" parameterType="BladeVisualConfig">
|
||||
update blade_visual_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="visualId != null">visual_id = #{visualId},</if>
|
||||
<if test="detail != null">detail = #{detail},</if>
|
||||
<if test="component != null">component = #{component},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBladeVisualConfigById" parameterType="Long">
|
||||
delete from blade_visual_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBladeVisualConfigByIds" parameterType="String">
|
||||
delete from blade_visual_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.BladeVisualMapMapper">
|
||||
|
||||
<resultMap type="BladeVisualMap" id="BladeVisualMapResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="data" column="data" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBladeVisualMapVo">
|
||||
select id, name, data from blade_visual_map
|
||||
</sql>
|
||||
|
||||
<select id="selectBladeVisualMapList" parameterType="BladeVisualMap" resultMap="BladeVisualMapResult">
|
||||
<include refid="selectBladeVisualMapVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="data != null and data != ''"> and data = #{data}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBladeVisualMapById" parameterType="Long" resultMap="BladeVisualMapResult">
|
||||
<include refid="selectBladeVisualMapVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBladeVisualMap" parameterType="BladeVisualMap">
|
||||
insert into blade_visual_map
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="data != null">data,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="data != null">#{data},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBladeVisualMap" parameterType="BladeVisualMap">
|
||||
update blade_visual_map
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="data != null">data = #{data},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBladeVisualMapById" parameterType="Long">
|
||||
delete from blade_visual_map where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBladeVisualMapByIds" parameterType="String">
|
||||
delete from blade_visual_map where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.BladeVisualMapper">
|
||||
|
||||
<resultMap type="BladeVisual" id="BladeVisualResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="backgroundUrl" column="background_url" />
|
||||
<result property="category" column="category" />
|
||||
<result property="password" column="password" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="isdeleted" column="isDeleted" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBladeVisualVo">
|
||||
select id, title, background_url, category, password, create_dept, create_by, create_time, update_by, update_time, status, isDeleted from blade_visual
|
||||
</sql>
|
||||
|
||||
<select id="selectBladeVisualList" parameterType="BladeVisual" resultMap="BladeVisualResult">
|
||||
<include refid="selectBladeVisualVo"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="backgroundUrl != null and backgroundUrl != ''"> and background_url = #{backgroundUrl}</if>
|
||||
<if test="category != null "> and category = #{category}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="createDept != null "> and create_dept = #{createDept}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="isdeleted != null "> and isDeleted = #{isdeleted}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBladeVisualById" parameterType="Long" resultMap="BladeVisualResult">
|
||||
<include refid="selectBladeVisualVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectVisualByCategory" parameterType="Long" resultMap="BladeVisualResult">
|
||||
<include refid="selectBladeVisualVo"/>
|
||||
where category = #{category}
|
||||
</select>
|
||||
|
||||
<insert id="insertBladeVisual" parameterType="BladeVisual">
|
||||
insert into blade_visual
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="backgroundUrl != null">background_url,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="password != null">password,</if>
|
||||
<if test="createDept != null">create_dept,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="isdeleted != null">isDeleted,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="backgroundUrl != null">#{backgroundUrl},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="createDept != null">#{createDept},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="isdeleted != null">#{isdeleted},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBladeVisual" parameterType="BladeVisual">
|
||||
update blade_visual
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="backgroundUrl != null">background_url = #{backgroundUrl},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="createDept != null">create_dept = #{createDept},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="isdeleted != null">isDeleted = #{isdeleted},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBladeVisualById" parameterType="Long">
|
||||
delete from blade_visual where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBladeVisualByIds" parameterType="String">
|
||||
delete from blade_visual where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.VisualImageMapper">
|
||||
|
||||
<resultMap type="VisualImage" id="VisualImageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="originName" column="origin_name" />
|
||||
<result property="newName" column="new_name" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="descri" column="descri" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisualImageVo">
|
||||
select id, origin_name, new_name, width, height, descri, del_flag, create_by, create_time, update_by, update_time from visual_image
|
||||
</sql>
|
||||
|
||||
<select id="selectVisualImageList" parameterType="VisualImage" resultMap="VisualImageResult">
|
||||
<include refid="selectVisualImageVo"/>
|
||||
<where>
|
||||
<if test="originName != null and originName != ''"> and origin_name like concat('%', #{originName}, '%')</if>
|
||||
<if test="newName != null and newName != ''"> and new_name like concat('%', #{newName}, '%')</if>
|
||||
<if test="width != null "> and width = #{width}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="descri != null and descri != ''"> and descri = #{descri}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisualImageById" parameterType="Long" resultMap="VisualImageResult">
|
||||
<include refid="selectVisualImageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertVisualImage" parameterType="VisualImage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into visual_image
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="originName != null">origin_name,</if>
|
||||
<if test="newName != null">new_name,</if>
|
||||
<if test="width != null">width,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="descri != null">descri,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="originName != null">#{originName},</if>
|
||||
<if test="newName != null">#{newName},</if>
|
||||
<if test="width != null">#{width},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="descri != null">#{descri},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateVisualImage" parameterType="VisualImage">
|
||||
update visual_image
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="originName != null">origin_name = #{originName},</if>
|
||||
<if test="newName != null">new_name = #{newName},</if>
|
||||
<if test="width != null">width = #{width},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="descri != null">descri = #{descri},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteVisualImageById" parameterType="Long">
|
||||
delete from visual_image where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteVisualImageByIds" parameterType="String">
|
||||
delete from visual_image where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user