feat():完善资产授权

ruoyi_test
sunshine7058 2024-05-04 14:19:40 +08:00
parent 366c7b4893
commit a35dae8479
22 changed files with 981 additions and 324 deletions

View File

@ -0,0 +1,97 @@
package com.muyu.data.source.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.annotation.Excel;
import com.muyu.data.source.domain.req.AssetAuthInfoQueryReq;
import com.muyu.data.source.domain.req.AssetAuthInfoSaveReq;
import com.muyu.data.source.domain.req.AssetAuthInfoEditReq;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* asset_auth_info
*
* @author hufangming
* @date 2024-04-29
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("asset_auth_info")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AssetAuthInfo", description = "资产授权")
public class AssetAuthInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id",type = IdType.AUTO)
@ApiModelProperty(name = "主键", value = "主键")
private Long id;
/** 授权id */
@Excel(name = "授权id")
@ApiModelProperty(name = "授权id", value = "授权id")
private Long authId;
/** id类型 */
@Excel(name = "id类型")
@ApiModelProperty(name = "id类型", value = "id类型")
private String idType;
/** 授权数据 */
@Excel(name = "授权数据")
@ApiModelProperty(name = "授权数据", value = "授权数据")
private String authData;
/** 授权类型 */
@Excel(name = "授权类型")
@ApiModelProperty(name = "授权类型", value = "授权类型")
private String authType;
/**
*
*/
public static AssetAuthInfo queryBuild( AssetAuthInfoQueryReq assetAuthInfoQueryReq){
return AssetAuthInfo.builder()
.authId(assetAuthInfoQueryReq.getAuthId())
.idType(assetAuthInfoQueryReq.getIdType())
.authData(assetAuthInfoQueryReq.getAuthData())
.authType(assetAuthInfoQueryReq.getAuthType())
.build();
}
/**
*
*/
public static AssetAuthInfo saveBuild(AssetAuthInfoSaveReq assetAuthInfoSaveReq){
return AssetAuthInfo.builder()
.authId(assetAuthInfoSaveReq.getAuthId())
.idType(assetAuthInfoSaveReq.getIdType())
.authData(assetAuthInfoSaveReq.getAuthData())
.authType(assetAuthInfoSaveReq.getAuthType())
.build();
}
/**
*
*/
public static AssetAuthInfo editBuild(Long id, AssetAuthInfoEditReq assetAuthInfoEditReq){
return AssetAuthInfo.builder()
.id(id)
.authId(assetAuthInfoEditReq.getAuthId())
.idType(assetAuthInfoEditReq.getIdType())
.authData(assetAuthInfoEditReq.getAuthData())
.authType(assetAuthInfoEditReq.getAuthType())
.build();
}
}

View File

@ -0,0 +1,42 @@
package com.muyu.data.source.domain.req;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* asset_auth_info
*
* @author hufangming
* @date 2024-04-29
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "AssetAuthInfoEditReq", description = "资产授权")
public class AssetAuthInfoEditReq extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 授权id */
@ApiModelProperty(name = "授权id", value = "授权id")
private Long authId;
/** id类型 */
@ApiModelProperty(name = "id类型", value = "id类型")
private String idType;
/** 授权数据 */
@ApiModelProperty(name = "授权数据", value = "授权数据")
private String authData;
/** 授权类型 */
@ApiModelProperty(name = "授权类型", value = "授权类型")
private String authType;
}

View File

@ -0,0 +1,42 @@
package com.muyu.data.source.domain.req;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* asset_auth_info
*
* @author hufangming
* @date 2024-04-29
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "AssetAuthInfoQueryReq", description = "资产授权")
public class AssetAuthInfoQueryReq extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 授权id */
@ApiModelProperty(name = "授权id", value = "授权id")
private Long authId;
/** id类型 */
@ApiModelProperty(name = "id类型", value = "id类型")
private String idType;
/** 授权数据 */
@ApiModelProperty(name = "授权数据", value = "授权数据")
private String authData;
/** 授权类型 */
@ApiModelProperty(name = "授权类型", value = "授权类型")
private String authType;
}

