Compare commits

...

10 Commits

Author SHA1 Message Date
张毅大神 625809dae6 自己看看得了 2024-09-28 15:48:51 +08:00
张毅大神 e161bed5f2 修改合并前的分支 2024-09-27 19:24:34 +08:00
张毅大神 85aff5c847 合并调整 2024-09-25 21:10:05 +08:00
张毅大神 0f315a08a3 电子围栏合并 2024-09-25 21:04:46 +08:00
chentaisen 0addc68684 合并 2024-09-25 20:14:55 +08:00
面包骑士 ddd0cff418 saas合并 2024-09-25 20:03:53 +08:00
面包骑士 d3da757767 稳定版本 2024-09-25 20:03:53 +08:00
面包骑士 7f37b816a8 用户列表接口saas化 2024-09-25 20:03:53 +08:00
面包骑士 7540b931c5 拆分用户模块为saas用户模块 2024-09-25 20:03:52 +08:00
面包骑士 99b4f3bb16 修复数据源连接超时问题 2024-09-25 20:03:52 +08:00
161 changed files with 1745 additions and 1579 deletions

View File

@ -25,5 +25,6 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
public class CloudAuthApplication {
public static void main (String[] args) {
SpringApplication.run(CloudAuthApplication.class, args);
System.out.println("CloudAuth 模块启动成功!");
}
}

View File

@ -76,8 +76,7 @@ public class SysLoginService {
throw new ServiceException("很遗憾访问IP已被列入系统黑名单");
}
// 查询用户信息
Result<SysUser> userResult = remoteSaasService.getUserInfo(firmCode, username, SecurityConstants.INNER);
Result<LoginUser> userResult = remoteUserService.getUserInfo(firmCode, username, SecurityConstants.INNER);
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
throw new ServiceException("登录用户:" + username + " 不存在");
@ -87,7 +86,8 @@ public class SysLoginService {
throw new ServiceException(userResult.getMsg());
}
SysUser user = userResult.getData();
LoginUser loginUser = userResult.getData();
SysUser user = loginUser.getSysUser();
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
@ -99,15 +99,7 @@ public class SysLoginService {
passwordService.validate(user, password);
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
// 角色集合
Set<String> roles = remoteUserService.getRolePermission(user);
// 权限集合
Set<String> permissions = remoteUserService.getMenuPermission(user);
LoginUser sysUserVo = new LoginUser();
sysUserVo.setSysUser(user);
sysUserVo.setRoles(roles);
sysUserVo.setPermissions(permissions);
return sysUserVo;
return loginUser;
}
public void logout (String loginName) {

View File

@ -4,10 +4,10 @@ server:
# nacos线上地址
nacos:
addr: 47.116.173.119:8848
addr: 110.42.213.184:8848
user-name: nacos
password: nacos
namespace: one-saas
namespace: public
# Spring
spring:
application:
@ -40,8 +40,8 @@ spring:
file-extension: yml
# 共享配置
shared-configs:
# 系统共享配置
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 系统环境Config共享配置
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 系统共享配置
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -2,25 +2,38 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>cloud-server</artifactId>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown</artifactId>
<version>3.6.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-breakdown-common</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<artifactId>cloud-common-enterprise-operation</artifactId>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
<version>3.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-system</artifactId>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</project>

View File

@ -0,0 +1,4 @@
package com.muyu.enterpise;
public class SSS {
}

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.domain;
package com.muyu.enterpise.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.domain;
package com.muyu.enterpise.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package com.muyu.gen.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.constant.GenConstants;
import com.muyu.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.muyu.gen.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.utils.StringUtils;
import com.muyu.common.core.web.domain.BaseEntity;

View File

@ -1,4 +1,4 @@
package com.muyu.gen.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.constant.GenConstants;
import com.muyu.common.core.utils.StringUtils;

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.domain;
package com.muyu.enterpise.domain;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.domain;
package com.muyu.enterpise.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.domain;
package com.muyu.enterpise.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

View File

@ -0,0 +1,67 @@
package com.muyu.enterpise.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* sys_corpuscle_fence
*
* @author muyu
* @date 2024-09-17
*/
@Data
@Setter
@Getter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_corpuscle_fence")
public class SysCorpuscle{
private static final long serialVersionUID = 1L;
/** 自增主键 */
@TableId( type = IdType.AUTO)
private Long id;
/** 围栏编码 */
@Excel(name = "围栏编码")
private String fenceCode;
/** 围栏名称 */
@Excel(name = "围栏名称")
private String fenceName;
/** 围栏类型(1.驶入 2.驶出) */
@Excel(name = "围栏类型(1.驶入 2.驶出)")
private Long fenceType;
/** 围栏位置 */
@Excel(name = "围栏位置")
private String fencePosition;
/** 启用状态(1.启用 2.停用) */
@Excel(name = "启用状态(1.启用 2.停用)")
private String state;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("fenceCode", getFenceCode())
.append("fenceName", getFenceName())
.append("fenceType", getFenceType())
.append("fencePosition", getFencePosition())
.append("state", getState())
.toString();
}
}

View File

