Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loginservice
Overview
Overview
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
lanmw
loginservice
Commits
9d163ab4
Commit
9d163ab4
authored
Apr 29, 2024
by
xieshaohua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
麦当劳peopleCenter用户同步
parent
13f9a9ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1070 additions
and
1 deletion
+1070
-1
pom.xml
pom.xml
+6
-0
LoginApplication.java
src/main/java/com/keymobile/login/LoginApplication.java
+2
-0
PeopleCenterApi.java
src/main/java/com/keymobile/login/api/PeopleCenterApi.java
+0
-0
Swagger2Config.java
src/main/java/com/keymobile/login/conf/Swagger2Config.java
+37
-0
MdcLogEnhancerFilter.java
...ava/com/keymobile/login/logging/MdcLogEnhancerFilter.java
+1
-1
SsoOrganMcclRepository.java
...m/keymobile/login/persistence/SsoOrganMcclRepository.java
+14
-0
SsoOrganRepository.java
...a/com/keymobile/login/persistence/SsoOrganRepository.java
+15
-0
SsoUserMcclRepository.java
...om/keymobile/login/persistence/SsoUserMcclRepository.java
+24
-0
SsoUserRepository.java
...va/com/keymobile/login/persistence/SsoUserRepository.java
+16
-0
SsoOrganAbstract.java
...m/keymobile/login/persistence/model/SsoOrganAbstract.java
+235
-0
SsoOrganMcclAbstract.java
...ymobile/login/persistence/model/SsoOrganMcclAbstract.java
+247
-0
SsoUserAbstract.java
...om/keymobile/login/persistence/model/SsoUserAbstract.java
+133
-0
SsoUserMcclAbstract.java
...eymobile/login/persistence/model/SsoUserMcclAbstract.java
+156
-0
HttpUtil.java
src/main/java/com/keymobile/login/util/HttpUtil.java
+100
-0
application-local.yml
src/main/resources/application-local.yml
+10
-0
application-mcd.yml
src/main/resources/application-mcd.yml
+74
-0
No files found.
pom.xml
View file @
9d163ab4
...
@@ -157,6 +157,12 @@
...
@@ -157,6 +157,12 @@
<artifactId>
crypto
</artifactId>
<artifactId>
crypto
</artifactId>
<version>
1.1.5-release
</version>
<version>
1.1.5-release
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.83
</version>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
...
...
src/main/java/com/keymobile/login/LoginApplication.java
View file @
9d163ab4
...
@@ -4,10 +4,12 @@ import org.springframework.boot.SpringApplication;
...
@@ -4,10 +4,12 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.scheduling.annotation.EnableAsync
;
@SpringBootApplication
@SpringBootApplication
@EnableDiscoveryClient
@EnableDiscoveryClient
@EnableFeignClients
@EnableFeignClients
@EnableAsync
public
class
LoginApplication
{
public
class
LoginApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/keymobile/login/api/PeopleCenterApi.java
0 → 100644
View file @
9d163ab4
This diff is collapsed.
Click to expand it.
src/main/java/com/keymobile/login/conf/Swagger2Config.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
conf
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@Configuration
@EnableSwagger2
public
class
Swagger2Config
{
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.keymobile.login.api"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"DATA MODEL RESTful APIs"
)
.
description
(
"Spring Boot Swagger2"
)
.
termsOfServiceUrl
(
"http://www.keymobile.com.cn/"
)
.
contact
(
"keymobile"
)
.
version
(
"1.0"
)
.
build
();
}
}
src/main/java/com/keymobile/login/logging/MdcLogEnhancerFilter.java
View file @
9d163ab4
...
@@ -10,7 +10,7 @@ import org.springframework.web.context.request.RequestContextHolder;
...
@@ -10,7 +10,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import
javax.servlet.*
;
import
javax.servlet.*
;
import
java.io.IOException
;
import
java.io.IOException
;
@Component
//
@Component
public
class
MdcLogEnhancerFilter
implements
Filter
{
public
class
MdcLogEnhancerFilter
implements
Filter
{
@Override
@Override
...
...
src/main/java/com/keymobile/login/persistence/SsoOrganMcclRepository.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
;
import
com.keymobile.login.persistence.model.SsoOrganMcclAbstract
;
import
org.springframework.data.repository.CrudRepository
;
import
javax.transaction.Transactional
;
import
java.util.List
;
@Transactional
public
interface
SsoOrganMcclRepository
extends
CrudRepository
<
SsoOrganMcclAbstract
,
String
>
{
List
<
SsoOrganMcclAbstract
>
getByOrganizationname
(
String
name
);
}
src/main/java/com/keymobile/login/persistence/SsoOrganRepository.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
;
import
com.keymobile.login.persistence.model.SsoOrganAbstract
;
import
com.keymobile.login.persistence.model.SsoUserAbstract
;
import
org.springframework.data.repository.CrudRepository
;
import
javax.transaction.Transactional
;
import
java.util.List
;
@Transactional
public
interface
SsoOrganRepository
extends
CrudRepository
<
SsoOrganAbstract
,
String
>
{
List
<
SsoUserAbstract
>
getByOrganizationname
(
String
name
);
}
src/main/java/com/keymobile/login/persistence/SsoUserMcclRepository.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
;
import
com.keymobile.login.persistence.model.SsoUserAbstract
;
import
com.keymobile.login.persistence.model.SsoUserMcclAbstract
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.repository.CrudRepository
;
import
javax.transaction.Transactional
;
import
java.util.List
;
@Transactional
public
interface
SsoUserMcclRepository
extends
CrudRepository
<
SsoUserMcclAbstract
,
String
>
{
List
<
SsoUserMcclAbstract
>
getByUsername
(
String
name
);
List
<
SsoUserMcclAbstract
>
getByOrganizationnameLike
(
String
organName
);
Page
<
SsoUserMcclAbstract
>
findAll
(
Specification
<
SsoUserMcclAbstract
>
spec
,
Pageable
pageable
);
List
<
SsoUserMcclAbstract
>
findAll
(
Specification
<
SsoUserMcclAbstract
>
spec
,
Sort
sort
);
}
src/main/java/com/keymobile/login/persistence/SsoUserRepository.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
;
import
com.keymobile.login.persistence.model.SsoUserAbstract
;
import
org.springframework.data.repository.CrudRepository
;
import
javax.transaction.Transactional
;
import
java.util.List
;
@Transactional
public
interface
SsoUserRepository
extends
CrudRepository
<
SsoUserAbstract
,
String
>
{
List
<
SsoUserAbstract
>
getByUsername
(
String
name
);
List
<
SsoUserAbstract
>
getByOrganizationnameLike
(
String
organName
);
}
src/main/java/com/keymobile/login/persistence/model/SsoOrganAbstract.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
.
model
;
import
javax.persistence.*
;
/**
* @author xiesh
* @version 1.0.0
* @date 2024/4/26
* @desc
*/
@Entity
@Table
(
name
=
"sso_organ"
)
public
class
SsoOrganAbstract
{
@Id
private
String
organizationid
;
private
String
orgtype
;
private
String
isstore
;
private
String
orgmail
;
private
String
address
;
private
String
telephonenumber
;
private
String
cityname
;
private
String
parentorganizationid
;
private
String
internalexternal
;
private
String
opstype
;
private
String
storemanagernum
;
private
String
postalcode
;
private
String
citycode
;
private
String
organizationname
;
private
String
company
;
private
String
location
;
private
String
datefrom
;
private
String
parentorganization
;
private
String
costcenter
;
private
String
path
;
private
String
idpath
;
public
SsoOrganAbstract
()
{
}
public
String
getOrganizationid
()
{
return
organizationid
;
}
public
void
setOrganizationid
(
String
organizationid
)
{
this
.
organizationid
=
organizationid
;
}
public
String
getOrgtype
()
{
return
orgtype
;
}
public
void
setOrgtype
(
String
orgtype
)
{
this
.
orgtype
=
orgtype
;
}
public
String
getIsstore
()
{
return
isstore
;
}
public
void
setIsstore
(
String
isstore
)
{
this
.
isstore
=
isstore
;
}
public
String
getOrgmail
()
{
return
orgmail
;
}
public
void
setOrgmail
(
String
orgmail
)
{
this
.
orgmail
=
orgmail
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getTelephonenumber
()
{
return
telephonenumber
;
}
public
void
setTelephonenumber
(
String
telephonenumber
)
{
this
.
telephonenumber
=
telephonenumber
;
}
public
String
getCityname
()
{
return
cityname
;
}
public
void
setCityname
(
String
cityname
)
{
this
.
cityname
=
cityname
;
}
public
String
getParentorganizationid
()
{
return
parentorganizationid
;
}
public
void
setParentorganizationid
(
String
parentorganizationid
)
{
this
.
parentorganizationid
=
parentorganizationid
;
}
public
String
getInternalexternal
()
{
return
internalexternal
;
}
public
void
setInternalexternal
(
String
internalexternal
)
{
this
.
internalexternal
=
internalexternal
;
}
public
String
getOpstype
()
{
return
opstype
;
}
public
void
setOpstype
(
String
opstype
)
{
this
.
opstype
=
opstype
;
}
public
String
getStoremanagernum
()
{
return
storemanagernum
;
}
public
void
setStoremanagernum
(
String
storemanagernum
)
{
this
.
storemanagernum
=
storemanagernum
;
}
public
String
getPostalcode
()
{
return
postalcode
;
}
public
void
setPostalcode
(
String
postalcode
)
{
this
.
postalcode
=
postalcode
;
}
public
String
getCitycode
()
{
return
citycode
;
}
public
void
setCitycode
(
String
citycode
)
{
this
.
citycode
=
citycode
;
}
public
String
getOrganizationname
()
{
return
organizationname
;
}
public
void
setOrganizationname
(
String
organizationname
)
{
this
.
organizationname
=
organizationname
;
}
public
String
getCompany
()
{
return
company
;
}
public
void
setCompany
(
String
company
)
{
this
.
company
=
company
;
}
public
String
getLocation
()
{
return
location
;
}
public
void
setLocation
(
String
location
)
{
this
.
location
=
location
;
}
public
String
getDatefrom
()
{
return
datefrom
;
}
public
void
setDatefrom
(
String
datefrom
)
{
this
.
datefrom
=
datefrom
;
}
public
String
getParentorganization
()
{
return
parentorganization
;
}
public
void
setParentorganization
(
String
parentorganization
)
{
this
.
parentorganization
=
parentorganization
;
}
public
String
getCostcenter
()
{
return
costcenter
;
}
public
void
setCostcenter
(
String
costcenter
)
{
this
.
costcenter
=
costcenter
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
public
String
getIdpath
()
{
return
idpath
;
}
public
void
setIdpath
(
String
idpath
)
{
this
.
idpath
=
idpath
;
}
@Override
public
String
toString
()
{
return
"SsoOrganAbstract{"
+
"organizationid='"
+
organizationid
+
'\''
+
", orgtype='"
+
orgtype
+
'\''
+
", isstore='"
+
isstore
+
'\''
+
", orgmail='"
+
orgmail
+
'\''
+
", address='"
+
address
+
'\''
+
", telephonenumber='"
+
telephonenumber
+
'\''
+
", cityname='"
+
cityname
+
'\''
+
", parentorganizationid='"
+
parentorganizationid
+
'\''
+
", internalexternal='"
+
internalexternal
+
'\''
+
", opstype='"
+
opstype
+
'\''
+
", storemanagernum='"
+
storemanagernum
+
'\''
+
", postalcode='"
+
postalcode
+
'\''
+
", citycode='"
+
citycode
+
'\''
+
", organizationname='"
+
organizationname
+
'\''
+
", company='"
+
company
+
'\''
+
", location='"
+
location
+
'\''
+
", datefrom='"
+
datefrom
+
'\''
+
", parentorganization='"
+
parentorganization
+
'\''
+
", costcenter='"
+
costcenter
+
'\''
+
'}'
;
}
}
src/main/java/com/keymobile/login/persistence/model/SsoOrganMcclAbstract.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author xiesh
* @version 1.0.0
* @date 2024/4/26
* @desc
*/
@Entity
@Table
(
name
=
"sso_organ_mccl"
)
public
class
SsoOrganMcclAbstract
{
@Id
private
String
organizationid
;
private
String
orgtype
;
private
String
isstore
;
private
String
orgmail
;
private
String
address
;
private
String
telephonenumber
;
private
String
cityname
;
private
String
parentorganizationid
;
private
String
internalexternal
;
private
String
opstype
;
private
String
storemanagernum
;
private
String
postalcode
;
private
String
citycode
;
private
String
organizationname
;
private
String
company
;
private
String
location
;
private
String
datefrom
;
private
String
parentorganization
;
private
String
costcenter
;
private
String
path
;
private
String
idpath
;
@Transient
private
List
<
SsoOrganMcclAbstract
>
children
=
new
ArrayList
<>();
public
String
getOrganizationid
()
{
return
organizationid
;
}
public
void
setOrganizationid
(
String
organizationid
)
{
this
.
organizationid
=
organizationid
;
}
public
String
getOrgtype
()
{
return
orgtype
;
}
public
void
setOrgtype
(
String
orgtype
)
{
this
.
orgtype
=
orgtype
;
}
public
String
getIsstore
()
{
return
isstore
;
}
public
void
setIsstore
(
String
isstore
)
{
this
.
isstore
=
isstore
;
}
public
String
getOrgmail
()
{
return
orgmail
;
}
public
void
setOrgmail
(
String
orgmail
)
{
this
.
orgmail
=
orgmail
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getTelephonenumber
()
{
return
telephonenumber
;
}
public
void
setTelephonenumber
(
String
telephonenumber
)
{
this
.
telephonenumber
=
telephonenumber
;
}
public
String
getCityname
()
{
return
cityname
;
}
public
void
setCityname
(
String
cityname
)
{
this
.
cityname
=
cityname
;
}
public
String
getParentorganizationid
()
{
return
parentorganizationid
;
}
public
void
setParentorganizationid
(
String
parentorganizationid
)
{
this
.
parentorganizationid
=
parentorganizationid
;
}
public
String
getInternalexternal
()
{
return
internalexternal
;
}
public
void
setInternalexternal
(
String
internalexternal
)
{
this
.
internalexternal
=
internalexternal
;
}
public
String
getOpstype
()
{
return
opstype
;
}
public
void
setOpstype
(
String
opstype
)
{
this
.
opstype
=
opstype
;
}
public
String
getStoremanagernum
()
{
return
storemanagernum
;
}
public
void
setStoremanagernum
(
String
storemanagernum
)
{
this
.
storemanagernum
=
storemanagernum
;
}
public
String
getPostalcode
()
{
return
postalcode
;
}
public
void
setPostalcode
(
String
postalcode
)
{
this
.
postalcode
=
postalcode
;
}
public
String
getCitycode
()
{
return
citycode
;
}
public
void
setCitycode
(
String
citycode
)
{
this
.
citycode
=
citycode
;
}
public
String
getOrganizationname
()
{
return
organizationname
;
}
public
void
setOrganizationname
(
String
organizationname
)
{
this
.
organizationname
=
organizationname
;
}
public
String
getCompany
()
{
return
company
;
}
public
void
setCompany
(
String
company
)
{
this
.
company
=
company
;
}
public
String
getLocation
()
{
return
location
;
}
public
void
setLocation
(
String
location
)
{
this
.
location
=
location
;
}
public
String
getDatefrom
()
{
return
datefrom
;
}
public
void
setDatefrom
(
String
datefrom
)
{
this
.
datefrom
=
datefrom
;
}
public
String
getParentorganization
()
{
return
parentorganization
;
}
public
void
setParentorganization
(
String
parentorganization
)
{
this
.
parentorganization
=
parentorganization
;
}
public
String
getCostcenter
()
{
return
costcenter
;
}
public
void
setCostcenter
(
String
costcenter
)
{
this
.
costcenter
=
costcenter
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
public
String
getIdpath
()
{
return
idpath
;
}
public
void
setIdpath
(
String
idpath
)
{
this
.
idpath
=
idpath
;
}
public
List
<
SsoOrganMcclAbstract
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
SsoOrganMcclAbstract
>
children
)
{
this
.
children
=
children
;
}
@Override
public
String
toString
()
{
return
"SsoOrganAbstract{"
+
"organizationid='"
+
organizationid
+
'\''
+
", orgtype='"
+
orgtype
+
'\''
+
", isstore='"
+
isstore
+
'\''
+
", orgmail='"
+
orgmail
+
'\''
+
", address='"
+
address
+
'\''
+
", telephonenumber='"
+
telephonenumber
+
'\''
+
", cityname='"
+
cityname
+
'\''
+
", parentorganizationid='"
+
parentorganizationid
+
'\''
+
", internalexternal='"
+
internalexternal
+
'\''
+
", opstype='"
+
opstype
+
'\''
+
", storemanagernum='"
+
storemanagernum
+
'\''
+
", postalcode='"
+
postalcode
+
'\''
+
", citycode='"
+
citycode
+
'\''
+
", organizationname='"
+
organizationname
+
'\''
+
", company='"
+
company
+
'\''
+
", location='"
+
location
+
'\''
+
", datefrom='"
+
datefrom
+
'\''
+
", parentorganization='"
+
parentorganization
+
'\''
+
", costcenter='"
+
costcenter
+
'\''
+
'}'
;
}
}
src/main/java/com/keymobile/login/persistence/model/SsoUserAbstract.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
.
model
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"sso_user"
)
public
class
SsoUserAbstract
{
@Id
private
String
employeenumber
;
private
String
organizationid
;
private
String
firstname
;
private
String
adid
;
private
String
organizationname
;
private
String
workcity
;
private
String
chinesename
;
private
String
persontype
;
private
String
jobname
;
private
String
lastname
;
private
String
username
;
private
String
path
;
private
String
idpath
;
public
SsoUserAbstract
()
{
}
public
String
getOrganizationid
()
{
return
organizationid
;
}
public
void
setOrganizationid
(
String
organizationid
)
{
this
.
organizationid
=
organizationid
;
}
public
String
getFirstname
()
{
return
firstname
;
}
public
void
setFirstname
(
String
firstname
)
{
this
.
firstname
=
firstname
;
}
public
String
getAdid
()
{
return
adid
;
}
public
void
setAdid
(
String
adid
)
{
this
.
adid
=
adid
;
}
public
String
getEmployeenumber
()
{
return
employeenumber
;
}
public
void
setEmployeenumber
(
String
employeenumber
)
{
this
.
employeenumber
=
employeenumber
;
}
public
String
getOrganizationname
()
{
return
organizationname
;
}
public
void
setOrganizationname
(
String
organizationname
)
{
this
.
organizationname
=
organizationname
;
}
public
String
getWorkcity
()
{
return
workcity
;
}
public
void
setWorkcity
(
String
workcity
)
{
this
.
workcity
=
workcity
;
}
public
String
getChinesename
()
{
return
chinesename
;
}
public
void
setChinesename
(
String
chinesename
)
{
this
.
chinesename
=
chinesename
;
}
public
String
getPersontype
()
{
return
persontype
;
}
public
void
setPersontype
(
String
persontype
)
{
this
.
persontype
=
persontype
;
}
public
String
getJobname
()
{
return
jobname
;
}
public
void
setJobname
(
String
jobname
)
{
this
.
jobname
=
jobname
;
}
public
String
getLastname
()
{
return
lastname
;
}
public
void
setLastname
(
String
lastname
)
{
this
.
lastname
=
lastname
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
public
String
getIdpath
()
{
return
idpath
;
}
public
void
setIdpath
(
String
idpath
)
{
this
.
idpath
=
idpath
;
}
}
src/main/java/com/keymobile/login/persistence/model/SsoUserMcclAbstract.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
persistence
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.util.List
;
@Entity
@Table
(
name
=
"sso_user_mccl"
)
public
class
SsoUserMcclAbstract
{
@Id
protected
String
employeenumber
;
protected
String
organizationid
;
protected
String
firstname
;
protected
String
adid
;
protected
String
organizationname
;
protected
String
workcity
;
protected
String
chinesename
;
protected
String
persontype
;
protected
String
jobname
;
protected
String
lastname
;
protected
String
username
;
protected
String
path
;
protected
String
idpath
;
public
SsoUserMcclAbstract
()
{
}
public
String
getEmployeenumber
()
{
return
employeenumber
;
}
public
void
setEmployeenumber
(
String
employeenumber
)
{
this
.
employeenumber
=
employeenumber
;
}
public
String
getOrganizationid
()
{
return
organizationid
;
}
public
void
setOrganizationid
(
String
organizationid
)
{
this
.
organizationid
=
organizationid
;
}
public
String
getFirstname
()
{
return
firstname
;
}
public
void
setFirstname
(
String
firstname
)
{
this
.
firstname
=
firstname
;
}
public
String
getAdid
()
{
return
adid
;
}
public
void
setAdid
(
String
adid
)
{
this
.
adid
=
adid
;
}
public
String
getOrganizationname
()
{
return
organizationname
;
}
public
void
setOrganizationname
(
String
organizationname
)
{
this
.
organizationname
=
organizationname
;
}
public
String
getWorkcity
()
{
return
workcity
;
}
public
void
setWorkcity
(
String
workcity
)
{
this
.
workcity
=
workcity
;
}
public
String
getChinesename
()
{
return
chinesename
;
}
public
void
setChinesename
(
String
chinesename
)
{
this
.
chinesename
=
chinesename
;
}
public
String
getPersontype
()
{
return
persontype
;
}
public
void
setPersontype
(
String
persontype
)
{
this
.
persontype
=
persontype
;
}
public
String
getJobname
()
{
return
jobname
;
}
public
void
setJobname
(
String
jobname
)
{
this
.
jobname
=
jobname
;
}
public
String
getLastname
()
{
return
lastname
;
}
public
void
setLastname
(
String
lastname
)
{
this
.
lastname
=
lastname
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
public
String
getIdpath
()
{
return
idpath
;
}
public
void
setIdpath
(
String
idpath
)
{
this
.
idpath
=
idpath
;
}
@Override
public
String
toString
()
{
return
"SsoUserMcclAbstract{"
+
"employeenumber='"
+
employeenumber
+
'\''
+
", organizationid='"
+
organizationid
+
'\''
+
", firstname='"
+
firstname
+
'\''
+
", adid='"
+
adid
+
'\''
+
", organizationname='"
+
organizationname
+
'\''
+
", workcity='"
+
workcity
+
'\''
+
", chinesename='"
+
chinesename
+
'\''
+
", persontype='"
+
persontype
+
'\''
+
", jobname='"
+
jobname
+
'\''
+
", lastname='"
+
lastname
+
'\''
+
", username='"
+
username
+
'\''
+
", path='"
+
path
+
'\''
+
", idpath='"
+
idpath
+
'\''
+
'}'
;
}
}
src/main/java/com/keymobile/login/util/HttpUtil.java
0 → 100644
View file @
9d163ab4
package
com
.
keymobile
.
login
.
util
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClientBuilder
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.io.IOException
;
import
java.util.Map
;
/**
* @author xiesh
* @version 1.0.0
* @date 2024/4/26
* @desc http工具类
*/
public
class
HttpUtil
{
public
static
String
doGet
(
String
url
,
Map
<
String
,
String
>
headerMap
)
{
CloseableHttpClient
client
=
null
;
CloseableHttpResponse
response
=
null
;
String
res
=
""
;
try
{
client
=
HttpClientBuilder
.
create
().
build
();
HttpGet
request
=
new
HttpGet
(
url
);
if
(!
CollectionUtils
.
isEmpty
(
headerMap
))
{
headerMap
.
forEach
((
k
,
v
)
->
request
.
setHeader
(
k
,
v
));
}
request
.
setHeader
(
"Content-Type"
,
"application/json"
);
response
=
client
.
execute
(
request
);
res
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
System
.
out
.
println
(
res
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
client
!=
null
)
{
try
{
client
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
if
(
response
!=
null
)
{
try
{
response
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
res
;
}
public
static
String
doPost
(
String
url
,
Map
<
String
,
String
>
headerMap
,
String
bodyJsonStr
)
{
CloseableHttpClient
client
=
null
;
CloseableHttpResponse
response
=
null
;
String
res
=
""
;
try
{
client
=
HttpClientBuilder
.
create
().
build
();
HttpPost
request
=
new
HttpPost
(
url
);
if
(!
CollectionUtils
.
isEmpty
(
headerMap
))
{
headerMap
.
forEach
((
k
,
v
)
->
request
.
setHeader
(
k
,
v
));
}
request
.
setHeader
(
"Content-Type"
,
"application/json"
);
if
(
StringUtils
.
isNotBlank
(
bodyJsonStr
))
{
StringEntity
entity
=
new
StringEntity
(
bodyJsonStr
,
"UTF-8"
);
request
.
setEntity
(
entity
);
}
response
=
client
.
execute
(
request
);
res
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
client
!=
null
)
{
try
{
client
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
if
(
response
!=
null
)
{
try
{
response
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
res
;
}
}
src/main/resources/application-local.yml
View file @
9d163ab4
...
@@ -43,3 +43,13 @@ Mcd:
...
@@ -43,3 +43,13 @@ Mcd:
deepSso
:
deepSso
:
url
:
https://boss.sit.mcd.com.cn/api/inner/boss-api/foundation/user/whoami
url
:
https://boss.sit.mcd.com.cn/api/inner/boss-api/foundation/user/whoami
peopleCenter
:
sysSecret
:
3522f512-6549-4b38-8d1d-03161d5f2148
sysId
:
169623376
tokenUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/token/getToken
userUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/people-center/people-query/employee/list
organUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/people-center/people-query/organization/page
src/main/resources/application-mcd.yml
0 → 100644
View file @
9d163ab4
server
:
port
:
9764
eureka
:
client
:
registerWithEureka
:
true
region
:
default
registryFetchIntervalSeconds
:
5
serviceUrl
:
defaultZone
:
http://10.126.158.215:8081/eureka/
enabled
:
false
spring
:
session
:
store-type
:
redis
redis
:
namespace
:
dgrcb
redis
:
host
:
10.126.158.214
port
:
6379
password
:
letmein
datasource
:
continue-on-error
:
true
hikari
:
maximum-pool-size
:
5
initialization-mode
:
always
url
:
jdbc:mysql://10.126.158.214:22698/dgrcb?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
username
:
poc
password
:
Km@38497130
jpa
:
hibernate
:
ddl-auto
:
update
# show-sql: true
properties
:
hibernate
:
dialect
:
org.hibernate.dialect.MySQL5InnoDBDialect
ribbon
:
ReadTimeout
:
60000
ConnectTimeout
:
60000
OkToRetryOnAllOperations
:
true
MaxAutoRetries
:
3
logging
:
level
:
# 设置Hibernate的日志级别
org.hibernate
:
ERROR
feign
:
client
:
config
:
default
:
connectTimeout
:
60000
ReadTimeout
:
60000
security
:
authUser
:
root
authPwd
:
pwd
permit
:
true
allowRootLogin
:
true
Mcd
:
sso
:
url
:
https://boss.sit.mcd.com.cn/api/inner/boss-api/foundation/sso/authenticate
header
:
McD-BOSS;PC
redirectUrl
:
http://10.126.147.58/center-home/menu/index
deepSso
:
url
:
https://boss.sit.mcd.com.cn/api/inner/boss-api/foundation/user/whoami
peopleCenter
:
sysSecret
:
3522f512-6549-4b38-8d1d-03161d5f2148
sysId
:
169623376
tokenUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/token/getToken
userUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/people-center/people-query/employee/list
organUrl
:
http://mcd-biz-gateway-sit.mcdchina.net/people-center/people-query/organization/page
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