Compare commits

..

No commits in common. '4cbb8e9b89dff661ac921b85870d3e2223e3e21d' and '95b62c3b0dbc57d3ddf40c501954c296940a67ff' have entirely different histories.

@ -3,7 +3,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Yanfa2023@
hikari: hikari:
#连接池名 #连接池名
pool-name: HikariCP pool-name: HikariCP

@ -1,7 +1,7 @@
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:13306/sz_admin_preview?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:3306/sz_admin_preview?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: 123456
hikari: hikari:

@ -3,7 +3,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Yanfa2023@
hikari: hikari:
#连接池名 #连接池名
pool-name: HikariCP pool-name: HikariCP

@ -3,7 +3,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:13306/sz_admin_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Yanfa2023@
hikari: hikari:
#连接池名 #连接池名
pool-name: HikariCP pool-name: HikariCP

@ -47,13 +47,11 @@ public class FileController {
} }
@GetMapping("/getFile") @GetMapping("/getFile")
@SaIgnore
public ApiResult<FileStorageDTO> getFile(@RequestParam("id") String id) { public ApiResult<FileStorageDTO> getFile(@RequestParam("id") String id) {
return fileService.getFile(id); return fileService.getFile(id);
} }
@PostMapping("/saveFile") @PostMapping("/saveFile")
@SaIgnore
public ApiResult<FileStorageDTO> saveFile(@RequestParam("file") MultipartFile file) { public ApiResult<FileStorageDTO> saveFile(@RequestParam("file") MultipartFile file) {
return fileService.saveFile(file); return fileService.saveFile(file);
} }

@ -29,11 +29,6 @@ public class ModelContentDTO {
*/ */
private String id; private String id;
/**
*
*/
private Integer modelIndex=99;
/** /**
* *
*/ */

@ -1,14 +1,11 @@
package com.sz.admin.monitor.pojo.dto.dataModel; package com.sz.admin.monitor.pojo.dto.dataModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.Date;
/** /**
* @author xq * @author xq
* @description: * @description:
@ -35,12 +32,4 @@ public class UserModelContentDTO {
* *
*/ */
private String modelContentId; private String modelContentId;
/**
*
*/
private Date addTime;
/**
*
*/
private Date updateTime;
} }

@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
* @author xq * @author xq
* @date 2026/1/29 11:32 * @date 2026/1/29 11:32
*/ */
@Table("ry_canvas_cfg") @Table("ry_model_content")
@Schema(description = "画布配置数据对象") @Schema(description = "画布配置数据对象")
@Data @Data
@Builder @Builder