@ -0,0 +1,95 @@
package com.muyu.enterpise.domain;
import cn.hutool.core.date.DateTime;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
/**
* sys_fence_group
*
* @author muyu
* @date 2024-09-17
*/
@Data
@Setter
@Getter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_fence_group")
public class SysFence{
private static final long serialVersionUID = 1L;
/** 自增主键 */
@TableId( type = IdType.AUTO)
private Long id;
/** 围栏组编码 */
@Excel(name = "围栏组编码")
private String groupCode;
/** 围栏组名称 */
@Excel(name = "围栏组名称")
private String groupName;
/** 围栏组类型 */
@Excel(name = "围栏组类型")
private String groupType;
/** 启用状态 */
@Excel(name = "启用状态")
private String state;
/** 创建人 */
@Excel(name = "创建人")
private String createBy;
/** 创建时间 */
@Excel(name = "创建时间")
private Date createTime;
/** 更新人 */
@Excel(name = "更新人")
private String updateBy;
/** 更新时间 */
@Excel(name = "更新时间")
private Date updateTime;
/** 启用状态 */
@Excel(name = "启用状态")
private String remark;
// /** sysfindname */
// @Excel(name = "电子围栏集群")
// private String sysfindname;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("groupCode", getGroupCode())
.append("groupName", getGroupName())
.append("groupType", getGroupType())
.append("state", getState())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
// .append("sysfindname", getSysfindname())
.append("remark", getRemark())
.toString();
}
}

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import com.muyu.common.core.xss.Xss;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.annotation.Excel.ColumnType;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.enterpise.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.muyu.warning.domain;
package com.muyu.enterpise.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package com.muyu.warning.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.annotation.Excel;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.muyu.warning.domain;
package com.muyu.enterpise.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

View File

@ -1,4 +1,4 @@
package com.muyu.warning.domain;
package com.muyu.enterpise.domain;
import com.muyu.common.core.annotation.Excel;
import lombok.*;

View File

@ -1,4 +1,5 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.common.system.domain.SysRole;

View File

@ -1,7 +1,7 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.system.domain.vo.TreeSelect;
import com.muyu.enterpise.domain.vo.TreeSelect;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.common.system.domain.SysUser;
import lombok.AllArgsConstructor;

View File

@ -1,6 +1,6 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.system.domain.vo.TreeSelect;
import com.muyu.enterpise.domain.vo.TreeSelect;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.common.system.domain.SysRole;
import com.muyu.common.system.domain.SysUser;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain.resp;
package com.muyu.enterpise.domain.resp;
import com.muyu.common.system.domain.SysUser;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain.vo;
package com.muyu.enterpise.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain.vo;
package com.muyu.enterpise.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

View File

@ -1,8 +1,8 @@
package com.muyu.system.domain.vo;
package com.muyu.enterpise.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.muyu.common.system.domain.SysDept;
import com.muyu.system.domain.SysMenu;
import com.muyu.enterpise.domain.SysMenu;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package com.muyu.warning.wx;
package com.muyu.enterpise.domain.vx;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;

View File

@ -16,7 +16,11 @@
</description>
<dependencies>
<dependency>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-boot-starter</artifactId>
<version>1.4.11</version>
</dependency>
<!-- SpringCloud Openfeign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
@ -40,7 +44,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Transmittable ThreadLocal -->
<dependency>
<groupId>com.alibaba</groupId>

View File

@ -13,7 +13,7 @@ public class DatasourceContent {
public final static String PASSWORD = "bawei2112A";
public final static String IP = "47.116.173.119";
public final static String IP = "127.0.0.1";
public final static Integer PORT = 3306;
}

View File

