Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
7823f81b
Commit
7823f81b
authored
Jun 07, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改区域树查询
parent
400a4a03
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
128 deletions
+131
-128
base-manager/src/main/bin/start.cmd
base-manager/src/main/bin/start.cmd
+0
-1
base-manager/src/main/bin/start.sh
base-manager/src/main/bin/start.sh
+0
-1
base-manager/src/main/java/com/mortals/xhx/base/framework/config/AccountConfig.java
.../com/mortals/xhx/base/framework/config/AccountConfig.java
+8
-0
base-manager/src/main/java/com/mortals/xhx/base/framework/feign/HierarchicalContract.java
...ortals/xhx/base/framework/feign/HierarchicalContract.java
+115
-0
common-lib/src/main/java/com/mortals/xhx/common/BrokerConfig.java
...ib/src/main/java/com/mortals/xhx/common/BrokerConfig.java
+0
-9
pom.xml
pom.xml
+0
-51
portal-manager/doc/api.md
portal-manager/doc/api.md
+8
-66
No files found.
base-manager/src/main/bin/start.cmd
View file @
7823f81b
...
...
@@ -28,7 +28,6 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.name=%PROJECT_NAME%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dapp
.port
=
%PORT%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Djava
.io.tmpdir
=
%TEMP_PATH%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dbasedir
=
%BASEDIR%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dloader
.path
=
file
://
%BASEDIR%
/conf
,
file
://
%BASEDIR%
/lib
set
DEBUG_OPTS
=
...
...
base-manager/src/main/bin/start.sh
View file @
7823f81b
...
...
@@ -60,7 +60,6 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dapp
.port
=
"
$PORT
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Dloader
.path
=
"file://
$BASEDIR
/conf,file://
$BASEDIR
/lib"
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
5503
\
-jar
$MAIN_CLASS
\
>
/dev/null &
...
...
base-manager/src/main/java/com/mortals/xhx/base/framework/config/AccountConfig.java
View file @
7823f81b
package
com.mortals.xhx.base.framework.config
;
import
com.mortals.framework.springcloud.config.web.BaseWebMvcConfigurer
;
import
com.mortals.xhx.base.framework.feign.HierarchicalContract
;
import
feign.Contract
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -12,6 +14,12 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public
class
AccountConfig
{
@Bean
public
Contract
feignContract
()
{
return
new
HierarchicalContract
();
}
@Bean
public
BaseWebMvcConfigurer
getBaseWebMvc
(){
return
new
BaseWebMvcConfigurer
(
false
,
null
);
...
...
base-manager/src/main/java/com/mortals/xhx/base/framework/feign/HierarchicalContract.java
0 → 100644
View file @
7823f81b
package
com.mortals.xhx.base.framework.feign
;
import
feign.MethodMetadata
;
import
feign.Util
;
import
org.springframework.cloud.openfeign.support.SpringMvcContract
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.util.*
;
import
static
org
.
springframework
.
core
.
annotation
.
AnnotationUtils
.
synthesizeAnnotation
;
/**
* 解决feign不能多继承
* @author: zxfei
* @date: 2021/8/13 0:20
* @description:
**/
public
class
HierarchicalContract
extends
SpringMvcContract
{
private
ResourceLoader
resourceLoader
;
@Override
public
List
<
MethodMetadata
>
parseAndValidateMetadata
(
final
Class
<?>
targetType
)
{
Util
.
checkState
(
targetType
.
getTypeParameters
().
length
==
0
,
"Parameterized types unsupported: %s"
,
targetType
.
getSimpleName
());
final
Map
<
String
,
MethodMetadata
>
result
=
new
LinkedHashMap
<>();
for
(
final
Method
method
:
targetType
.
getMethods
())
{
if
(
method
.
getDeclaringClass
()
==
Object
.
class
||
(
method
.
getModifiers
()
&
Modifier
.
STATIC
)
!=
0
||
Util
.
isDefault
(
method
))
{
continue
;
}
final
MethodMetadata
metadata
=
this
.
parseAndValidateMetadata
(
targetType
,
method
);
Util
.
checkState
(!
result
.
containsKey
(
metadata
.
configKey
()),
"Overrides unsupported: %s"
,
metadata
.
configKey
());
result
.
put
(
metadata
.
configKey
(),
metadata
);
}
return
new
ArrayList
<>(
result
.
values
());
}
@Override
public
MethodMetadata
parseAndValidateMetadata
(
final
Class
<?>
targetType
,
final
Method
method
)
{
final
MethodMetadata
methodMetadata
=
super
.
parseAndValidateMetadata
(
targetType
,
method
);
final
LinkedList
<
Class
<?>>
classHierarchy
=
new
LinkedList
<>();
classHierarchy
.
add
(
targetType
);
this
.
findClass
(
targetType
,
method
.
getDeclaringClass
(),
classHierarchy
);
classHierarchy
.
stream
()
.
map
(
this
::
processPathValue
)
.
filter
(
Optional:
:
isPresent
)
.
map
(
Optional:
:
get
)
.
findFirst
()
.
ifPresent
((
path
)
->
methodMetadata
.
template
().
insert
(
0
,
path
));
return
methodMetadata
;
}
private
Optional
<
String
>
processPathValue
(
final
Class
<?>
clz
)
{
Optional
<
String
>
result
=
Optional
.
empty
();
final
RequestMapping
classAnnotation
=
clz
.
getAnnotation
(
RequestMapping
.
class
);
if
(
classAnnotation
!=
null
)
{
final
RequestMapping
synthesizeAnnotation
=
synthesizeAnnotation
(
classAnnotation
,
clz
);
// Prepend path from class annotation if specified
if
(
synthesizeAnnotation
.
value
().
length
>
0
)
{
String
pathValue
=
Util
.
emptyToNull
(
synthesizeAnnotation
.
value
()[
0
]);
pathValue
=
this
.
resolveValue
(
pathValue
);
if
(!
pathValue
.
startsWith
(
"/"
))
{
pathValue
=
"/"
+
pathValue
;
}
result
=
Optional
.
of
(
pathValue
);
}
}
return
result
;
}
private
String
resolveValue
(
final
String
value
)
{
if
(
StringUtils
.
hasText
(
value
)
&&
this
.
resourceLoader
instanceof
ConfigurableApplicationContext
)
{
return
((
ConfigurableApplicationContext
)
this
.
resourceLoader
).
getEnvironment
().
resolvePlaceholders
(
value
);
}
return
value
;
}
@Override
protected
void
processAnnotationOnClass
(
final
MethodMetadata
data
,
final
Class
<?>
clz
)
{
// skip this step
}
private
boolean
findClass
(
final
Class
<?>
currentClass
,
final
Class
<?>
searchClass
,
final
LinkedList
<
Class
<?>>
classHierarchy
)
{
if
(
currentClass
==
searchClass
)
{
return
true
;
}
final
Class
<?>[]
interfaces
=
currentClass
.
getInterfaces
();
for
(
final
Class
<?>
currentInterface
:
interfaces
)
{
classHierarchy
.
add
(
currentInterface
);
final
boolean
findClass
=
this
.
findClass
(
currentInterface
,
searchClass
,
classHierarchy
);
if
(
findClass
)
{
return
true
;
}
classHierarchy
.
removeLast
();
}
return
false
;
}
@Override
public
void
setResourceLoader
(
final
ResourceLoader
resourceLoader
)
{
this
.
resourceLoader
=
resourceLoader
;
super
.
setResourceLoader
(
resourceLoader
);
}
}
common-lib/src/main/java/com/mortals/xhx/common/BrokerConfig.java
deleted
100644 → 0
View file @
400a4a03
package
com.mortals.xhx.common
;
/**
* @author: zxfei
* @date: 2021/11/22 11:17
* @description:
**/
public
class
BrokerConfig
{
}
pom.xml
View file @
7823f81b
...
...
@@ -25,57 +25,6 @@
<common-lib.version>
0.0.1-SNAPSHOT
</common-lib.version>
</properties>
<!-- <profiles>
<profile>
<id>develop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profiles.active>develop</profiles.active>
<profiles.server.port>13211</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers>
<profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<profiles.active>test</profiles.active>
<profiles.server.port>13211</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers>
<profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path>
</properties>
</profile>
<profile>
<id>product</id>
<properties>
<profiles.active>product</profiles.active>
<profiles.server.port>19211</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.kafka.brokers>192.168.0.100:9092</profiles.kafka.brokers>
<profiles.rabbitmq.host>192.168.0.100</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.nacos.server-addr>192.168.0.100:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>stp</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path>
</properties>
</profile>
</profiles>-->
<dependencyManagement>
<dependencies>
<dependency>
...
...
portal-manager/doc/api.md
View file @
7823f81b
...
...
@@ -265,10 +265,10 @@ size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
{
"page":1,
"size":10
}
```
**响应参数:**
...
...
@@ -287,20 +287,10 @@ data|object|数据对象
  
loginName|String|登录名
  
realName|String|用户名
  
mobile|String|用户手机号
  
phone|String|用户联系电话
  
email|String|用户邮箱
  
qq|String|QQ号码
  
userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
  
siteIds|String|所属站点id,多个逗号分隔
  
areaCodes|String|所属区域code,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
  
createTime|Date|创建时间
  
createUserId|Long|创建用户
  
createUserName|String|创建用户名称
  
lastLoginTime|Date|最后一次登录时间
  
lastLoginAddress|String|最后一次登录地址
dict|object|字典对象
 
userType|object|字典属性对象,详见附录
 
status|object|字典属性对象,详见附录
...
...
@@ -346,20 +336,11 @@ data|object|数据对象
 
loginLimitAddress|String|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.
*
非空:则只能该值内的IP可以登录
 
realName|String|用户名
 
mobile|String|用户手机号
 
phone|String|用户联系电话
 
email|String|用户邮箱
 
qq|String|QQ号码
 
userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
 
siteIds|String|所属站点id,多个逗号分隔
 
areaCodes|String|所属区域code,多个逗号分隔
 
roleId|String|所属角色Id,多个逗号分隔
 
roleName|String|所属角色名称,多个逗号分隔
 
status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
 
createTime|Date|创建时间
 
createUserId|Long|创建用户
 
createUserName|String|创建用户名称
 
lastLoginTime|Date|最后一次登录时间
 
lastLoginAddress|String|最后一次登录地址
dict|object|字典对象
 
userType|object|字典属性对象,详见附录
 
status|object|字典属性对象,详见附录
...
...
@@ -369,24 +350,6 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":3476,
"loginName":"pvnl27",
"loginPwd":"izbru3",
"loginLimitAddress":"bpvgc9",
"realName":"3y7knu",
"mobile":"02xs3t",
"phone":"aoqnmo",
"email":"ecyoti",
"qq":"420syx",
"userType":4214,
"siteIds":"m54eoc",
"areaCodes":"utuj9d",
"status":8589,
"createTime":"2022-06-02",
"createUserId":9375,
"createUserName":"ts6g6e",
"lastLoginTime":"2022-06-02",
"lastLoginAddress":"mwpz6s"
}
}
```
...
...
@@ -409,28 +372,17 @@ loginName|String|是|登录名
loginPwd|String|是|登录密码
realName|String|是|用户真实姓名
mobile|String|是|用户手机号
phone|String|是|用户联系电话
email|String|是|用户邮箱
qq|String|是|QQ号码
userType|Integer|是|用户类型(0.系统用户,1.普通用户,2.工作人员)
siteIds|String|是|所属站点id,多个逗号分隔
areaCodes|String|是|所属区域code,多个逗号分隔
status|Integer|是|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
siteIds|String|否|所属站点id,多个逗号分隔
areaCodes|String|否|所属区域code,多个逗号分隔
**请求样例:**
```
{
"loginName":"6njc9h",
"loginPwd":"e8iiea",
"realName":"coyvcd",
"mobile":"avklzq",
"phone":"6da3c3",
"email":"yyl8wf",
"qq":"y8tw1p",
"userType":4441,
"siteIds":"hgh6s1",
"areaCodes":"a4cexd",
"status":710
"areaCodes":"a4cexd"
}
```
...
...
@@ -443,25 +395,15 @@ msg|String|消息
data|object|数据对象
 
id|Long|保存后主键id
 
entity|object|保存更新实体
  
id|Long|用户ID
,主键,自增长
  
id|Long|用户ID
  
loginName|String|登录名
  
loginLimitAddress|String|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.
*
非空:则只能该值内的IP可以登录
  
realName|String|用户名
  
mobile|String|用户手机号
  
phone|String|用户联系电话
  
email|String|用户邮箱
  
qq|String|QQ号码
  
userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
  
siteIds|String|所属站点id,多个逗号分隔
  
areaCodes|String|所属区域code,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
  
createTime|Date|创建时间
  
createUserId|Long|创建用户
  
createUserName|String|创建用户名称
  
lastLoginTime|Date|最后一次登录时间
  
lastLoginAddress|String|最后一次登录地址
**响应消息样例:**
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment