Skip to content

Commit

Permalink
v5.1.1封版提交
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyachao committed Jul 8, 2023
1 parent 9c038ee commit a08218f
Show file tree
Hide file tree
Showing 61 changed files with 41,869 additions and 35,050 deletions.
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [READ MORE](#read-more)
- [数据采集,处理,监控,调度,管理一体化平台](#%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86%E5%A4%84%E7%90%86%E7%9B%91%E6%8E%A7%E8%B0%83%E5%BA%A6%E7%AE%A1%E7%90%86%E4%B8%80%E4%BD%93%E5%8C%96%E5%B9%B3%E5%8F%B0)
- [项目模块划分](#%E9%A1%B9%E7%9B%AE%E6%A8%A1%E5%9D%97%E5%88%92%E5%88%86)
- [开源/闭源版本](#%E5%BC%80%E6%BA%90%E9%97%AD%E6%BA%90%E7%89%88%E6%9C%AC)
- [下载编译包](#%E4%B8%8B%E8%BD%BD%E7%BC%96%E8%AF%91%E5%8C%85)
- [在线预览](#%E5%9C%A8%E7%BA%BF%E9%A2%84%E8%A7%88)
Expand Down Expand Up @@ -53,9 +54,25 @@
+ 降低使用者标准,通过拖拉拽实现数据的采集(任务依赖关系由自带调度完成-优势)
+ 本平台的初衷及目的尽量减少开发者的工作量及降低数据开发者的使用门槛

# 项目模块划分
项目涉及方向较多,技术杂乱
包含以下几个项目,以下几个项目都是单独的git仓库
zdh_web: zdh系列项目web管理端,提供可视化配置,比如ETL,调度,mock服务,权限管理,数仓模块等
zdh_spark: 基于spark的etl处理,必须依赖zdh_web
zdh_flinkx: 基于flink sql的etl处理,必须依赖zdh_web
zdh_mock: 基于netty的http-mock服务,必须依赖zdh_web
zdh_queue: 计划开发一个非高性能的优先级可控队列(用于etl任务优先级控制),开发失败,废弃
zdh_auth: 大数据统一权限管理(hadoop,hive,hbase,presto),开发中
coustomer: 是一个客户管理模块,计划做客户画像,智能营销等服务,主要包括label, plugin, ship, variable, 4个模块
coustomer-label: 客户管理-标签服务,必须依赖zdh_web,主要提供离线批量圈人功能
coustomer-plugin: 客户管理-通用插件服务,提供id_mapping,过滤,触达用户(发送短信,邮件等)
coustomer-ship: 客户管理-实时经营服务,实时接入用户流量,对用户做经营
coustomer-variable: 客户管理-变量服务,和label服务能力一样,区别在于一个离线处理,一个实时处理


# 开源/闭源版本
+ 5.0及之前版本不在进行维护
+ 5.1.1及之后版本所有代码开源
+ 5.1.1之前版本不开放源代码且不在继续维护
+ 5.1.1及之后版本开放所有源代码

# 下载编译包
+ 编译包下载地址(只提供4.7.11之后的版本,因4.7.11之后不提供源码下载):
Expand All @@ -81,6 +98,11 @@
+ [zdh_web_5.1.0](http://zycblog.cn:8080/zdh/download/5.1.0/zdh_web.tar)
+ [zdh_server_5.1.0](http://zycblog.cn:8080/zdh/download/5.1.0/zdh_server.tar)
+ [zdh_flink_5.1.0](http://zycblog.cn:8080/zdh/download/5.1.0/zdh_flink.tar)

+ 5.1.1
+ [zdh_web_5.1.1](http://zycblog.cn:8080/zdh/download/5.1.1/zdh_web.tar)
+ [zdh_server_5.1.1](http://zycblog.cn:8080/zdh/download/5.1.1/zdh_server.tar)
+ [zdh_flink_5.1.1](http://zycblog.cn:8080/zdh/download/5.1.1/zdh_flink.tar)

+ 如果链接失效,可通过邮件方式(见底部)通知作者,作者会通过邮件发送编译包,也可登陆ZDH预览页面下载

Expand Down Expand Up @@ -114,7 +136,7 @@
+ 数据迁移
+ 质量检测
+ 元数据,指标管理
+ drools灵活动态的数据清洗
+ drools灵活动态的数据清洗(废弃)



Expand Down Expand Up @@ -173,9 +195,14 @@
4.7.13 之前
在target 目录下找到zdh_web.jar
执行 java -Dfile.encoding=utf-8 -jar zdh_web.jar
4.7.13及之后
4.7.13及之后5.1.1之前
进入在xxx-RELEASE 目录下
执行 java -jar -Dfile.encoding=utf-8 -Dloader.path=libs/,conf zdh_web.jar
执行 java -jar -Dfile.encoding=utf-8 -Dloader.path=libs/,conf zdh_web.jar
5.1.1及之后
进入在xxx-RELEASE 目录下
启动执行 sh bin/start.sh 或者 sh bin/zdh_web.sh start
关闭执行 sh bin/stop.sh 或者 sh bin/zdh_web.sh stop

# FAQ

Expand Down Expand Up @@ -2231,6 +2258,10 @@
# 个人联系方式
邮件:[email protected]
代码所有都以开源,敢兴趣的码友可以下载自行研究,个人也可有偿进行定制化开发

#权益
因代码全部开源,谨防一些不法分子利用项目做违法等事情,均和本人无关,本人不承担任何责任,当他人因任何利益等和本人产生冲突时,最终解释权归本人所有



# 界面预览
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions release/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set ff=unix
bin_path=`dirname "$0"`
cd "$bin_path/.."
pt=`pwd`
#echo "java -Dfile.encoding=utf-8 -Dloader.path=libs/,conf/ -Xss512M -jar zdh_web.jar"
nohup java -Dfile.encoding=utf-8 -Dloader.path=libs/,conf/ -Xss512M -jar zdh_web.jar >> web.log &
APP_NAME=${pt}"/zdh_web.jar"
nohup java -Dfile.encoding=utf-8 -Dloader.path=libs/,conf/ -Xss512M -jar "$APP_NAME" >> web.log &
7 changes: 6 additions & 1 deletion release/bin/stop.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
kill -9 `ps -ef |grep zdh_web.jar |grep java|awk -F " " '{print $2}'`
set ff=unix
bin_path=`dirname "$0"`
cd "$bin_path/.."
pt=`pwd`
APP_NAME=${pt}"/zdh_web.jar"
kill -15 `ps -ef |grep "APP_NAME" |grep java|awk -F " " '{print $2}'`
88 changes: 88 additions & 0 deletions release/bin/zdh_web.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/bash

bin_path=`dirname "$0"`
cd "$bin_path/.."
pt=`pwd`
APP_NAME=${pt}"/zdh_web.jar"

#APP_DIR=./
APP_DIR=`pwd`
echo "当前路径"
echo $APP_DIR

#使用说明,用来提示输入参数
usage() {
echo "Usage: sh zdh_web.sh [start|stop|restart|status]"
exit 1
}

#检查程序是否在运行
is_exist(){
pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' `

echo "ps number is: ${pid}"
#如果不存在返回1,存在返回0
if [ -z "${pid}" ]; then
return 1
else
return 0
fi
}

#启动方法
start(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is already running. pid=${pid} ."
else
nohup java -Dfile.encoding=utf-8 -Dloader.path=libs/,conf/ -Xss512M -jar "$APP_NAME" >> web.log &
nohup java -jar $APP_DIR/$APP_NAME > $APP_DIR/log.out 2>&1 &
#nohup java -jar $APP_DIR/$APP_NAME
echo "${APP_NAME} start success"
fi
}

#停止方法
stop(){
is_exist
if [ $? -eq "0" ]; then
kill -9 $pid
else
echo "${APP_NAME} is not running"
fi
}

#输出运行状态
status(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is running. Pid is ${pid}"
else
echo "${APP_NAME} is NOT running."
fi
}

#重启
restart(){
stop
start
}

#根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in
"start")
start
;;
"stop")
stop
;;
"status")
status
;;
"restart")
restart
;;
*)
usage
;;
esac
16 changes: 15 additions & 1 deletion src/main/java/com/zyc/zdh/aop/AspectConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ public Object aroundLog(ProceedingJoinPoint pjp) throws Exception {

String reqParam = "";

//校验账号是否启用
boolean is_unenable = is_unenable();
//校验ip黑名单
boolean is_ipbacklist = is_ipblacklist(ipAddr);
boolean is_userbacklist = is_blacklist();
if (is_ipbacklist || is_userbacklist) {
if (is_ipbacklist || is_userbacklist || is_unenable) {
UserOperateLogMapper userOperateLogMapper = (UserOperateLogMapper) SpringContext.getBean("userOperateLogMapper");
UserOperateLogInfo userOperateLogInfo = new UserOperateLogInfo();
userOperateLogInfo.setOwner(getUser().getUserName());
Expand All @@ -193,6 +195,8 @@ public Object aroundLog(ProceedingJoinPoint pjp) throws Exception {
output = String.format("用户:%s命中IP黑名单,IP地址:%s", getUser().getUserName(), ipAddr);
} else if (is_userbacklist) {
output = String.format("用户:%s命中用户黑名单,IP地址:%s", getUser().getUserName(), ipAddr);
} else if(is_unenable){
output = String.format("用户:%s已被禁用,IP地址:%s", getUser().getUserName(), ipAddr);
}
userOperateLogInfo.setOperate_output(output);

Expand Down Expand Up @@ -517,6 +521,16 @@ private List<String> white() {
return permissions;
}

/**
* 校验是否禁用用户,true:禁用,false:未禁用
* @return
*/
private boolean is_unenable(){
RedisUtil redisUtil = (RedisUtil) SpringContext.getBean("redisUtil");
//todo 此处待实现
return false;
}

/**
* 查询是否命中用户名单,命中则不许访问
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ public ReturnInfo<Object> user_enable(String[] ids, String enable) {

try {
int result = permissionMapper.updateEnable(ids, enable);
if(enable.equalsIgnoreCase(Const.FALSE)){
//禁用用户,redis中写禁用标志 todo 此处待实现
}
return ReturnInfo.build(RETURN_CODE.SUCCESS.getCode(), "更新成功", getBaseException());
} catch (Exception e) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
Expand Down
Loading

0 comments on commit a08218f

Please sign in to comment.