@ -24,6 +24,7 @@ public class DruidDataSourceFactory {
public DruidDataSource create(DataSourceInfo dataSourceInfo) {
DruidDataSource druidDataSource = new DruidDataSource();
druidDataSource.setUrl(dataSourceInfo.getUrl());
druidDataSource.setConnectTimeout(10000);
druidDataSource.setUsername(dataSourceInfo.getUserName());
druidDataSource.setPassword(dataSourceInfo.getPassword());
druidDataSource.setBreakAfterAcquireFailure(true);
@ -33,7 +34,7 @@ public class DruidDataSourceFactory {
log.info("{} -> 数据源连接成功", dataSourceInfo.getKey());
return druidDataSource;
} catch (SQLException throwables) {
log.error("数据源 {} 连接失败,用户名:{},密码 {}",dataSourceInfo.getUrl(),dataSourceInfo.getUserName(),dataSourceInfo.getPassword());
log.error("数据源 {} 连接失败,用户名:{},密码 {}, 原因:{}",dataSourceInfo.getUrl(),dataSourceInfo.getUserName(),dataSourceInfo.getPassword(), throwables);
return null;
}
}

View File

@ -1,5 +1,8 @@
package com.muyu.common.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.annotation.Excel.ColumnType;
import com.muyu.common.core.annotation.Excel.Type;
@ -28,6 +31,7 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
@ -35,6 +39,7 @@ public class SysUser extends BaseEntity {
* ID
*/
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
@TableId(type = IdType.AUTO)
private Long userId;
private Integer isAdmin;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.common.system.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.muyu.system.domain;
package com.muyu.common.system.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -22,7 +22,7 @@ public interface RemoteSaasService {
*
*
* @param firmCode
* @param username
* @param userName
* @param source
* @return
*/

View File

@ -3,12 +3,8 @@ package com.muyu.common.system.remote;
import com.muyu.common.core.constant.SecurityConstants;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.system.domain.SysEnt;
import com.muyu.common.system.domain.SysFirmUser;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.domain.*;
import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory;
import com.muyu.common.system.domain.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@ -40,6 +36,18 @@ public interface RemoteUserService {
@PostMapping("/ent/list")
public Result<List<SysEnt>> list (@RequestBody SysEnt sysEnt);
/**
*
*
* @param firmCode
* @param userName
* @param source
* @return
*/
@GetMapping("/user/info")
public Result<LoginUser> getUserInfo (@RequestParam("firmCode") String firmCode, @RequestParam("userName") String userName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
*
@ -59,4 +67,35 @@ public interface RemoteUserService {
*/
@PostMapping("/permission/getMenu")
public Set<String> getMenuPermission (@RequestBody SysUser user);
/**
*
*/
@GetMapping(value = "/dept/{deptId}")
public Result<SysDept> selectDeptById (@PathVariable("deptId") Long deptId);
/**
*
*
* @param user
*/
@PostMapping("/user/insertUserRole")
public void insertUserRole (@RequestBody SysUser user);
/**
*
*
* @param user
*/
@PostMapping("/user/insertUserPost")
public void insertUserPost (@RequestBody SysUser user);
/**
*
*/
@PostMapping("/user")
public Result addUser (@RequestBody SysUser user);
}

View File

@ -2,11 +2,8 @@ package com.muyu.common.system.remote.factory;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.system.domain.SysEnt;
import com.muyu.common.system.domain.SysFirmUser;
import com.muyu.common.system.domain.*;
import com.muyu.common.system.remote.RemoteUserService;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.domain.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
@ -44,6 +41,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
return Result.error("获取企业列表失败:" + throwable.getMessage());
}
@Override
public Result<LoginUser> getUserInfo(String firmCode, String userName, String source) {
return Result.error("获取用户信息失败:" + throwable.getMessage());
}
@Override
public Set<String> getRolePermission(SysUser user) {
return Set.of();
@ -54,6 +56,26 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
return Set.of();
}
@Override
public Result<SysDept> selectDeptById(Long deptId) {
return Result.error();
}
@Override
public void insertUserRole(SysUser user) {
log.warn("新增用户角色失败!");
}
@Override
public void insertUserPost(SysUser user) {
log.warn("新增用户权限失败!");
}
@Override
public Result addUser(SysUser user) {
return Result.error(throwable);
}
};
}
}

View File

@ -13,5 +13,6 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
public class CloudGatewayApplication {
public static void main (String[] args) {
SpringApplication.run(CloudGatewayApplication.class, args);
System.out.println("CloudGateway 模块启动成功!");
}
}

View File

@ -4,10 +4,10 @@ server:
# nacos线上地址
nacos:
addr: 47.116.173.119:8848
addr: 110.42.213.184:8848
user-name: nacos
password: nacos
namespace: one-saas
namespace: public
# Spring
spring:
@ -22,35 +22,35 @@ spring:
discovery:
# 服务注册地址
server-addr: ${nacos.addr}
# nacos用户名
username: ${nacos.user-name}
# nacos密码
password: ${nacos.password}
# # nacos用户名
# username: ${nacos.user-name}
# # nacos密码
# password: ${nacos.password}
# 命名空间
namespace: ${nacos.namespace}
config:
# 服务注册地址
server-addr: ${nacos.addr}
# nacos用户名
username: ${nacos.user-name}
# nacos密码
password: ${nacos.password}
# # nacos用户名
# username: ${nacos.user-name}
# # nacos密码
# password: ${nacos.password}
# 命名空间
namespace: ${nacos.namespace}
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
# 系统共享配置
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 系统环境Config共享配置
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 系统共享配置
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
sentinel:
# 取消控制台懒加载
eager: true
transport:
# 控制台地址
dashboard: 127.0.0.1:8718
dashboard: 110.42.213.184:8718
# nacos配置持久化
datasource:
ds1:

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>cloud-breakdown-client</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown-common</artifactId>
<version>3.6.3</version>
</dependency>
</dependencies>
</project>

View File

@ -1,93 +0,0 @@
//package com.muyu.breakdown.DTO;
//
//
//import com.muyu.breakdown.domain.Messages;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.sql.*;
//import java.util.*;
//
///**
// * @ ToolIntelliJ IDEA
// * @ AuthorCHX
// * @ Date2024-09-18-15:00
// * @ Version1.0
// * @ Description数据库连接层
// * @author Lenovo
// */
//@Component
//public class MessageDTO {
// private static final String DB_URL = "jdbc:mysql://106.54.193.225:3306/one";
// private static final String USER = "root";
// private static final String PASSWORD = "bawei2112A";
//
// // 2. 建立数据库连接
// Connection connection;
// // 构造函数,初始化数据库连接
// // 保存消息到数据库
// public void saveMessage(Messages message) {
// String sql = "INSERT INTO sys_messages (sender_id, receiver_id, content) VALUES (?, ?, ?)";
// try {
// Class.forName("com.mysql.cj.jdbc.Driver");
// } catch (ClassNotFoundException e) {
// throw new RuntimeException(e);
// }
// try {
// connection = DriverManager.getConnection(DB_URL, USER, PASSWORD);
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
// preparedStatement.setInt(1, message.getSenderId());
// preparedStatement.setInt(2, message.getReceiverId());
// preparedStatement.setString(3, message.getContent());
// // 执行添加操作
// preparedStatement.executeUpdate();
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// try {
// connection.close();
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// }
//
// // 获取所有消息
// public List<Messages> getAllMessages(int receiverId){
// String sql = "SELECT * FROM sys_messages WHERE receiver_id = ?";
// try {
// Class.forName("com.mysql.cj.jdbc.Driver");
// } catch (ClassNotFoundException e) {
// throw new RuntimeException(e);
// }
// List<Messages> messages = new ArrayList<>();
// try {
// connection = DriverManager.getConnection(DB_URL, USER, PASSWORD);
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
// preparedStatement.setInt(1, receiverId);
// // 执行查询操作
// ResultSet rs = preparedStatement.executeQuery();
// while (rs.next()) {
// Messages message = new Messages(rs.getInt("sender_id"), receiverId, rs.getString("content"));
//
// // 添加到消息列表
// messages.add(message);
// }
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// try {
// connection.close();
// } catch (SQLException e) {
// throw new RuntimeException(e);
// }
// // 返回消息列表
// return messages;
// }
//
//}

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>cloud-breakdown-remote</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown-common</artifactId>
<version>3.6.3</version>
</dependency>
</dependencies>
</project>

View File

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>cloud-breakdown-server</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- MuYu Common DataSource -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-datasource</artifactId>
</dependency>
<!-- MuYu Common DataScope -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-datascope</artifactId>
</dependency>
<!-- MuYu Common Log -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-log</artifactId>
</dependency>
<!-- 接口模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-api-doc</artifactId>
</dependency>
<!-- XllJob定时任务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-xxl</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-rabbit</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-breakdown-common</artifactId>
<version>3.6.3</version>
</dependency>
</dependencies>
</project>

View File

@ -1,37 +0,0 @@
package com.muyu.breakdown.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @ ToolIntelliJ IDEA
* @ AuthorCHX
* @ Date2024-09-17-15:41
* @ Version1.0
* @ Descriptionmybatisplus
* @author Lenovo
*/
//@Configuration
//public class MybatisPlusConfig {
// /**
// * 添加分页插件
// */
// @Bean
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// // 如果配置多个插件, 切记分页最后添加
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
// // 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
// return interceptor;
// }
// @Bean
// public MybatisConfiguration mybatisConfiguration(){
// MybatisConfiguration configuration = new MybatisConfiguration();
// return configuration;
// }
//
//}

View File

@ -1,2 +0,0 @@
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}

