Commit 40cd76d2 authored by “yiyousong”'s avatar “yiyousong”
parents 4366111a e5b7a10e
...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -106,19 +107,19 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -106,19 +107,19 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims claims = parseToken(token); Claims claims = parseToken(token);
String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY); String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid); String userKey = getTokenKey(uuid);
cacheService.select(portalDb); // cacheService.select(portalDb);
String userStr = cacheService.get(userKey);
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String userStr =redisTemplate.opsForValue().get(userKey);
// String userStr = cacheService.get(userKey);
//刷新token时间 //刷新token时间
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
if (!ObjectUtils.isEmpty(userEntity)) { if (!ObjectUtils.isEmpty(userEntity)) {
verifyToken(userEntity); verifyToken(userEntity);
} }
cacheService.select(db); // cacheService.select(db);
if (!ObjectUtils.isEmpty(userEntity)) { if (!ObjectUtils.isEmpty(userEntity)) {
// UserEntity temp = userService.selectOne(new UserQuery().loginName(userEntity.getLoginName()));
// if(!ObjectUtils.isEmpty(temp)){
// userEntity.setId(temp.getId());
// }
UserEntity temp = userService.getExtCache(userEntity.getLoginName()); UserEntity temp = userService.getExtCache(userEntity.getLoginName());
if (!ObjectUtils.isEmpty(temp)) { if (!ObjectUtils.isEmpty(temp)) {
userEntity.setId(temp.getId()); userEntity.setId(temp.getId());
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
package com.mortals.xhx.base.system.user.service.impl; package com.mortals.xhx.base.system.user.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.SysConstains; import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.common.code.UserType; import com.mortals.framework.common.code.UserType;
...@@ -467,15 +468,17 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -467,15 +468,17 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
//eba467f81fb265befdf1f6ab041d39ab 原始admin密码 //eba467f81fb265befdf1f6ab041d39ab 原始admin密码
System.out.println(SecurityUtil.md5DoubleEncoding("adminADMIN@123!@#"));
System.out.println(SecurityUtil.md5DoubleEncoding("123456"));
System.out.println(SecurityUtil.md5DoubleEncoding("Qt123456@"));
/*
//宜宾一体化账号密码 //宜宾一体化账号密码
System.out.println(SecurityUtil.md5DoubleEncoding("yibinYTH@123!@#")); System.out.println(SecurityUtil.md5DoubleEncoding("yibinYTH@123!@#"));
//P@ssw0rd123 //P@ssw0rd123
System.out.println(SecurityUtil.md5DoubleEncoding("P@ssw0rd123")); System.out.println(SecurityUtil.md5DoubleEncoding("P@ssw0rd123"));*/
} }
} }
\ No newline at end of file
package com.mortals.xhx.daemon.applicationservice; package com.mortals.xhx.daemon.applicationservice;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
...@@ -12,6 +13,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu; ...@@ -12,6 +13,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.SyncTreeSiteThread; import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.user.IUserFeign; import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -52,6 +54,26 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -52,6 +54,26 @@ public class DemoStartedService implements IApplicationStartedService {
siteService.updateAllSiteTree(null); siteService.updateAllSiteTree(null);
//测试获取站点
/*
int i=0;
while (true) {
SiteEntity siteCache = siteService.getCache("1");
if (ObjectUtils.isEmpty(siteCache)) {
log.error("siteCache is null");
}else {
log.info("count==>"+i);
}
try {
Thread.sleep(50);
i++;
} catch (InterruptedException e) {
}
}*/
/* UserEntity userEntity = new UserEntity(); /* UserEntity userEntity = new UserEntity();
userEntity.initAttrValue(); userEntity.initAttrValue();
userEntity.setId(0L); userEntity.setId(0L);
......
...@@ -284,8 +284,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -284,8 +284,9 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override @Override
public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException { public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException {
SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString()); // SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString());
if(ObjectUtils.isEmpty(siteCache)) throw new AppException("查询站点id不能为空!"); SiteEntity siteCache = siteService.get(matterQuery.getSiteId());
if(ObjectUtils.isEmpty(siteCache)) throw new AppException("查询站点id不能为空!siteId:"+matterQuery.getSiteId());
if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) { if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) {
matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode()); matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode());
} }
......
...@@ -450,14 +450,17 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -450,14 +450,17 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
if (ObjectUtils.isEmpty(siteId)) { if (ObjectUtils.isEmpty(siteId)) {
throw new AppException("站点Id不能为空!"); throw new AppException("站点Id不能为空!");
} }
SiteEntity siteCache = this.getCache(siteId.toString()); SiteEntity siteCache = this.get(siteId);
if (ObjectUtils.isEmpty(siteCache)) { if (ObjectUtils.isEmpty(siteCache)) {
throw new AppException("站点不存在,siteId:" + siteId); throw new AppException("站点不存在,siteId:" + siteId);
} }
//siteList.add(siteCache); //siteList.add(siteCache);
AreaEntity areaEntity = areaService.getExtCache(siteCache.getAreaCode()); AreaEntity areaEntity = areaService.getExtCache(siteCache.getAreaCode());
if (ObjectUtils.isEmpty(areaEntity)) { if (ObjectUtils.isEmpty(areaEntity)) {
throw new AppException(String.format("区域不存在!区域编码:%s", siteCache.getAreaCode())); areaEntity = areaService.selectOne(new AreaQuery().areaCode(siteCache.getAreaCode()));
if (ObjectUtils.isEmpty(areaEntity)) {
throw new AppException(String.format("区域不存在!区域编码:%s", siteCache.getAreaCode()));
}
} }
String matchCode = siteCache.getAreaCode().replaceAll("(0)+$", ""); String matchCode = siteCache.getAreaCode().replaceAll("(0)+$", "");
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"baseUrl": "http://192.168.0.60:17211/base" "baseUrl": "http://192.168.0.60:17211/base"
}, },
"base-test": { "base-test": {
"baseUrl": "http://192.168.0.124:11078/base" "baseUrl": "http://192.168.0.98:11078/base"
}, },
"base-test-https": { "base-test-https": {
......
...@@ -9,7 +9,7 @@ Content-Type: application/json ...@@ -9,7 +9,7 @@ Content-Type: application/json
###工作人员列表 ###工作人员列表
POST {{baseUrl}}/workman/list POST {{baseUrl}}/workman/interlist
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"echarts": "^5.3.3", "echarts": "^5.3.3",
"element-ui": "^2.15.8", "element-ui": "^2.15.8",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"gsap": "^3.12.2",
"heatmap.js": "^2.0.5", "heatmap.js": "^2.0.5",
"highlight.js": "^11.5.1", "highlight.js": "^11.5.1",
"js-export-excel": "^1.1.4", "js-export-excel": "^1.1.4",
...@@ -28,11 +29,13 @@ ...@@ -28,11 +29,13 @@
"secure-ls": "^1.2.6", "secure-ls": "^1.2.6",
"swiper": "5", "swiper": "5",
"three": "^0.155.0", "three": "^0.155.0",
"v-scale-screen": "1.0.2",
"v-viewer": "^1.6.4", "v-viewer": "^1.6.4",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-highlightjs": "^1.3.3", "vue-highlightjs": "^1.3.3",
"vue-lazyload": "1.3.3", "vue-lazyload": "1.3.3",
"vue-router": "^3.5.1", "vue-router": "^3.5.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2", "vuex": "^3.6.2",
"vuex-persistedstate": "^4.1.0" "vuex-persistedstate": "^4.1.0"
}, },
...@@ -6434,6 +6437,11 @@ ...@@ -6434,6 +6437,11 @@
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true "dev": true
}, },
"node_modules/gsap": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.2.tgz",
"integrity": "sha512-EkYnpG8qHgYBFAwsgsGEqvT1WUidX0tt/ijepx7z8EUJHElykg91RvW1XbkT59T0gZzzszOpjQv7SE41XuIXyQ=="
},
"node_modules/gzip-size": { "node_modules/gzip-size": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz",
...@@ -10419,6 +10427,11 @@ ...@@ -10419,6 +10427,11 @@
"websocket-driver": "^0.7.4" "websocket-driver": "^0.7.4"
} }
}, },
"node_modules/sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
...@@ -11269,6 +11282,17 @@ ...@@ -11269,6 +11282,17 @@
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
}, },
"node_modules/v-scale-screen": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/v-scale-screen/-/v-scale-screen-1.0.2.tgz",
"integrity": "sha512-qMXPglHIs8KnhzDBdEBLcIoF3q7jgFCTWNIVPD5M0FGBkD+amYjbFUoLdKol/Xylm+pli4AHOZOqwyL6xX62SA==",
"engines": {
"node": ">=12"
},
"peerDependencies": {
"vue": "^2.6.14"
}
},
"node_modules/v-viewer": { "node_modules/v-viewer": {
"version": "1.6.4", "version": "1.6.4",
"resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz", "resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz",
...@@ -11501,6 +11525,14 @@ ...@@ -11501,6 +11525,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"node_modules/vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"dependencies": {
"sortablejs": "1.10.2"
}
},
"node_modules/vuex": { "node_modules/vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
...@@ -17075,6 +17107,11 @@ ...@@ -17075,6 +17107,11 @@
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true "dev": true
}, },
"gsap": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.2.tgz",
"integrity": "sha512-EkYnpG8qHgYBFAwsgsGEqvT1WUidX0tt/ijepx7z8EUJHElykg91RvW1XbkT59T0gZzzszOpjQv7SE41XuIXyQ=="
},
"gzip-size": { "gzip-size": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz",
...@@ -20039,6 +20076,11 @@ ...@@ -20039,6 +20076,11 @@
"websocket-driver": "^0.7.4" "websocket-driver": "^0.7.4"
} }
}, },
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
...@@ -20645,6 +20687,12 @@ ...@@ -20645,6 +20687,12 @@
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true "dev": true
}, },
"v-scale-screen": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/v-scale-screen/-/v-scale-screen-1.0.2.tgz",
"integrity": "sha512-qMXPglHIs8KnhzDBdEBLcIoF3q7jgFCTWNIVPD5M0FGBkD+amYjbFUoLdKol/Xylm+pli4AHOZOqwyL6xX62SA==",
"requires": {}
},
"v-viewer": { "v-viewer": {
"version": "1.6.4", "version": "1.6.4",
"resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz", "resolved": "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz",
...@@ -20835,6 +20883,14 @@ ...@@ -20835,6 +20883,14 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": { "vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
......
...@@ -19,6 +19,19 @@ export default { ...@@ -19,6 +19,19 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
data() {
return {
info: this.info || {},
};
},
},
watch: {
info: {
deep: true,
handler(val) {
this._initEcharts();
},
},
}, },
mounted() { mounted() {
this._initEcharts(); this._initEcharts();
...@@ -29,7 +42,11 @@ export default { ...@@ -29,7 +42,11 @@ export default {
const echarts = this.$echarts; const echarts = this.$echarts;
let option = { let option = {
title: { title: {
text: `{c|${this.info.starttime}~${this.info.endtime}} \n{a|` + (this.info.success_rate * 100).toFixed(2) + "%" + "}", text:
`{c|${this.info.starttime}~${this.info.endtime}} \n{a|` +
(this.info.success_rate * 100).toFixed(2) +
"%" +
"}",
x: "center", x: "center",
y: "center", y: "center",
textStyle: { textStyle: {
...@@ -107,4 +124,4 @@ export default { ...@@ -107,4 +124,4 @@ export default {
}, },
}, },
}; };
</script> </script>
\ No newline at end of file
This diff is collapsed.
...@@ -133,6 +133,15 @@ spring: ...@@ -133,6 +133,15 @@ spring:
metadata: metadata:
response-timeout: 200000 response-timeout: 200000
connect-timeout: 200000 connect-timeout: 200000
# 考勤绩效
- id: attendance-performance-manager
#uri: http://192.168.0.98:21080
uri: lb://attendance-performance-manager
predicates:
- Path=/attendance/**
metadata:
response-timeout: 200000
connect-timeout: 200000
nacos: nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类 # Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery: discovery:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment