commit
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<groupId>com.budwk</groupId>
|
<groupId>com.budwk</groupId>
|
||||||
<artifactId>zhgh-whcp</artifactId>
|
<artifactId>zhgh_whcp</artifactId>
|
||||||
<version>5.6.0-plus</version>
|
<version>5.6.0-plus</version>
|
||||||
<properties>
|
<properties>
|
||||||
<nutzboot.version>2.6.0-SNAPSHOT</nutzboot.version>
|
<nutzboot.version>2.6.0-SNAPSHOT</nutzboot.version>
|
||||||
|
|||||||
@@ -8,11 +8,14 @@ import com.budwk.app.base.sms.SmsService;
|
|||||||
import com.budwk.app.web.commons.base.Globals;
|
import com.budwk.app.web.commons.base.Globals;
|
||||||
import com.google.common.net.MediaType;
|
import com.google.common.net.MediaType;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.ioc.impl.PropertiesProxy;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
import org.nutz.json.Json;
|
||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,6 +29,9 @@ import java.util.stream.Collectors;
|
|||||||
@IocBean
|
@IocBean
|
||||||
public class SmsWhcpServiceImpl implements SmsService {
|
public class SmsWhcpServiceImpl implements SmsService {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PropertiesProxy conf;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void send(String mobile, String content) {
|
public void send(String mobile, String content) {
|
||||||
this.doSend(mobile, content);
|
this.doSend(mobile, content);
|
||||||
@@ -41,6 +47,7 @@ public class SmsWhcpServiceImpl implements SmsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void doSend(String mobile, String content) {
|
private void doSend(String mobile, String content) {
|
||||||
|
Map<String, String> all = conf.toMap();
|
||||||
if (!Globals.sso) {
|
if (!Globals.sso) {
|
||||||
log.info("【log】本地开发环境,不允许调用短信消息接口");
|
log.info("【log】本地开发环境,不允许调用短信消息接口");
|
||||||
return;
|
return;
|
||||||
@@ -54,8 +61,8 @@ public class SmsWhcpServiceImpl implements SmsService {
|
|||||||
|
|
||||||
long tKey = System.currentTimeMillis() / 1000;
|
long tKey = System.currentTimeMillis() / 1000;
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("username", "whszyxy");
|
json.put("username", all.get("sms.username"));
|
||||||
json.put("password", SecureUtil.md5(SecureUtil.md5("Whszyxy123") + tKey));
|
json.put("password", SecureUtil.md5(SecureUtil.md5("sms.password") + tKey));
|
||||||
json.put("tKey", tKey + "");
|
json.put("tKey", tKey + "");
|
||||||
json.put("mobile", mobile);
|
json.put("mobile", mobile);
|
||||||
json.put("content", "智慧工会:" + content);
|
json.put("content", "智慧工会:" + content);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import cn.hutool.json.JSONUtil;
|
|||||||
import com.budwk.app.base.constant.RedisConstant;
|
import com.budwk.app.base.constant.RedisConstant;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.integration.jedis.RedisService;
|
import org.nutz.integration.jedis.RedisService;
|
||||||
|
import org.nutz.ioc.impl.PropertiesProxy;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
import org.nutz.json.Json;
|
||||||
@@ -30,20 +31,26 @@ public class WechatEnterpriseTokenUtil {
|
|||||||
@Inject
|
@Inject
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PropertiesProxy conf;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static final String TOKEN_URL = "http://xxzx.whcp.edu.cn/api/v4/oauth/token";
|
private static final String TOKEN_URL = "http://xxzx.whcp.edu.cn/api/v4/oauth/token";
|
||||||
private static final String CLINT_ID = "gh";
|
private static final String CLINT_ID = "XXXXX";
|
||||||
private static final String CLINT_SECRET = "0a5fb006ee64060799aec6403707eb4d";
|
private static final String CLINT_SECRET = "XXXXXX";
|
||||||
private static final String GRANT_TYPE = "authorization_code";
|
private static final String GRANT_TYPE = "XXXXX";
|
||||||
|
|
||||||
public String getToken() {
|
public String getToken() {
|
||||||
String key = RedisConstant.REDIS_WECHAT_ENTERPRISE_TOKEN_KEY;
|
String key = RedisConstant.REDIS_WECHAT_ENTERPRISE_TOKEN_KEY;
|
||||||
String token = redisService.get(key);
|
String token = redisService.get(key);
|
||||||
if (StrUtil.isBlank(token)) {
|
if (StrUtil.isBlank(token)) {
|
||||||
|
Map<String, String> all = conf.toMap();
|
||||||
// 构造表单参数
|
// 构造表单参数
|
||||||
Map<String, String> param = new HashMap<>();
|
Map<String, String> param = new HashMap<>();
|
||||||
param.put("client_id", CLINT_ID);
|
param.put("client_id", all.get("wechat.client_id"));
|
||||||
param.put("client_secret", CLINT_SECRET);
|
param.put("client_secret", all.get("wechat.client_secret"));
|
||||||
param.put("grant_type", GRANT_TYPE);
|
param.put("grant_type", "authorization_code");
|
||||||
|
|
||||||
String body = HttpUtil.createGet(TOKEN_URL).formStr(param).execute().body();
|
String body = HttpUtil.createGet(TOKEN_URL).formStr(param).execute().body();
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -145,14 +145,14 @@ public class CondolenceApplyController {
|
|||||||
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
|
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
/*if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
||||||
} else {
|
} else {
|
||||||
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
|
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}*/
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = condolenceService.listPageMap(1, 50, sql);
|
Pagination pagination = condolenceService.listPageMap(1, 50, sql);
|
||||||
return Result.success(pagination.getList());
|
return Result.success(pagination.getList());
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ nutz:
|
|||||||
ignore: ^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg|vue)$
|
ignore: ^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg|vue)$
|
||||||
exclusions: /favicon/*,/assets/*,/druid/*,/upload/*,/components/*
|
exclusions: /favicon/*,/assets/*,/druid/*,/upload/*,/components/*
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 80
|
||||||
host: 0.0.0.0
|
host: 0.0.0.0
|
||||||
|
|
||||||
jetty:
|
jetty:
|
||||||
@@ -71,7 +71,7 @@ redis:
|
|||||||
#nodes=192.168.6.31:6377,192.168.6.31:6378,192.168.6.28:6377,192.168.6.28:6378,192.168.6.34:6377,192.168.6.34:6378
|
#nodes=192.168.6.31:6377,192.168.6.31:6378,192.168.6.28:6377,192.168.6.28:6378,192.168.6.34:6377,192.168.6.34:6378
|
||||||
|
|
||||||
jdbc:
|
jdbc:
|
||||||
url: jdbc:mysql://192.168.21.203:3306/zhgh_whcp?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://192.168.21.203:3306/zhgh_whcp_new?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
validationQuery: select 1
|
validationQuery: select 1
|
||||||
@@ -175,3 +175,10 @@ data-center:
|
|||||||
teacher: https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/JZGJCSJZLB
|
teacher: https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/JZGJCSJZLB
|
||||||
unit: https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/YXSDWJBSJZLB
|
unit: https://bd.whcp.edu.cn/sjjkfwpt/api/bd-api/get/YXSDWJBSJZLB
|
||||||
|
|
||||||
|
sms:
|
||||||
|
username: xxxxxx
|
||||||
|
password: xxxxxx
|
||||||
|
wechat:
|
||||||
|
client_id: xxxxx
|
||||||
|
client_secret: xxxxx
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,33 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.union-tree .el-tree-node__content {
|
||||||
|
height: auto;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-tree-node-label {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-tree-node-label i {
|
||||||
|
margin-top: 3px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.union-tree-node-text {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<template>
|
<template>
|
||||||
@@ -10,30 +37,32 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
class="union-tree"
|
||||||
ref="treeRef"
|
:data="treeData"
|
||||||
:expand-on-click-node="false"
|
ref="treeRef"
|
||||||
:props="{
|
:expand-on-click-node="false"
|
||||||
children: 'children',
|
:props="{
|
||||||
label: 'name'
|
children: 'children',
|
||||||
}"
|
label: 'name'
|
||||||
default-expand-all
|
}"
|
||||||
@node-click="treeNodeClick"
|
default-expand-all
|
||||||
:filter-node-method="filterNode"
|
@node-click="treeNodeClick"
|
||||||
highlight-current
|
:filter-node-method="filterNode"
|
||||||
>
|
highlight-current
|
||||||
<template slot-scope="{ node, data }">
|
>
|
||||||
<span class="el-tree-node__label">
|
<template slot-scope="{ node, data }">
|
||||||
|
<span class="union-tree-node-label">
|
||||||
<i class="el-icon-folder-opened" v-if="node.level===1"></i>
|
<i class="el-icon-folder-opened" v-if="node.level===1"></i>
|
||||||
<i class="el-icon-folder" v-else></i>
|
<i class="el-icon-folder" v-else></i>
|
||||||
{{node.label}}
|
<span class="union-tree-node-text">{{node.label}}</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
||||||
|
|||||||
Reference in New Issue
Block a user