View File

@ -1,60 +0,0 @@
# Tomcat
server:
port: 9702
# nacos线上地址
nacos:
addr: 106.54.193.225:8848
user-name: nacos
password: nacos
namespace: one
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
# Spring
spring:
amqp:
deserialization:
trust:
all: true
main:
allow-bean-definition-overriding: true
application:
# 应用名称
name: cloud-breakdown
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: ${nacos.addr}
# nacos用户名
username: ${nacos.user-name}
# nacos密码
password: ${nacos.password}
# 命名空间
namespace: ${nacos.namespace}
config:
# 服务注册地址
server-addr: ${nacos.addr}
# nacos用户名
username: ${nacos.user-name}
# nacos密码
password: ${nacos.password}
# 命名空间
namespace: ${nacos.namespace}
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
# 系统共享配置
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 系统环境Config共享配置
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# xxl-job 配置文件
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# rabbit 配置文件
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
logging:
level:
com.muyu.breakdown.mapper: DEBUG

View File

@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/cloud-breakdown"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.muyu" level="info"/>
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn"/>
<root level="info">
<appender-ref ref="console"/>
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info"/>
<appender-ref ref="file_error"/>
</root>
</configuration>

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/cloud-breakdown"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.sky.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 使用gRpc将日志发送到skywalking服务端 -->
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<Pattern>${log.sky.pattern}</Pattern>
</layout>
</encoder>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.muyu" level="info"/>
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn"/>
<root level="info">
<appender-ref ref="GRPC_LOG"/>
<appender-ref ref="console"/>
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info"/>
<appender-ref ref="file_error"/>
</root>
</configuration>

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/cloud-breakdown"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.sky.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 使用gRpc将日志发送到skywalking服务端 -->
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<Pattern>${log.sky.pattern}</Pattern>
</layout>
</encoder>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.muyu" level="info"/>
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn"/>
<root level="info">
<appender-ref ref="GRPC_LOG"/>
<appender-ref ref="console"/>
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info"/>
<appender-ref ref="file_error"/>
</root>
</configuration>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.muyu</groupId>
<artifactId>cloud-modules</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>cloud-breakdown</artifactId>
<packaging>pom</packaging>
<modules>
<module>cloud-breakdown-common</module>
<module>cloud-breakdown-server</module>
<module>cloud-breakdown-remote</module>
<module>cloud-breakdown-client</module>
</modules>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -53,7 +53,10 @@
<groupId>com.muyu</groupId>
<artifactId>cloud-common-system</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-enterprise-operation</artifactId>
</dependency>
<!-- 接口模块 -->
<dependency>
<groupId>com.muyu</groupId>

View File

@ -13,5 +13,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
public class CloudFileApplication {
public static void main (String[] args) {
SpringApplication.run(CloudFileApplication.class, args);
System.out.println("CloudFile 模块启动成功!");
}
}

View File

@ -4,10 +4,10 @@ server:
# nacos线上地址
nacos:
addr: 47.116.173.119:8848
addr: 110.42.213.184:8848
user-name: nacos
password: nacos
namespace: one-saas
namespace: public
# Spring
spring:

View File