@ -34,12 +34,6 @@ public class ModelContentDO {
@Schema(description = "模型id") @Schema(description = "模型id")
private String id; private String id;
/**
*
*/
@Schema(description = "模型索引")
private Integer modelIndex=99;
/** /**
* *
*/ */
@ -113,7 +107,6 @@ public class ModelContentDO {
private String events; private String events;
public static final String ID = "id"; public static final String ID = "id";
public static final String MODEL_INDEX = "model_index";
public static final String TITLE = "title"; public static final String TITLE = "title";
public static final String TYPE = "type"; public static final String TYPE = "type";
public static final String BINFO = "binfo"; public static final String BINFO = "binfo";

@ -10,7 +10,6 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @description: * @description:
@ -45,16 +44,6 @@ public class UserModelContentDO implements Serializable {
*/ */
@Schema(description = "模型内容") @Schema(description = "模型内容")
private String modelContentId; private String modelContentId;
/**
*
*/
@Schema(description = "添加时间")
private Date addTime;
/**
*
*/
@Schema(description = "修改时间")
private Date updateTime;
public static final String ID="id"; public static final String ID="id";
public static final String USER_ID="user_id"; public static final String USER_ID="user_id";

@ -114,13 +114,7 @@ public class DataModelServiceImpl {
.map(item -> item.getModelContentId()) .map(item -> item.getModelContentId())
.collect(Collectors.toList()); .collect(Collectors.toList());
List<ModelContentDO> modelContentDOS = modelContentService.list(QueryWrapper.create() List<ModelContentDO> modelContentDOS = modelContentService.listByIds(collect);
.from(ModelContentDO.class)
.in(ModelContentDO.ID, collect)
.orderBy(ModelContentDO.MODEL_INDEX, true)
);
// List<ModelContentDO> modelContentDOS = modelContentService.listByIds(collect);
for (ModelContentDO modelContentDO : modelContentDOS) { for (ModelContentDO modelContentDO : modelContentDOS) {
objects.add(ModelContentDO.doConvertDTO(modelContentDO)); objects.add(ModelContentDO.doConvertDTO(modelContentDO));
} }
@ -181,12 +175,8 @@ public class DataModelServiceImpl {
throw new IllegalArgumentException("传值错误"); throw new IllegalArgumentException("传值错误");
CanvasCfgDTO canvasCfg = dataModelDTO.getCanvasCfg(); CanvasCfgDTO canvasCfg = dataModelDTO.getCanvasCfg();
GridCfgDTO gridCfg = dataModelDTO.getGridCfg(); GridCfgDTO gridCfg = dataModelDTO.getGridCfg();
List<ModelContentDTO> json=new ArrayList<>(); List<ModelContentDTO> json = dataModelDTO.getJson();
for (int i = 0; i < dataModelDTO.getJson().size(); i++) {
ModelContentDTO modelContentDTO = dataModelDTO.getJson().get(i);
modelContentDTO.setModelIndex(i);
json.add(modelContentDTO);
}
//保存、更新面板 //保存、更新面板
canvasCfg.setUserId(userId); canvasCfg.setUserId(userId);
canvasCfgService.saveOrUpdateCanvas(canvasCfg); canvasCfgService.saveOrUpdateCanvas(canvasCfg);
@ -219,6 +209,11 @@ public class DataModelServiceImpl {
.from(UserModelContentDO.class) .from(UserModelContentDO.class)
.eq(UserModelContentDO.USER_ID, userId) .eq(UserModelContentDO.USER_ID, userId)
.eq(UserModelContentDO.MENU_TYPE, dataModelDTO.getMenuType())); .eq(UserModelContentDO.MENU_TYPE, dataModelDTO.getMenuType()));
// userModelContentService.remove(new QueryWrapper<UserModelContentDO>()
// .eq(UserModelContentDO.USER_ID, userId) //先写死
// .eq(UserModelContentDO.MENU_TYPE, dataModelDTO.getMenuType()));
return ApiResult.success(); return ApiResult.success();
} }

@ -60,6 +60,14 @@ public class ModelContentServiceImpl extends ServiceImpl<ModelContentMapper, Mod
.limit(1); .limit(1);
List<UserModelContentDO> doList = userModelContentService.list(queryWrapper); List<UserModelContentDO> doList = userModelContentService.list(queryWrapper);
// List<UserModelContentDO> doList = userModelContentService.list(new QueryWrapper<UserModelContentDO>()
// .eq(UserModelContentDO.MODEL_CONTENT_ID, modelContentDO.getId())
// .eq(UserModelContentDO.MENU_TYPE, menuType)
// .orderByDesc(UserModelContentDO.ID)
// .last("limit 1")
// );
if (CollectionUtil.isEmpty(doList)) if (CollectionUtil.isEmpty(doList))
modelContentDO.setId(null); modelContentDO.setId(null);
else else

@ -7,7 +7,6 @@ create table ry_user_model_content
) comment '用户模型关系'; ) comment '用户模型关系';
-- auto-generated definition
create table ry_model_content create table ry_model_content
( (
id varchar(32) not null comment '模型id' id varchar(32) not null comment '模型id'
@ -15,7 +14,7 @@ create table ry_model_content
title varchar(32) null comment '模型名称', title varchar(32) null comment '模型名称',
type varchar(32) null comment '模型类型', type varchar(32) null comment '模型类型',
binfo varchar(128) null comment '位置json', binfo varchar(128) null comment '位置json',
resize tinyint(1) null comment '调整大小(bool)', resize tinyint(1) null comment '调整大小',
rotate tinyint(1) null comment '旋转', rotate tinyint(1) null comment '旋转',
`lock` tinyint(1) null comment '锁定', `lock` tinyint(1) null comment '锁定',
active tinyint(1) null comment '动作(bool)', active tinyint(1) null comment '动作(bool)',
@ -23,8 +22,7 @@ create table ry_model_content
props varchar(128) null comment '属性(json)', props varchar(128) null comment '属性(json)',
tag varchar(128) null comment 'vue组件名称', tag varchar(128) null comment 'vue组件名称',
common_animations varchar(128) null comment '动画(json)', common_animations varchar(128) null comment '动画(json)',
events varchar(128) null comment '事件', events varchar(128) null comment '事件'
`index` int null comment '索引'
) )
comment '模型内容'; comment '模型内容';

Loading…
Cancel
Save