View File

@ -0,0 +1,46 @@
package com.muyu.data.source.domain.req;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity;
/**
* asset_auth_info
*
* @author hufangming
* @date 2024-04-29
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "AssetAuthInfoSaveReq", description = "资产授权")
public class AssetAuthInfoSaveReq extends BaseEntity {
/** 授权id */
@ApiModelProperty(name = "授权id", value = "授权id")
private Long authId;
/** id类型 */
@ApiModelProperty(name = "id类型", value = "id类型")
private String idType;
/** 授权数据 */
@ApiModelProperty(name = "授权数据", value = "授权数据")
private String authData;
/** 授权类型 */
@ApiModelProperty(name = "授权类型", value = "授权类型")
private String authType;
}

View File

@ -0,0 +1,27 @@
package com.muyu.data.source.domain.req;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author HuFangMing
* @ClassName: DictTypeReq
* @createTime: 2024/5/1 16:36
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public class DictTypeReq {
/**
* id
*/
private Integer assetId;
/**
*
*/
private String dictType;
}

View File

@ -0,0 +1,111 @@
package com.muyu.data.source.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
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.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.data.source.domain.AssetAuthInfo;
import com.muyu.data.source.domain.req.AssetAuthInfoQueryReq;
import com.muyu.data.source.domain.req.AssetAuthInfoSaveReq;
import com.muyu.data.source.domain.req.AssetAuthInfoEditReq;
import com.muyu.data.source.service.AssetAuthInfoService;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author hufangming
* @date 2024-04-29
*/
@Api(tags = "资产授权")
@RestController
@RequestMapping("/asset_auth")
public class AssetAuthInfoController extends BaseController {
@Autowired
private AssetAuthInfoService assetAuthInfoService;
/**
*
*/
@ApiOperation("获取资产授权列表")
@RequiresPermissions("data:asset_auth:list")
@PostMapping("/list")
public Result<List<AssetAuthInfo>> list(AssetAuthInfoQueryReq assetAuthInfoQueryReq) {
startPage();
List<AssetAuthInfo> list = assetAuthInfoService.list(AssetAuthInfo.queryBuild(assetAuthInfoQueryReq));
return Result.success(list);
}
/**
*
*/
@ApiOperation("导出资产授权列表")
@RequiresPermissions("data:asset_auth:export")
@Log(title = "资产授权", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AssetAuthInfo assetAuthInfo) {
List<AssetAuthInfo> list = assetAuthInfoService.list(assetAuthInfo);
ExcelUtil<AssetAuthInfo> util = new ExcelUtil<AssetAuthInfo>(AssetAuthInfo.class);
util.exportExcel(response, list, "资产授权数据");
}
/**
*
*/
@ApiOperation("获取资产授权详细信息")
@RequiresPermissions("data:asset_auth:query")
@GetMapping(value = "/{id}")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
public Result<AssetAuthInfo> getInfo(@PathVariable("id") Long id) {
return Result.success(assetAuthInfoService.getById(id));
}
/**
*
*/
@Log(title = "资产授权", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增资产授权")
public Result<String> add(@RequestBody AssetAuthInfoSaveReq assetAuthInfoSaveReq) {
return toAjax(assetAuthInfoService.save(AssetAuthInfo.saveBuild(assetAuthInfoSaveReq)));
}
/**
*
*/
@RequiresPermissions("data:asset_auth:edit")
@Log(title = "资产授权", businessType = BusinessType.UPDATE)
@PutMapping("/{id}")
@ApiOperation("修改资产授权")
public Result<String> edit(@PathVariable Long id, @RequestBody AssetAuthInfoEditReq assetAuthInfoEditReq) {
return toAjax(assetAuthInfoService.updateById(AssetAuthInfo.editBuild(id,assetAuthInfoEditReq)));
}
/**
*
*/
@RequiresPermissions("data:asset_auth:remove")
@Log(title = "资产授权", businessType = BusinessType.DELETE)
@DeleteMapping("/deletes/{ids}")
@ApiOperation("删除资产授权")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
public Result<String> remove(@PathVariable List<Long> ids) {
return toAjax(assetAuthInfoService.removeBatchByIds(ids));
}
}

View File

@ -160,16 +160,7 @@ public class DataSourceController extends BaseController {
return Result.success(list);
}
/**
*
*/
// @RequiresPermissions("data:source:addtbledate")
// @PostMapping("/addTableData")
// public Result addTbleDate(@RequestBody ShowTableReq showTableReq){
//
// dataSourceService.addTbleDate(showTableReq);
// return Result.success();
// }

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.common.core.domain.Result;
import com.muyu.data.source.domain.DictData;
import com.muyu.data.source.domain.DictType;
import com.muyu.data.source.domain.req.DictTypeReq;
import com.muyu.data.source.domain.resp.DictDataResp;
import com.muyu.data.source.service.DictDataService;
import com.muyu.data.source.service.DictTypeService;
@ -62,5 +63,10 @@ public class DictTypeController {
}});
return Result.success();
}
//根据对象查询字典列表
@PostMapping("/getDictData")
public Result<List<DictData>> getDictData(@RequestBody DictTypeReq dictTypeReq) {
return Result.success(dictTypeService.getDictData(dictTypeReq));
}
}