@ -4,7 +4,7 @@ server:
# nacos线上地址
nacos:
addr: 47.116.173.119:8848
addr: 127.0.0.1:8848
user-name: nacos
password: nacos
namespace: one-saas

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.gen.mapper.GenTableColumnMapper">
<resultMap type="com.muyu.gen.domain.GenTableColumn" id="GenTableColumnResult">
<resultMap type="com.muyu.enterpise.domain.GenTableColumn" id="GenTableColumnResult">
<id property="columnId" column="column_id" />
<result property="tableId" column="table_id" />
<result property="columnName" column="column_name" />
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
</sql>
<select id="selectGenTableColumnListByTableId" parameterType="com.muyu.gen.domain.GenTableColumn" resultMap="GenTableColumnResult">
<select id="selectGenTableColumnListByTableId" parameterType="com.muyu.enterpise.domain.GenTableColumn" resultMap="GenTableColumnResult">
<include refid="selectGenTableColumnVo"/>
where table_id = #{tableId}
order by sort
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by ordinal_position
</select>
<insert id="insertGenTableColumn" parameterType="com.muyu.gen.domain.GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
<insert id="insertGenTableColumn" parameterType="com.muyu.enterpise.domain.GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
insert into gen_table_column (
<if test="tableId != null and tableId != ''">table_id,</if>
<if test="columnName != null and columnName != ''">column_name,</if>
@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateGenTableColumn" parameterType="com.muyu.gen.domain.GenTableColumn">
<update id="updateGenTableColumn" parameterType="com.muyu.enterpise.domain.GenTableColumn">
update gen_table_column
<set>
<if test="columnComment != null">column_comment = #{columnComment},</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.gen.mapper.GenTableMapper">
<resultMap type="com.muyu.gen.domain.GenTable" id="GenTableResult">
<resultMap type="com.muyu.enterpise.domain.GenTable" id="GenTableResult">
<id property="tableId" column="table_id" />
<result property="dbName" column="db_name" />
<result property="tableName" column="table_name" />
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" />
</resultMap>
<resultMap type="com.muyu.gen.domain.GenTableColumn" id="GenTableColumnResult">
<resultMap type="com.muyu.enterpise.domain.GenTableColumn" id="GenTableColumnResult">
<id property="columnId" column="column_id" />
<result property="tableId" column="table_id" />
<result property="columnName" column="column_name" />
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
</sql>
<select id="selectGenTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
<select id="selectGenTableList" parameterType="com.muyu.enterpise.domain.GenTable" resultMap="GenTableResult">
<include refid="selectGenTableVo"/>
<where>
<if test="tableName != null and tableName != ''">
@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectDbTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
<select id="selectDbTableList" parameterType="com.muyu.enterpise.domain.GenTable" resultMap="GenTableResult">
select table_name, table_comment, create_time, update_time from information_schema.tables
where
<include refid="select_dbName"/>
@ -155,7 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selFilterableByDbNameAndTableName" resultType="java.lang.String">
</select>
<select id="selectDbTableListAll" resultType="com.muyu.gen.domain.GenTableResp">
<select id="selectDbTableListAll" resultType="com.muyu.enterpise.domain.GenTableResp">
select table_name,table_comment,table_schema db_name from information_schema.tables
where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%'
and table_schema in (select table_schema from information_schema.tables
@ -163,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY table_schema)
</select>
<insert id="insertGenTable" parameterType="com.muyu.gen.domain.GenTable" useGeneratedKeys="true" keyProperty="tableId">
<insert id="insertGenTable" parameterType="com.muyu.enterpise.domain.GenTable" useGeneratedKeys="true" keyProperty="tableId">
insert into gen_table (
<if test="dbName != null">db_name,</if>
<if test="tableName != null">table_name,</if>
@ -199,7 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateGenTable" parameterType="com.muyu.gen.domain.GenTable">
<update id="updateGenTable" parameterType="com.muyu.enterpise.domain.GenTable">
update gen_table
<set>
<if test="dbName != null">db_name = #{dbName},</if>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cloud-modules</artifactId>
<groupId>com.muyu</groupId>
<version>3.6.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-modules-operations</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- MuYu Common DataSource -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-datasource</artifactId>
</dependency>
<!-- MuYu Common DataScope -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-datascope</artifactId>
</dependency>
<!-- MuYu Common Log -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-log</artifactId>
</dependency>
<!-- 接口模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-api-doc</artifactId>
</dependency>
<!-- XllJob定时任务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-xxl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>2.7.18</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-saas</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>cloud-common-enterprise-operation</artifactId>
<version>3.6.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,23 +1,14 @@
package com.muyu;
package com.muyu.operation;
import com.muyu.common.security.annotation.EnableCustomConfig;
import com.muyu.common.security.annotation.EnableMyFeignClients;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @ ToolIntelliJ IDEA
* @ AuthorCHX
* @ Date2024-09-17-15:00
* @ Version1.0
* @ Description
* @author Lenovo
*/
@EnableCustomConfig
@EnableMyFeignClients
@SpringBootApplication
public class BreakDownApplication {
public class OperationApplication {
public static void main(String[] args) {
SpringApplication.run(BreakDownApplication.class, args);
SpringApplication.run(OperationApplication.class, args);
}
}

View File

@ -0,0 +1,37 @@
package com.muyu.operation.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @ ToolIntelliJ IDEA
* @ AuthorCHX
* @ Date2024-09-17-15:41
* @ Version1.0
* @ Descriptionmybatisplus
* @author Lenovo
*/
@Configuration
public class MybatisPlusConfig {
/**
*
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 如果配置多个插件, 切记分页最后添加
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
// 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
return interceptor;
}
@Bean
public MybatisConfiguration mybatisConfiguration(){
MybatisConfiguration configuration = new MybatisConfiguration();
return configuration;
}
}

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.config;
package com.muyu.operation.config;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
@ -6,6 +6,9 @@ import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
*
* */

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.config;
package com.muyu.operation.config;
import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
@ -6,9 +6,11 @@ import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
/**
*
* */
@Configuration
public class RabbitMQDirectConfig {
/**
@ -27,7 +29,7 @@ public class RabbitMQDirectConfig {
map.put("x-delayed-letter-exchange","direct");
map.put("x-delayed-routing-key","directduanxin");
map.put("x-message-ttl",10000);
return QueueBuilder.durable("directduanxin").withArguments(map).build();
return (Queue) QueueBuilder.durable("directduanxin").withArguments(map).build();
}

View File

@ -1,4 +1,4 @@
package com.muyu.breakdown.config;
package com.muyu.operation.config;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;

View File

@ -0,0 +1,48 @@
package com.muyu.operation.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.io.File;
/**
*
*
* @author muyu
*/
@Configuration
public class ResourcesConfig implements WebMvcConfigurer {
/**
*
*/
@Value("${file.prefix}")
public String localFilePrefix;
/**
*
*/
@Value("${file.path}")
private String localFilePath;
@Override
public void addResourceHandlers (ResourceHandlerRegistry registry) {
/** 本地文件上传路径 */
registry.addResourceHandler(localFilePrefix + "/**")
.addResourceLocations("file:" + localFilePath + File.separator);
}
/**
*
*/
@Override
public void addCorsMappings (CorsRegistry registry) {
// 设置允许跨域的路由
registry.addMapping(localFilePrefix + "/**")
// 设置允许跨域请求的域名
.allowedOrigins("*")
// 设置允许的方法
.allowedMethods("GET");
}
}

View File

@ -1,20 +1,23 @@
package com.muyu.breakdown.controller;
package com.muyu.operation.controller;
import com.muyu.breakdown.domain.BreakDown;
import com.muyu.breakdown.domain.MessageMap;
import com.muyu.breakdown.service.BreakDownService;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.security.utils.SecurityUtils;
import com.muyu.enterpise.domain.BreakDown;
import com.muyu.enterpise.domain.MessageMap;
import com.muyu.operation.service.BreakDownService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

View File

@ -1,10 +1,12 @@
package com.muyu.breakdown.controller;
package com.muyu.operation.controller;
import java.util.Arrays;
import java.util.List;
import com.muyu.breakdown.domain.FaultLog;
import com.muyu.breakdown.service.IFaultLogService;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.enterpise.domain.FaultLog;
import com.muyu.operation.service.IFaultLogService;
import jakarta.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
@ -18,10 +20,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.validation.annotation.Validated;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller

View File

@ -1,11 +1,11 @@
package com.muyu.breakdown.controller;
package com.muyu.operation.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.breakdown.domain.Messages;
import com.muyu.breakdown.service.BreakDownService;
import com.muyu.breakdown.service.StationMessageService;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.enterpise.domain.Messages;
import com.muyu.operation.service.StationMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@ -1,7 +1,7 @@
package com.muyu.breakdown.controller;
package com.muyu.operation.controller;
import com.muyu.breakdown.service.SysCarMessageService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.operation.service.SysCarMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

View File

@ -0,0 +1,77 @@
package com.muyu.operation.controller;
import java.util.Arrays;
import java.util.List;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.enterpise.domain.SysCorpuscle;
import com.muyu.operation.service.ISysCorpuscleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author muyu
* @date 2024-09-17
*/
@RestController
@RequestMapping("/carRail")
public class SysCorpuscleController extends BaseController
{
@Autowired
private ISysCorpuscleService sysCorpuscleService;
/**
*
*/
@RequiresPermissions("carRail:carRail:list")
@GetMapping("/list")
public Result<TableDataInfo<SysCorpuscle>> list(SysCorpuscle sysCorpuscle)
{
startPage();
List<SysCorpuscle> list = sysCorpuscleService.selectSysCorpuscleList(sysCorpuscle);
return getDataTable(list);
}
@RequiresPermissions("carRail:corpuscle:add")
@PostMapping
public Result<Integer> add(
@Validated @RequestBody SysCorpuscle sysCorpuscle)
{
return toAjax(sysCorpuscleService.save(sysCorpuscle));
}
/**
*
*/
@RequiresPermissions("carRail:corpuscle:edit")
@PutMapping
public Result<Integer> edit(
@Validated @RequestBody SysCorpuscle sysCorpuscle)
{
return toAjax(sysCorpuscleService.updateById(sysCorpuscle));
}
/**
*
*/
@RequiresPermissions("carRail:corpuscle:remove")
@DeleteMapping("/{ids}")
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
{
sysCorpuscleService.removeBatchByIds(Arrays.asList(ids));
return success();
}
}

View File

@ -0,0 +1,109 @@
package com.muyu.operation.controller;
import java.util.Arrays;
import java.util.List;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.enterpise.domain.SysFence;
import com.muyu.operation.service.ISysFenceService;
import jakarta.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import org.springframework.validation.annotation.Validated;
/**
* Controller
*
* @author muyu
* @date 2024-09-17
*/
@RestController
@RequestMapping("/fence")
public class SysFenceController extends BaseController
{
@Resource
private ISysFenceService sysFenceService;
/**
*
*/
@RequiresPermissions("fence:fence:list")
@GetMapping("/list")
public Result<TableDataInfo<SysFence>> list(SysFence sysFence)
{
startPage();
List<SysFence> list = sysFenceService.selectSysFenceList(sysFence);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("fence:fence:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysFence sysFence)
{
List<SysFence> list = sysFenceService.selectSysFenceList(sysFence);
ExcelUtil<SysFence> util = new ExcelUtil<SysFence>(SysFence.class);
util.exportExcel(response, list, "围栏组数据");
}
/**
*
*/
@RequiresPermissions("fence:fence:query")
@GetMapping(value = "/{id}")
public Result<List<SysFence>> getInfo(@PathVariable("id") Long id)
{
return success(sysFenceService.selectSysFenceById(id));
}
/**
*
*/
@RequiresPermissions("fence:fence:add")
@PostMapping
public Result<Integer> add(
@Validated @RequestBody SysFence sysFence)
{
return toAjax(sysFenceService.save(sysFence));
}
/**
*
*/
@RequiresPermissions("fence:fence:edit")
@PutMapping
public Result<Integer> edit(
@Validated @RequestBody SysFence sysFence)
{
return toAjax(sysFenceService.updateById(sysFence));
}
/**
*
*/
@RequiresPermissions("fence:fence:remove")
@DeleteMapping("/{ids}")
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
{
sysFenceService.removeBatchByIds(Arrays.asList(ids));
return success();
}
}

View File

@ -0,0 +1,103 @@
package com.muyu.operation.controller;
import com.muyu.cloud.common.many.datasource.holder.DynamicDataSourceHolder;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.StringUtils;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.InnerAuth;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.security.utils.SecurityUtils;
import com.muyu.common.system.domain.SysDept;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.remote.RemoteUserService;
import com.muyu.operation.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author:
* @Name: SysUser
* @Description:
* @CreatedDate: 2024/9/23 8:55
* @FilePath: com.muyu.system.saas.controller
*/
@Slf4j
@RestController
@RequestMapping("/user")
public class SysUserController extends BaseController {
@Resource
private RemoteUserService remoteUserService;
@Resource
private SysUserService userService;
/**
*
* @param user
* @return
*/
@GetMapping("/list")
public Result<TableDataInfo<SysUser>> list(SysUser user){
startPage();
return getDataTable(userService.selectUserList(user));
}
@InnerAuth
@GetMapping("/info")
public Result<SysUser> info (
@RequestParam("firmCode") String firmCode,
@RequestParam("userName") String userName) {
DynamicDataSourceHolder.setDynamicDataSourceKey(firmCode);
SysUser sysUser = userService.selectUserByUserName(userName);
if (StringUtils.isNull(sysUser)) {
return error("用户名或密码错误");
}
return Result.success(sysUser);
}
/**
*
*/
@RequiresPermissions("system:user:add")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping
public Result add (@Validated @RequestBody SysUser user) {
SysUser checked = userService.checkUserNameUnique(user);
if (ObjectUtils.isNotEmpty(checked)) {
if (checked.getUserName().equals(user.getUserName())) {
return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
} else if (StringUtils.isNotEmpty(user.getPhonenumber()) && checked.getPhonenumber().equals(user.getPhonenumber())) {
return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
} else if (StringUtils.isNotEmpty(user.getEmail()) && checked.getEmail().equals(user.getEmail())) {
return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
}
user.setCreateBy(SecurityUtils.getUsername());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
String saasKey = SecurityUtils.getSaasKey();
if ("FIRM".equals(saasKey)) {
SysDept sysDept = remoteUserService.selectDeptById(user.getDeptId()).getData();
if (ObjectUtils.isEmpty(sysDept)){
return error("部门不存在!");
}
user.setFirmCode(sysDept.getFirmCode());
}else {
user.setFirmCode(saasKey);
}
userService.save(user);
userService.insertUserPost(user);
userService.insertUserRole(user);
return remoteUserService.addUser(user);
}
}

View File

@ -1,7 +1,8 @@
package com.muyu.breakdown.mapper;
package com.muyu.operation.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.breakdown.domain.BreakDown;
import com.muyu.enterpise.domain.BreakDown;
import org.apache.ibatis.annotations.Mapper;
/**

View File

@ -1,8 +1,8 @@
package com.muyu.breakdown.mapper;
package com.muyu.operation.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.breakdown.domain.FaultLog;
import com.muyu.enterpise.domain.FaultLog;
import org.apache.ibatis.annotations.Mapper;
/**

View File

@ -1,8 +1,8 @@
package com.muyu.breakdown.mapper;
package com.muyu.operation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.breakdown.domain.Messages;
import com.muyu.enterpise.domain.Messages;
import org.apache.ibatis.annotations.Mapper;
/**

View File

@ -1,7 +1,8 @@
package com.muyu.breakdown.mapper;
package com.muyu.operation.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.breakdown.domain.SysCarMessage;
import com.muyu.enterpise.domain.SysCarMessage;
import org.apache.ibatis.annotations.Mapper;
/**

View File

@ -0,0 +1,20 @@
package com.muyu.operation.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.enterpise.domain.SysCorpuscle;
/**
* Mapper
*
* @author muyu
* @date 2024-09-17
*/
public interface SysCorpuscleMapper extends BaseMapper<SysCorpuscle>{
List<SysCorpuscle> selectCarRail(SysCorpuscle sysCorpuscle);
boolean addCarRail(SysCorpuscle sysCorpuscle);
}

View File

@ -0,0 +1,15 @@
package com.muyu.operation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.enterpise.domain.SysFence;
/**
* Mapper
*
* @author muyu
* @date 2024-09-17
*/
public interface SysFenceMapper extends BaseMapper<SysFence> {
}

View File

@ -1,4 +1,4 @@
package com.muyu.system.saas.mapper;
package com.muyu.operation.mapper;
import com.muyu.common.system.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
@ -19,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
SysUser selectUserByUserName(@Param("userName") String userName);
}

View File

@ -0,0 +1,49 @@
package com.muyu.operation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysUserPost;
import java.util.List;
/**
*
*
* @author muyu
*/
public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
/**
* ID
*
* @param userId ID
*
* @return
*/
public int deleteUserPostByUserId (Long userId);
/**
* ID使
*
* @param postId ID
*
* @return
*/
public int countUserPostById (Long postId);
/**
*
*
* @param ids ID
*
* @return
*/
public int deleteUserPost (Long[] ids);
/**
*
*
* @param userPostList
*
* @return
*/
public int batchUserPost (List<SysUserPost> userPostList);
}

View File

@ -0,0 +1,69 @@
package com.muyu.operation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysUserRole;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author muyu
*/
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
/**
* ID
*
* @param userId ID
*
* @return
*/
public int deleteUserRoleByUserId (Long userId);
/**
*
*
* @param ids ID
*
* @return
*/
public int deleteUserRole (Long[] ids);
/**
* ID使
*
* @param roleId ID
*
* @return
*/
public int countUserRoleByRoleId (Long roleId);
/**
*
*
* @param userRoleList
*
* @return
*/
public int batchUserRole (List<SysUserRole> userRoleList);
/**
*
*
* @param userRole
*
* @return
*/
public int deleteUserRoleInfo (SysUserRole userRole);
/**
*
*
* @param roleId ID
* @param userIds ID
*
* @return
*/
public int deleteUserRoleInfos (@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
}

View File

@ -1,8 +1,10 @@
package com.muyu.breakdown.service;
package com.muyu.operation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.breakdown.domain.BreakDown;
import com.muyu.breakdown.domain.MessageMap;
import com.muyu.enterpise.domain.BreakDown;
import com.muyu.enterpise.domain.MessageMap;
import java.util.List;
import java.util.Map;

View File

@ -1,8 +1,9 @@
package com.muyu.breakdown.service;
package com.muyu.operation.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.breakdown.domain.FaultLog;
import com.muyu.enterpise.domain.FaultLog;
/**
* Service

View File

@ -0,0 +1,25 @@
package com.muyu.operation.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.enterpise.domain.SysCorpuscle;
/**
* Service
*
* @author muyu
* @date 2024-09-17
*/
public interface ISysCorpuscleService extends IService<SysCorpuscle> {
/**
*
*
* @param sysCorpuscle
* @return
*/
public List<SysCorpuscle> selectSysCorpuscleList(SysCorpuscle sysCorpuscle);
boolean checkIdUnique(SysCorpuscle sysCorpuscle);
}

View File

@ -0,0 +1,39 @@
package com.muyu.operation.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.enterpise.domain.SysFence;
/**
* Service
*
* @author muyu
* @date 2024-09-17
*/
public interface ISysFenceService extends IService<SysFence> {
/**
*
*
* @param id
* @return
*/
public SysFence selectSysFenceById(Long id);
/**
*
*
* @param sysFence
* @return
*/
public List<SysFence> selectSysFenceList(SysFence sysFence);
/**
* id
* @param sysFence
* @return
*/
Boolean checkIdUnique(SysFence sysFence);
}

View File

@ -1,7 +1,7 @@
package com.muyu.breakdown.service;
package com.muyu.operation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.breakdown.domain.Messages;
import com.muyu.enterpise.domain.Messages;
import java.util.List;

View File

@ -1,7 +1,8 @@
package com.muyu.breakdown.service;
package com.muyu.operation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.breakdown.domain.SysCarMessage;
import com.muyu.enterpise.domain.SysCarMessage;
/**
* @ ToolIntelliJ IDEA

View File

@ -0,0 +1,45 @@
package com.muyu.operation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.common.system.domain.SysUser;
import java.util.List;
/**
* @Author:
* @Name: SysUser
* @Description:
* @CreatedDate: 2024/9/23 8:55
* @FilePath: com.muyu.system.saas.service.impl
*/
public interface SysUserService extends IService<SysUser> {
SysUser selectUserByUserName(String userName);
/**
*
*
* @param user
*
* @return
*/
public SysUser checkUserNameUnique (SysUser user);
/**
*
*
* @param user
*/
public void insertUserPost (SysUser user);
/**
*
*
* @param user
*/
public void insertUserRole (SysUser user);
List<SysUser> selectUserList(SysUser user);
}

View File

@ -1,22 +1,20 @@
package com.muyu.breakdown.service.impl;
package com.muyu.operation.service.imp;
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.muyu.breakdown.domain.BreakDown;
import com.muyu.breakdown.domain.MessageMap;
import com.muyu.breakdown.domain.SysCarMessage;
import com.muyu.breakdown.mapper.BreakDownMapper;
import com.muyu.breakdown.service.BreakDownService;
import com.muyu.breakdown.service.SysCarMessageService;
import com.muyu.common.core.utils.StringUtils;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import com.muyu.enterpise.domain.BreakDown;
import com.muyu.enterpise.domain.MessageMap;
import com.muyu.operation.mapper.BreakDownMapper;
import com.muyu.operation.service.BreakDownService;
import com.muyu.operation.service.SysCarMessageService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

View File

@ -1,11 +1,11 @@
package com.muyu.breakdown.service.impl;
package com.muyu.operation.service.imp;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.breakdown.domain.FaultLog;
import com.muyu.breakdown.mapper.FaultLogMapper;
import com.muyu.breakdown.service.IFaultLogService;
import com.muyu.common.core.utils.StringUtils;
import com.muyu.enterpise.domain.FaultLog;
import com.muyu.operation.mapper.FaultLogMapper;
import com.muyu.operation.service.IFaultLogService;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

View File

@ -1,10 +1,10 @@
package com.muyu.breakdown.service.impl;
package com.muyu.operation.service.imp;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.breakdown.domain.Messages;
import com.muyu.breakdown.mapper.StationMessageMapper;
import com.muyu.breakdown.service.StationMessageService;
import com.muyu.enterpise.domain.Messages;
import com.muyu.operation.mapper.StationMessageMapper;
import com.muyu.operation.service.StationMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Some files were not shown because too many files have changed in this diff Show More