Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hubin
long-tern-care-service
Commits
621a70c4
Commit
621a70c4
authored
Apr 02, 2021
by
贾国凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户权限表相关修改
parent
7ee888fb
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
263 additions
and
56 deletions
+263
-56
UserDetailsServiceImpl.java
...java/com/hungraim/ism/service/UserDetailsServiceImpl.java
+1
-1
ChSrvBuildBed.java
...om/hungraim/ism/pojo/entity/governance/ChSrvBuildBed.java
+15
-0
ChSrvRemoveBed.java
...m/hungraim/ism/pojo/entity/governance/ChSrvRemoveBed.java
+42
-0
SystemClientDetails.java
.../hungraim/ism/pojo/entity/system/SystemClientDetails.java
+13
-17
SystemResource.java
...a/com/hungraim/ism/pojo/entity/system/SystemResource.java
+12
-11
SystemRole.java
.../java/com/hungraim/ism/pojo/entity/system/SystemRole.java
+7
-8
SystemRoleResource.java
...m/hungraim/ism/pojo/entity/system/SystemRoleResource.java
+5
-5
SystemUser.java
.../java/com/hungraim/ism/pojo/entity/system/SystemUser.java
+2
-3
SystemUserRole.java
...a/com/hungraim/ism/pojo/entity/system/SystemUserRole.java
+2
-5
UserLoginInfoVO.java
...java/com/hungraim/ism/pojo/vo/system/UserLoginInfoVO.java
+1
-1
pom.xml
common/common-mybatis/pom.xml
+2
-2
pom.xml
governance/pom.xml
+100
-0
GovernanceApplication.java
...ava/com/hungraim/ch/governance/GovernanceApplication.java
+16
-0
bootstrap.yml
governance/src/main/resources/bootstrap.yml
+33
-0
pom.xml
pom.xml
+2
-1
SystemUserFeignService.java
...ain/java/com/hungraim/ism/api/SystemUserFeignService.java
+8
-0
SystemResourceMapper.java
...ava/com/hungraim/ism/system/dao/SystemResourceMapper.java
+1
-1
SystemRoleResourceMapper.java
...com/hungraim/ism/system/dao/SystemRoleResourceMapper.java
+1
-1
No files found.
auth-service/src/main/java/com/hungraim/ism/service/UserDetailsServiceImpl.java
View file @
621a70c4
...
...
@@ -33,7 +33,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
}
SystemUser
systemUser
=
userRes
.
getData
();
//根据用户id获取用户权限
Result
<
List
<
Long
>>
roles
=
systemUserFeignService
.
loadUserRolesByUserId
(
systemUser
.
getId
());
Result
<
List
<
Long
>>
roles
=
systemUserFeignService
.
loadUserRolesByUserId
(
systemUser
.
get
User
Id
());
UserLoginInfoVO
userLoginInfoVO
=
new
UserLoginInfoVO
(
systemUser
);
userLoginInfoVO
.
setAuthorities
(
roles
.
getData
());
...
...
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/governance/ChSrvBuildBed.java
0 → 100644
View file @
621a70c4
package
com
.
hungraim
.
ism
.
pojo
.
entity
.
governance
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author jiaguokai
*/
@Data
@TableName
(
"CH_SRV_BUILD_BED"
)
public
class
ChSrvBuildBed
{
private
Integer
buildBedId
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/governance/ChSrvRemoveBed.java
0 → 100644
View file @
621a70c4
package
com
.
hungraim
.
ism
.
pojo
.
entity
.
governance
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author jiaguokai
*/
@Data
@TableName
(
"CH_SRV_REMOVE_BED"
)
public
class
ChSrvRemoveBed
{
private
Integer
removeBedId
;
private
Integer
srvOrganId
;
private
Integer
disabInfoId
;
private
Integer
buildBedId
;
private
Integer
programId
;
private
String
realName
;
private
String
gender
;
private
Date
birthday
;
private
String
tel
;
private
Integer
rating
;
private
Integer
guaranteeMode
;
private
Date
buildBedTime
;
private
String
specialZone
;
private
String
changhuNo
;
private
String
bedNumber
;
private
Date
removeBedTime
;
private
Integer
bedDays
;
private
String
diagnosis
;
private
String
bedConstruction
;
private
String
nursingProcess
;
private
Integer
removeBedReason
;
private
String
removeBedProposal
;
private
Integer
status
;
private
Date
fcd
;
private
Integer
fcu
;
private
Date
lcd
;
private
Integer
lcu
;
private
String
removeBedReasonRemarks
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemClientDetails.java
View file @
621a70c4
...
...
@@ -7,24 +7,20 @@ import lombok.Data;
* @author hubin
*/
@Data
@TableName
(
"
oauth_client_details
"
)
@TableName
(
"
OAUTH_CLIENT_DETAILS
"
)
public
class
SystemClientDetails
{
private
String
clientId
;
private
String
resourceIds
;
private
String
clientSecret
;
private
String
scope
;
private
String
authorizedGrantTypes
;
private
String
webServerRedirectUri
;
private
String
authorities
;
private
String
accessTokenValidity
;
private
String
refreshTokenValidity
;
private
String
additionalInformation
;
private
String
autoapprove
;
private
String
clientName
;
private
String
clientId
;
private
String
resourceIds
;
private
String
clientSecret
;
private
String
scope
;
private
String
authorizedGrantTypes
;
private
String
webServerRedirectUri
;
private
String
authorities
;
private
String
accessTokenValidity
;
private
String
refreshTokenValidity
;
private
String
additionalInformation
;
private
String
autoapprove
;
private
String
clientName
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemResource.java
View file @
621a70c4
...
...
@@ -8,23 +8,24 @@ import java.util.Date;
import
java.util.List
;
/**
*
*
* 系统资源表,用于权限验证
*
* @author hubin
*/
@Data
@TableName
(
"
ISM
_RESOURCE"
)
@TableName
(
"
LTC
_RESOURCE"
)
public
class
SystemResource
{
private
Long
id
;
private
String
resourceName
;
private
String
resourceUrl
;
private
String
method
;
private
String
resourceType
;
private
Date
createTime
;
private
Long
resourceId
;
private
String
resourceName
;
private
String
resourceUrl
;
private
String
resourceType
;
private
String
method
;
private
Long
parentId
;
private
String
resourceIcon
;
private
Date
createdTime
;
@TableField
(
exist
=
false
)
private
List
<
Long
>
roleIds
;
@TableField
(
exist
=
false
)
private
List
<
Long
>
roleIds
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemRole.java
View file @
621a70c4
...
...
@@ -7,18 +7,17 @@ import java.util.Date;
/**
* 角色表,根据该表与 {@link SystemResource} 共同实现权限管理
*
* @author hubin
*/
@Data
@TableName
(
"ISM_ROLE"
)
@TableName
(
"LTC_ROLE"
)
public
class
SystemRole
{
private
Long
id
;
private
String
name
;
private
String
status
;
private
Date
createTime
;
private
Date
modifyTime
;
private
Long
roleId
;
private
String
roleName
;
private
String
status
;
private
Date
createdTime
;
private
Date
updatedTime
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemRoleResource.java
View file @
621a70c4
...
...
@@ -4,15 +4,15 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
lombok.Data
;
/**
*
* 资源权限关联表
*
* @author hubin
*/
@Data
@TableName
(
"
ISM
_ROLE_RESOURCE"
)
@TableName
(
"
LTC
_ROLE_RESOURCE"
)
public
class
SystemRoleResource
{
private
Long
id
;
private
Long
roleId
;
private
Long
resourceId
;
private
Long
roleId
;
private
Long
resourceId
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemUser.java
View file @
621a70c4
...
...
@@ -15,11 +15,10 @@ import java.util.List;
*/
@Data
@NoArgsConstructor
@TableName
(
"
ISM
_USER"
)
@TableName
(
"
LTC
_USER"
)
public
class
SystemUser
{
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
userId
;
private
String
account
;
private
String
password
;
private
String
realName
;
...
...
common/common-core/src/main/java/com/hungraim/ism/pojo/entity/system/SystemUserRole.java
View file @
621a70c4
...
...
@@ -7,16 +7,13 @@ import lombok.Data;
/**
* 用户-角色关联表
* @author hubin
*
* @author hubin
*/
@Data
@TableName
(
"
ISM
_USER_ROLE"
)
@TableName
(
"
LTC
_USER_ROLE"
)
public
class
SystemUserRole
{
private
Long
id
;
private
Long
userId
;
private
Long
roleId
;
}
common/common-core/src/main/java/com/hungraim/ism/pojo/vo/system/UserLoginInfoVO.java
View file @
621a70c4
...
...
@@ -28,7 +28,7 @@ public class UserLoginInfoVO implements UserDetails {
this
.
username
=
user
.
getAccount
();
this
.
password
=
user
.
getPassword
();
this
.
name
=
user
.
getRealName
();
this
.
userId
=
user
.
getId
();
this
.
userId
=
user
.
get
User
Id
();
this
.
enable
=
"1"
.
equals
(
user
.
getUserStatus
())
;
}
...
...
common/common-mybatis/pom.xml
View file @
621a70c4
...
...
@@ -24,9 +24,9 @@
<version>
3.3.1
</version>
</dependency>
<dependency>
<groupId>
com.oracle
</groupId>
<groupId>
com.oracle
.database.jdbc
</groupId>
<artifactId>
ojdbc6
</artifactId>
<version>
11.
1.0.7.0
</version>
<version>
11.
2.0.4
</version>
</dependency>
<dependency>
<groupId>
org.mybatis.generator
</groupId>
...
...
governance/pom.xml
0 → 100644
View file @
621a70c4
<?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"
>
<parent>
<artifactId>
long-term-care
</artifactId>
<groupId>
com.hungraim.ism
</groupId>
<version>
0.0.1
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<!--管控服务-->
<artifactId>
governance
</artifactId>
<properties>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.target>
8
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-config -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId>
<version>
2.2.5.RELEASE
</version>
</dependency>
<!--基础包-->
<dependency>
<groupId>
com.hungraim.ism
</groupId>
<artifactId>
common-core
</artifactId>
<version>
0.0.1
</version>
<exclusions>
<exclusion>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-config
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-oauth2-jose
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.apache.tomcat.embed
</groupId>
<artifactId>
tomcat-embed-core
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.hungraim.ism
</groupId>
<artifactId>
common-mybatis
</artifactId>
<version>
0.0.1
</version>
</dependency>
<dependency>
<groupId>
com.hungraim.ism
</groupId>
<artifactId>
common-redis
</artifactId>
<version>
0.0.1
</version>
</dependency>
<!--基础包 end-->
<!-- spring boot web -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<fork>
true
</fork>
<!--重要-->
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>
releases
</id>
<name>
Nexus Release Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-releases/
</url>
</repository>
<snapshotRepository>
<id>
snapshots
</id>
<name>
Nexus Snapshot Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-snapshots/
</url>
</snapshotRepository>
</distributionManagement>
</project>
\ No newline at end of file
governance/src/main/java/com/hungraim/ch/governance/GovernanceApplication.java
0 → 100644
View file @
621a70c4
package
com
.
hungraim
.
ch
.
governance
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
/**
* @author jiaguokai
*/
@SpringBootApplication
@EnableDiscoveryClient
public
class
GovernanceApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
GovernanceApplication
.
class
,
args
);
}
}
governance/src/main/resources/bootstrap.yml
0 → 100644
View file @
621a70c4
spring
:
devtools
:
restart
:
enabled
:
true
additional-paths
:
src/main/java
application
:
name
:
ISM-GOVERNANCE-SERVICE
cloud
:
nacos
:
discovery
:
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c90
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c90
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
-
data-id
:
ism-database.yaml
group
:
common
refresh
:
true
-
data-id
:
ism-basic.yaml
group
:
common
refresh
:
true
-
data-id
:
thread-config.yaml
group
:
system
refresh
:
true
server
:
port
:
8009
mybatis-plus
:
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
pom.xml
View file @
621a70c4
...
...
@@ -8,6 +8,7 @@
<module>
common
</module>
<module>
system
</module>
<module>
apply
</module>
<module>
governance
</module>
</modules>
<parent>
<groupId>
org.springframework.boot
</groupId>
...
...
@@ -17,7 +18,7 @@
</parent>
<packaging>
pom
</packaging>
<groupId>
com.hungraim.ism
</groupId>
<artifactId>
ism
</artifactId>
<artifactId>
long-term-care
</artifactId>
<version>
0.0.1
</version>
<name>
spring-cloud-init
</name>
<description>
parent
</description>
...
...
system/system-api/src/main/java/com/hungraim/ism/api/SystemUserFeignService.java
View file @
621a70c4
...
...
@@ -32,4 +32,12 @@ public interface SystemUserFeignService {
@GetMapping
(
"/api.system/user/loadUserRolesByUserId/{id}"
)
Result
<
List
<
Long
>>
loadUserRolesByUserId
(
@PathVariable
Long
id
);
/**
* feign api 根据用户表关联的marketerCode获取用户绑定的营销员信息
* @param code marketerCode
* @return 营销员信息
*/
// @GetMapping("/api.system/user/loadUserDetailByCode/{code}")
// Result<SystemMarketer> loadUserDetailByCode(@PathVariable String code);
}
system/system-user-service/src/main/java/com/hungraim/ism/system/dao/SystemResourceMapper.java
View file @
621a70c4
...
...
@@ -17,7 +17,7 @@ public interface SystemResourceMapper extends BaseMapper<SystemResource> {
* 查询所有资源对应的角色
* @return list
*/
@Select
(
"SELECT
ID,RESOURCE_NAME,RESOURCE_URL,METHOD FROM ISM
_RESOURCE"
)
@Select
(
"SELECT
RESOURCE_ID,RESOURCE_NAME,RESOURCE_URL,METHOD FROM LTC
_RESOURCE"
)
@Results
({
@Result
(
property
=
"roleIds"
,
column
=
"id"
,
many
=
@Many
(
select
=
"com.hungraim.ism.system.dao.SystemRoleResourceMapper.listRoleIds"
))
})
...
...
system/system-user-service/src/main/java/com/hungraim/ism/system/dao/SystemRoleResourceMapper.java
View file @
621a70c4
...
...
@@ -20,6 +20,6 @@ public interface SystemRoleResourceMapper extends BaseMapper<SystemRoleResource>
* @param resourceId 资源id
* @return 角色id
*/
@Select
(
"SELECT ROLE_ID FROM
ISM
_ROLE_RESOURCE WHERE RESOURCE_ID = #{resourceId} "
)
@Select
(
"SELECT ROLE_ID FROM
LTC
_ROLE_RESOURCE WHERE RESOURCE_ID = #{resourceId} "
)
List
<
Long
>
listRoleIds
(
long
resourceId
);
}
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