View File

@ -0,0 +1,15 @@
package com.muyu.data.source.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.data.source.domain.AssetAuthInfo;
/**
* Mapper
*
* @author hufangming
* @date 2024-04-29
*/
public interface AssetAuthInfoMapper extends BaseMapper<AssetAuthInfo> {
}

View File

@ -0,0 +1,22 @@
package com.muyu.data.source.service;
import java.util.List;
import com.muyu.data.source.domain.AssetAuthInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* Service
*
* @author hufangming
* @date 2024-04-29
*/
public interface AssetAuthInfoService extends IService<AssetAuthInfo> {
/**
*
*
* @param assetAuthInfo
* @return
*/
public List<AssetAuthInfo> list(AssetAuthInfo assetAuthInfo);
}

View File

@ -1,7 +1,9 @@
package com.muyu.data.source.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.data.source.domain.DictData;
import com.muyu.data.source.domain.DictType;
import com.muyu.data.source.domain.req.DictTypeReq;
import com.muyu.data.source.domain.resp.DictDataResp;
import java.util.List;
@ -18,4 +20,5 @@ public interface DictTypeService extends IService<DictType> {
List<DictDataResp> getDictDataList(Long id);
List<DictData> getDictData(DictTypeReq dictTypeReq);
}

View File

@ -0,0 +1,52 @@
package com.muyu.data.source.service.impl;
import java.util.List;
import com.muyu.common.core.utils.ObjUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.muyu.data.source.mapper.AssetAuthInfoMapper;
import com.muyu.data.source.domain.AssetAuthInfo;
import com.muyu.data.source.service.AssetAuthInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
/**
* Service
*
* @author hufangming
* @date 2024-04-29
*/
@Slf4j
@Service
public class AssetAuthInfoServiceImpl extends ServiceImpl<AssetAuthInfoMapper, AssetAuthInfo> implements AssetAuthInfoService {
/**
*
*
* @param assetAuthInfo
* @return
*/
@Override
public List<AssetAuthInfo> list(AssetAuthInfo assetAuthInfo) {
LambdaQueryWrapper<AssetAuthInfo> queryWrapper = new LambdaQueryWrapper<>();
if (ObjUtils.notNull(assetAuthInfo.getAuthId())){
queryWrapper.eq(AssetAuthInfo::getAuthId, assetAuthInfo.getAuthId());
}
if (ObjUtils.notNull(assetAuthInfo.getIdType())){
queryWrapper.eq(AssetAuthInfo::getIdType, assetAuthInfo.getIdType());
}
if (ObjUtils.notNull(assetAuthInfo.getAuthData())){
queryWrapper.eq(AssetAuthInfo::getAuthData, assetAuthInfo.getAuthData());
}
if (ObjUtils.notNull(assetAuthInfo.getAuthType())){
queryWrapper.eq(AssetAuthInfo::getAuthType, assetAuthInfo.getAuthType());
}
return list(queryWrapper);
}
}

