mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
启动问题修复
This commit is contained in:
parent
89b630e7fc
commit
4cc423ba1f
@ -1,14 +1,12 @@
|
|||||||
package com.luban.api.dao.mongo;
|
package com.luban.api.mongo.dao;
|
||||||
|
|
||||||
import com.luban.api.entity.mongo.H5ProjectContent;
|
import com.luban.api.mongo.entity.H5ProjectContent;
|
||||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* H5项目内容 Repository
|
* H5项目内容 Repository
|
||||||
*
|
*
|
||||||
* @author your-name
|
* @author your-name
|
||||||
*/
|
*/
|
||||||
@Repository
|
|
||||||
public interface H5ProjectContentRepository extends MongoRepository<H5ProjectContent, String> {
|
public interface H5ProjectContentRepository extends MongoRepository<H5ProjectContent, String> {
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.luban.api.entity.mongo;
|
package com.luban.api.mongo.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
@ -34,4 +34,4 @@ public class H5ProjectContent {
|
|||||||
*/
|
*/
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,10 +3,10 @@ package com.luban.api.service.impl;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.luban.api.dao.H5ProjectDao;
|
import com.luban.api.dao.H5ProjectDao;
|
||||||
import com.luban.api.dao.H5ProjectGroupDao;
|
import com.luban.api.dao.H5ProjectGroupDao;
|
||||||
import com.luban.api.dao.mongo.H5ProjectContentRepository;
|
import com.luban.api.mongo.dao.H5ProjectContentRepository;
|
||||||
import com.luban.api.entity.H5Project;
|
import com.luban.api.entity.H5Project;
|
||||||
import com.luban.api.entity.H5ProjectGroup;
|
import com.luban.api.entity.H5ProjectGroup;
|
||||||
import com.luban.api.entity.mongo.H5ProjectContent;
|
import com.luban.api.mongo.entity.H5ProjectContent;
|
||||||
import com.luban.api.service.H5ProjectService;
|
import com.luban.api.service.H5ProjectService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -29,7 +29,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private H5ProjectContentRepository h5ProjectContentRepository;
|
private H5ProjectContentRepository h5ProjectContentRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private H5ProjectGroupDao h5ProjectGroupDao;
|
private H5ProjectGroupDao h5ProjectGroupDao;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
long currentTime = System.currentTimeMillis() / 1000;
|
long currentTime = System.currentTimeMillis() / 1000;
|
||||||
h5Project.setCreateTime(currentTime);
|
h5Project.setCreateTime(currentTime);
|
||||||
h5Project.setUpdateTime(currentTime);
|
h5Project.setUpdateTime(currentTime);
|
||||||
|
|
||||||
// 先保存H5Project基本信息到MySQL
|
// 先保存H5Project基本信息到MySQL
|
||||||
boolean saved = this.save(h5Project);
|
boolean saved = this.save(h5Project);
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
|
|
||||||
h5ProjectContentRepository.save(h5ProjectContent);
|
h5ProjectContentRepository.save(h5ProjectContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存项目与分组的关联关系
|
// 保存项目与分组的关联关系
|
||||||
if (saved && groupIds != null && !groupIds.isEmpty()) {
|
if (saved && groupIds != null && !groupIds.isEmpty()) {
|
||||||
saveProjectGroups(h5Project.getId(), groupIds, currentTime);
|
saveProjectGroups(h5Project.getId(), groupIds, currentTime);
|
||||||
@ -75,7 +75,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
// 设置更新时间戳
|
// 设置更新时间戳
|
||||||
long currentTime = System.currentTimeMillis() / 1000;
|
long currentTime = System.currentTimeMillis() / 1000;
|
||||||
h5Project.setUpdateTime(currentTime);
|
h5Project.setUpdateTime(currentTime);
|
||||||
|
|
||||||
// 更新H5Project基本信息到MySQL
|
// 更新H5Project基本信息到MySQL
|
||||||
boolean updated = this.updateById(h5Project);
|
boolean updated = this.updateById(h5Project);
|
||||||
|
|
||||||
@ -96,12 +96,12 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
|
|
||||||
h5ProjectContentRepository.save(h5ProjectContent);
|
h5ProjectContentRepository.save(h5ProjectContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新项目与分组的关联关系
|
// 更新项目与分组的关联关系
|
||||||
if (updated && groupIds != null) {
|
if (updated && groupIds != null) {
|
||||||
h5ProjectGroupDao.delete(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
h5ProjectGroupDao.delete(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
||||||
.eq(H5ProjectGroup::getProjectId, h5Project.getId()));
|
.eq(H5ProjectGroup::getProjectId, h5Project.getId()));
|
||||||
|
|
||||||
if (!groupIds.isEmpty()) {
|
if (!groupIds.isEmpty()) {
|
||||||
saveProjectGroups(h5Project.getId(), groupIds, currentTime);
|
saveProjectGroups(h5Project.getId(), groupIds, currentTime);
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
if (h5Project.getContentId() != null) {
|
if (h5Project.getContentId() != null) {
|
||||||
h5ProjectContentRepository.deleteById(h5Project.getContentId());
|
h5ProjectContentRepository.deleteById(h5Project.getContentId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除项目与分组的关联关系
|
// 删除项目与分组的关联关系
|
||||||
h5ProjectGroupDao.delete(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
h5ProjectGroupDao.delete(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
||||||
.eq(H5ProjectGroup::getProjectId, id));
|
.eq(H5ProjectGroup::getProjectId, id));
|
||||||
@ -152,7 +152,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存项目与分组的关联关系
|
* 保存项目与分组的关联关系
|
||||||
* @param projectId 项目ID
|
* @param projectId 项目ID
|
||||||
@ -168,7 +168,7 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
h5ProjectGroupDao.insert(projectGroup);
|
h5ProjectGroupDao.insert(projectGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> getProjectGroupIds(Long projectId) {
|
public List<Long> getProjectGroupIds(Long projectId) {
|
||||||
return h5ProjectGroupDao.selectList(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
return h5ProjectGroupDao.selectList(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<H5ProjectGroup>()
|
||||||
@ -177,4 +177,4 @@ public class H5ProjectServiceImpl extends ServiceImpl<H5ProjectDao, H5Project> i
|
|||||||
.map(H5ProjectGroup::getGroupId)
|
.map(H5ProjectGroup::getGroupId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,13 +8,6 @@ spring:
|
|||||||
# 注册组
|
# 注册组
|
||||||
group: DUBBO_GROUP
|
group: DUBBO_GROUP
|
||||||
namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b
|
namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b
|
||||||
# 资源信息
|
|
||||||
messages:
|
|
||||||
# 国际化资源文件路径
|
|
||||||
basename: i18n/messages
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 10MB
|
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||||
@ -67,7 +60,7 @@ spring:
|
|||||||
# Redis服务器连接端口
|
# Redis服务器连接端口
|
||||||
port: 6379
|
port: 6379
|
||||||
# Redis服务器连接密码(默认为空)
|
# Redis服务器连接密码(默认为空)
|
||||||
password: Lzw8800580/
|
password: difyai123456
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
@ -89,65 +82,11 @@ springdoc:
|
|||||||
# swagger-ui:
|
# swagger-ui:
|
||||||
# # 持久化认证数据
|
# # 持久化认证数据
|
||||||
# persistAuthorization: true
|
# persistAuthorization: true
|
||||||
info:
|
|
||||||
# 标题
|
|
||||||
title: '标题:${spring.application.name}多租户管理系统_接口文档'
|
|
||||||
# 描述
|
|
||||||
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
|
|
||||||
# 版本
|
|
||||||
version: '版本号: 1.0.0'
|
|
||||||
# 作者信息
|
|
||||||
contact:
|
|
||||||
name: Lion Li
|
|
||||||
email: crazylionli@163.com
|
|
||||||
url: https://gitee.com/dromara/RuoYi-Vue-Plus
|
|
||||||
components:
|
|
||||||
# 鉴权方式配置
|
|
||||||
security-schemes:
|
|
||||||
apiKey:
|
|
||||||
type: APIKEY
|
|
||||||
in: HEADER
|
|
||||||
name: Authorization
|
|
||||||
#这里定义了两个分组,可定义多个,也可以不定义
|
|
||||||
group-configs:
|
|
||||||
- group: 1.演示模块
|
|
||||||
packages-to-scan: org.dromara.demo
|
|
||||||
- group: 2.通用模块
|
|
||||||
packages-to-scan: org.dromara.web
|
|
||||||
- group: 3.系统模块
|
|
||||||
packages-to-scan: org.dromara.system
|
|
||||||
- group: 4.代码生成模块
|
|
||||||
packages-to-scan: org.dromara.generator
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 多租户配置
|
# 多租户配置
|
||||||
tenant:
|
tenant:
|
||||||
# 是否开启
|
# 是否开启
|
||||||
enable: true
|
enable: true
|
||||||
# 排除表
|
|
||||||
excludes:
|
|
||||||
- sys_menu
|
|
||||||
- sys_tenant
|
|
||||||
- sys_tenant_package
|
|
||||||
- sys_saas_user_role
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MyBatisPlus配置
|
|
||||||
# https://baomidou.com/config/
|
|
||||||
mybatis-plus:
|
|
||||||
# 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper
|
|
||||||
mapperPackage: com.luban.api.dao
|
|
||||||
# # 实体扫描,多个package用逗号或者分号分隔
|
|
||||||
# typeAliasesPackage: com.luban.api.entity
|
|
||||||
global-config:
|
|
||||||
dbConfig:
|
|
||||||
# 主键类型
|
|
||||||
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
|
||||||
# 如需改为自增 需要将数据库表全部设置为自增
|
|
||||||
idType: ASSIGN_ID
|
|
||||||
|
|
||||||
# dubbo
|
# dubbo
|
||||||
dubbo:
|
dubbo:
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 19200
|
port: 19200
|
||||||
|
servlet:
|
||||||
|
context-path: /h5
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
@ -9,4 +11,65 @@ spring:
|
|||||||
name: ruoyi-h5
|
name: ruoyi-h5
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: @profiles.active@
|
active: local
|
||||||
|
# 资源信息
|
||||||
|
messages:
|
||||||
|
# 国际化资源文件路径
|
||||||
|
basename: i18n/messages
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 10MB
|
||||||
|
|
||||||
|
springdoc:
|
||||||
|
info:
|
||||||
|
# 标题
|
||||||
|
title: '标题:${spring.application.name}多租户管理系统_接口文档'
|
||||||
|
# 描述
|
||||||
|
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
|
||||||
|
# 版本
|
||||||
|
version: '版本号: 1.0.0'
|
||||||
|
# 作者信息
|
||||||
|
contact:
|
||||||
|
name: Lion Li
|
||||||
|
email: crazylionli@163.com
|
||||||
|
url: https://gitee.com/dromara/RuoYi-Vue-Plus
|
||||||
|
components:
|
||||||
|
# 鉴权方式配置
|
||||||
|
security-schemes:
|
||||||
|
apiKey:
|
||||||
|
type: APIKEY
|
||||||
|
in: HEADER
|
||||||
|
name: Authorization
|
||||||
|
#这里定义了两个分组,可定义多个,也可以不定义
|
||||||
|
group-configs:
|
||||||
|
- group: 1.演示模块
|
||||||
|
packages-to-scan: org.dromara.demo
|
||||||
|
- group: 2.通用模块
|
||||||
|
packages-to-scan: org.dromara.web
|
||||||
|
- group: 3.系统模块
|
||||||
|
packages-to-scan: org.dromara.system
|
||||||
|
- group: 4.代码生成模块
|
||||||
|
packages-to-scan: org.dromara.generator
|
||||||
|
|
||||||
|
# 多租户配置
|
||||||
|
tenant:
|
||||||
|
# 排除表
|
||||||
|
excludes:
|
||||||
|
- sys_menu
|
||||||
|
- sys_tenant
|
||||||
|
- sys_tenant_package
|
||||||
|
- sys_saas_user_role
|
||||||
|
|
||||||
|
# MyBatisPlus配置
|
||||||
|
# https://baomidou.com/config/
|
||||||
|
mybatis-plus:
|
||||||
|
# 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper
|
||||||
|
mapperPackage: com.luban.api.dao
|
||||||
|
# # 实体扫描,多个package用逗号或者分号分隔
|
||||||
|
# typeAliasesPackage: com.luban.api.entity
|
||||||
|
global-config:
|
||||||
|
dbConfig:
|
||||||
|
# 主键类型
|
||||||
|
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||||
|
# 如需改为自增 需要将数据库表全部设置为自增
|
||||||
|
idType: ASSIGN_ID
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user