Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
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
openSource
apollo
Commits
259a9f7e
Commit
259a9f7e
authored
Jul 01, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix user search
parent
75199e3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
Item.java
...main/java/com/ctrip/framework/apollo/biz/entity/Item.java
+2
-0
CtripUserService.java
.../ctrip/framework/apollo/portal/auth/CtripUserService.java
+12
-10
CtripUserServiceTest.java
...ip/framework/apollo/portal/auth/CtripUserServiceTest.java
+0
-2
No files found.
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java
View file @
259a9f7e
...
...
@@ -4,6 +4,7 @@ import com.ctrip.framework.apollo.common.entity.BaseEntity;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.SQLDelete
;
...
...
@@ -22,6 +23,7 @@ public class Item extends BaseEntity {
private
String
key
;
@Column
(
name
=
"value"
)
@Lob
private
String
value
;
@Column
(
name
=
"comment"
)
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/auth/CtripUserService.java
View file @
259a9f7e
...
...
@@ -14,6 +14,7 @@ import org.springframework.http.HttpMethod;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.client.ClientHttpRequestFactory
;
import
org.springframework.http.client.SimpleClientHttpRequestFactory
;
import
org.springframework.http.converter.json.GsonHttpMessageConverter
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -44,6 +45,7 @@ public class CtripUserService implements UserService {
SimpleClientHttpRequestFactory
factory
=
new
SimpleClientHttpRequestFactory
();
factory
.
setConnectTimeout
(
getConnectTimeout
());
factory
.
setReadTimeout
(
getReadTimeout
());
return
factory
;
}
...
...
@@ -140,10 +142,10 @@ public class CtripUserService implements UserService {
int
limit
)
{
UserServiceRequest
request
=
new
UserServiceRequest
();
request
.
setAccess_token
(
getUserServiceAccessToken
());
request
.
setType
(
"emloyee"
);
UserServiceRequestBody
requestBody
=
new
UserServiceRequestBody
();
requestBody
.
setIndexAlias
(
"itdb_emloyee"
);
requestBody
.
setType
(
"emloyee"
);
request
.
setRequest_body
(
requestBody
);
Map
<
String
,
Object
>
queryJson
=
Maps
.
newHashMap
();
...
...
@@ -168,7 +170,6 @@ public class CtripUserService implements UserService {
static
class
UserServiceRequest
{
private
String
access_token
;
private
String
type
;
private
UserServiceRequestBody
request_body
;
public
String
getAccess_token
()
{
...
...
@@ -179,14 +180,6 @@ public class CtripUserService implements UserService {
this
.
access_token
=
access_token
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
UserServiceRequestBody
getRequest_body
()
{
return
request_body
;
}
...
...
@@ -199,8 +192,17 @@ public class CtripUserService implements UserService {
static
class
UserServiceRequestBody
{
private
String
indexAlias
;
private
String
type
;
private
Map
<
String
,
Object
>
queryJson
;
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getIndexAlias
()
{
return
indexAlias
;
}
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/auth/CtripUserServiceTest.java
View file @
259a9f7e
...
...
@@ -70,7 +70,6 @@ public class CtripUserServiceTest {
ctripUserService
.
assembleSearchUserRequest
(
someKeyword
,
someOffset
,
someLimit
);
assertEquals
(
someUserServiceToken
,
request
.
getAccess_token
());
assertEquals
(
"emloyee"
,
request
.
getType
());
CtripUserService
.
UserServiceRequestBody
requestBody
=
request
.
getRequest_body
();
...
...
@@ -94,7 +93,6 @@ public class CtripUserServiceTest {
CtripUserService
.
UserServiceRequest
request
=
ctripUserService
.
assembleFindUserRequest
(
userIds
);
assertEquals
(
someUserServiceToken
,
request
.
getAccess_token
());
assertEquals
(
"emloyee"
,
request
.
getType
());
CtripUserService
.
UserServiceRequestBody
requestBody
=
request
.
getRequest_body
();
...
...
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