View File

@ -1,11 +1,18 @@
package com.muyu.data.source.service.impl;
import static java.util.Arrays.stream;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.text.Convert;
import com.muyu.common.core.utils.ObjUtils;
import com.muyu.common.core.utils.StringUtils;
import com.muyu.common.redis.service.RedisService;
import com.muyu.common.security.utils.SecurityUtils;
import com.muyu.common.system.domain.SysUser;
import com.muyu.data.source.domain.AssetAuthInfo;
import com.muyu.data.source.domain.AssetDataSource;
import com.muyu.data.source.domain.Children;
import com.muyu.data.source.domain.DataSource;
@ -13,6 +20,7 @@ import com.muyu.data.source.domain.DatabaseType;
import com.muyu.data.source.domain.TableData;
import com.muyu.data.source.domain.resp.CountResp;
import com.muyu.data.source.mapper.DataSourceMapper;
import com.muyu.data.source.service.AssetAuthInfoService;
import com.muyu.data.source.service.AssetDataSourceService;
import com.muyu.data.source.service.ChildrenService;
import com.muyu.data.source.service.DataSourceService;
@ -27,7 +35,9 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -51,6 +61,9 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
@Autowired
private AssetDataSourceService assetDataSourceService;
@Autowired
private RedisService redisService;
@Autowired
private ChildrenService childrenService;
@ -60,6 +73,8 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
private DatabaseTypeService databaseTypeService;
private final ExecutorService executor = Executors.newFixedThreadPool(10);
private static Integer version = 1;
@Autowired
private AssetAuthInfoService assetAuthInfoService;
/**
*
@ -203,15 +218,63 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
@Override
public List<AssetDataSource> getAssetList() {
List<AssetDataSource> assetDataSourceList = assetDataSourceService.list();
List<AssetDataSource> assetDataSourceList;
assetDataSourceList = assetDataSourceService.list();
//登录人不是管理员
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
List<AssetAuthInfo> assetAuthInfoList=assetAuthInfoService.list(new LambdaQueryWrapper<AssetAuthInfo>()
.eq(AssetAuthInfo::getIdType,"dept")
.eq(AssetAuthInfo::getAuthId,sysUser.getDeptId())
.or(pw->pw.eq(AssetAuthInfo::getIdType,"user")
.eq(AssetAuthInfo::getId, sysUser.getUserId())
) );
HashMap<String,String> map=new HashMap<>();
List<Integer> sourceIdList = assetAuthInfoList.stream().map(assetAccredit -> {
if (assetAccredit.getAuthType().equals("source")) {
map.put(assetAccredit.getAuthData(), null);
return Convert.toInt(assetAccredit.getAuthData());
} else {
String[] split = assetAccredit.getAuthData().split(",");
String assetId = split[0];
String tableName = split[1];
if (map.containsKey(assetId)) {
String s = map.get(assetId);
if (Objects.nonNull(s)) {
s += "," + tableName;
map.put(assetId, s);
}
} else {
map.put(assetId, tableName);
}
return Convert.toInt(assetId);
}
}).toList();
assetDataSourceList = assetDataSourceService.list(new LambdaQueryWrapper<>() {{
in(AssetDataSource::getId, sourceIdList);
}});
redisService.setCacheMap("accredit:" + SecurityUtils.getUserId(), map);
}
return assetDataSourceList;
}
@Override
public List<Children> getChildrenList(Integer id) {
List<Children> childrenList = childrenService.list(new LambdaQueryWrapper<Children>() {{
eq(Children::getAssetId, id);
}});
List<Children> childrenList;
childrenList=childrenService.list(new LambdaQueryWrapper<Children>(){{
eq(Children::getAssetId,id);
}});
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
String value=redisService.getCacheMapValue("accredit:" + SecurityUtils.getUserId(), String.valueOf(id));
if (Objects.nonNull(value)){
List<String> list = stream(value.split(",")).toList();
childrenService.list(new LambdaQueryWrapper<>(){{
eq(Children::getAssetId, id);
in(Children::getId, list);
}});
}
}
return childrenList;
}
@ -360,7 +423,7 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
.isNull(isNullable.equals("YES") ? "Y" : "N")
.defaultValue(columnDefault)
.isDict("N")
.dictKey(null)
.dictKey("")
.childrenId(children.getId())
.build();
tableDataService.save(tableData);

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.data.source.domain.DictData;
import com.muyu.data.source.domain.DictType;
import com.muyu.data.source.domain.req.DictTypeReq;
import com.muyu.data.source.domain.resp.DictDataResp;
import com.muyu.data.source.mapper.DictTypeMapper;
import com.muyu.data.source.service.DictDataService;
@ -42,4 +43,16 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> i
return dictDataRespList;
}
@Override
public List<DictData> getDictData(DictTypeReq dictTypeReq) {
DictType dictType=this.getOne(new LambdaQueryWrapper<>(){{
eq(DictType::getAssetId, dictTypeReq.getAssetId());
eq(DictType::getDictType, dictTypeReq.getDictType());
}});
List<DictData> dictData=dictDataService.list(new LambdaQueryWrapper<>(){{
eq(DictData::getDictTypeId, dictType.getId());
}});
return dictData;
}
}

View File

@ -1,5 +1,14 @@
# Tomcat
server:
jetty:
threads:
#acceptors线程池用于接受HTTP请求
acceptors: 4
#selectors线程池用于处理HTTP数据包
selectors: 8
#worker线程池负责调用Web方法
min: 8
max: 200
port: 9511
# Spring

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.data.source.mapper.AssetAuthInfoMapper">
<resultMap type="com.muyu.data.source.domain.AssetAuthInfo" id="AssetAuthInfoResult">
<result property="id" column="id" />
<result property="authId" column="auth_id" />
<result property="idType" column="id_type" />
<result property="authData" column="auth_data" />
<result property="authType" column="auth_type" />
</resultMap>
<sql id="selectAssetAuthInfoVo">
select id, auth_id, id_type, auth_data, auth_type from asset_auth_info
</sql>
</mapper>

View File

@ -0,0 +1,20 @@
<?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>muyu-rule_engine</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-rule_engine-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>
</project>

View File

@ -0,0 +1,20 @@
<?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>muyu-rule_engine</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-rule_engine-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>
</project>

View File

@ -0,0 +1,20 @@
<?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>muyu-rule_engine</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-rule_engine-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>
</project>

View File

@ -0,0 +1,26 @@
<?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>muyu-modules</artifactId>
<version>3.6.3</version>
</parent>
<artifactId>muyu-rule_engine</artifactId>
<packaging>pom</packaging>
<modules>
<module>muyu-rule_engine-common</module>
<module>muyu-rule_engine-remote</module>
<module>muyu-rule_engine-server</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

@ -14,6 +14,7 @@
<module>muyu-job</module>
<module>muyu-file</module>
<module>muyu-data-source</module>
<module>muyu-rule_engine</module>
</modules>
<artifactId>muyu-modules</artifactId>

631
pom.xml
View File

@ -1,324 +1,337 @@
<?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>
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>
<groupId>com.muyu</groupId>
<artifactId>muyu</artifactId>
<version>3.6.3</version>
<groupId>com.muyu</groupId>
<artifactId>muyu</artifactId>
<version>3.6.3</version>
<name>muyu</name>
<name>muyu</name>
<description>微服务系统</description>
<description>微服务系统</description>
<properties>
<muyu.version>3.6.3</muyu.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<spring-boot.version>2.7.13</spring-boot.version>
<spring-cloud.version>2021.0.8</spring-cloud.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
<spring-boot-admin.version>2.7.10</spring-boot-admin.version>
<swagger.fox.version>3.0.0</swagger.fox.version>
<swagger.core.version>1.6.2</swagger.core.version>
<tobato.version>1.27.2</tobato.version>
<kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
<druid.version>1.2.16</druid.version>
<dynamic-ds.version>3.5.2</dynamic-ds.version>
<commons.io.version>2.13.0</commons.io.version>
<velocity.version>2.3</velocity.version>
<fastjson.version>2.0.41</fastjson.version>
<jjwt.version>0.9.1</jjwt.version>
<minio.version>8.2.2</minio.version>
<poi.version>4.1.2</poi.version>
<jedis.version>2.9.0</jedis.version>
<postgresql.version>42.5.0</postgresql.version>
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringCloud 微服务 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringCloud Alibaba 微服务 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringBoot 依赖配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- FastDFS 分布式文件系统 -->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>${tobato.version}</version>
</dependency>
<!-- Swagger 依赖配置 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.core.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.core.version}</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>pro.fessional</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- 代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- JSON 解析器和生成器 -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<!-- 线程传递值 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>${transmittable-thread-local.version}</version>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-core</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 接口模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-swagger</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 安全模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-security</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 权限范围 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datascope</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 多数据源 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datasource</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 分布式事务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-seata</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 日志记录 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-log</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 缓存服务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-redis</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 系统级别 插件 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-system</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- PostgreSQL JDBC 驱动 -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version> <!-- 使用当前最新稳定版本 -->
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>muyu-auth</module>
<module>muyu-gateway</module>
<module>muyu-visual</module>
<module>muyu-modules</module>
<module>muyu-common</module>
</modules>
<packaging>pom</packaging>
<properties>
<muyu.version>3.6.3</muyu.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<spring-boot.version>2.7.13</spring-boot.version>
<spring-cloud.version>2021.0.8</spring-cloud.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
<spring-boot-admin.version>2.7.10</spring-boot-admin.version>
<swagger.fox.version>3.0.0</swagger.fox.version>
<swagger.core.version>1.6.2</swagger.core.version>
<tobato.version>1.27.2</tobato.version>
<kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
<druid.version>1.2.16</druid.version>
<dynamic-ds.version>3.5.2</dynamic-ds.version>
<commons.io.version>2.13.0</commons.io.version>
<velocity.version>2.3</velocity.version>
<fastjson.version>2.0.41</fastjson.version>
<jjwt.version>0.9.1</jjwt.version>
<minio.version>8.2.2</minio.version>
<poi.version>4.1.2</poi.version>
<jedis.version>2.9.0</jedis.version>
<postgresql.version>42.5.0</postgresql.version>
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- bootstrap 启动器 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<!-- SpringCloud 微服务 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringCloud Alibaba 微服务 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringBoot 依赖配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
<!-- 排除springBoot-tomcat-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--引入jettry服务器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- FastDFS 分布式文件系统 -->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>${tobato.version}</version>
</dependency>
<!-- Swagger 依赖配置 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.core.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.core.version}</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>pro.fessional</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- 代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- JSON 解析器和生成器 -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<!-- 线程传递值 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>${transmittable-thread-local.version}</version>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-core</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 接口模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-swagger</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 安全模块 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-security</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 权限范围 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datascope</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 多数据源 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-datasource</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 分布式事务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-seata</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 日志记录 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-log</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 缓存服务 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-redis</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- 系统级别 插件 -->
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-system</artifactId>
<version>${muyu.version}</version>
</dependency>
<!-- PostgreSQL JDBC 驱动 -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version> <!-- 使用当前最新稳定版本 -->
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 要将源码放上去,需要加入这个插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>muyu-auth</module>
<module>muyu-gateway</module>
<module>muyu-visual</module>
<module>muyu-modules</module>
<module>muyu-common</module>
</modules>
<packaging>pom</packaging>
<distributionManagement>
<repository>
<id>releases</id>
<name>releases</name>
<url>http://nexus.muyu.com:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>
<dependencies>
<!-- bootstrap 启动器 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
</dependencies>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 要将源码放上去,需要加入这个插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>releases</id>
<name>releases</name>
<url>http://nexus.muyu.com:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://nexus.muyu.com:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>