Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
75916fbc
Commit
75916fbc
authored
Aug 02, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/huanguguan
# Conflicts: # src/main/resources/config/dev/xyqb.properties
parents
5cbf44ba
054c5db3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
168 additions
and
2 deletions
+168
-2
HelloController.java
...group/xyqb/controller/external/index/HelloController.java
+1
-0
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+103
-0
UserCenterController.java
...controller/external/user/center/UserCenterController.java
+2
-1
RequestFilter.java
src/main/java/cn/quantgroup/xyqb/filter/RequestFilter.java
+1
-1
UserAssociation.java
src/main/java/cn/quantgroup/xyqb/model/UserAssociation.java
+27
-0
XContactIn.java
src/main/java/cn/quantgroup/xyqb/model/XContactIn.java
+17
-0
XContactInfo.java
src/main/java/cn/quantgroup/xyqb/model/XContactInfo.java
+17
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/index/HelloController.java
View file @
75916fbc
...
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RestController
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
public
class
HelloController
{
public
class
HelloController
{
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
public
String
hello
(){
public
String
hello
(){
return
"ok"
;
return
"ok"
;
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
75916fbc
...
@@ -18,11 +18,13 @@ import cn.quantgroup.xyqb.model.AddressRet;
...
@@ -18,11 +18,13 @@ import cn.quantgroup.xyqb.model.AddressRet;
import
cn.quantgroup.xyqb.model.ContactRet
;
import
cn.quantgroup.xyqb.model.ContactRet
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.UserAssociation
;
import
cn.quantgroup.xyqb.model.UserDetailRet
;
import
cn.quantgroup.xyqb.model.UserDetailRet
;
import
cn.quantgroup.xyqb.model.UserExtInfoRet
;
import
cn.quantgroup.xyqb.model.UserExtInfoRet
;
import
cn.quantgroup.xyqb.model.UserInfo
;
import
cn.quantgroup.xyqb.model.UserInfo
;
import
cn.quantgroup.xyqb.model.UserRet
;
import
cn.quantgroup.xyqb.model.UserRet
;
import
cn.quantgroup.xyqb.model.UserSpouseRet
;
import
cn.quantgroup.xyqb.model.UserSpouseRet
;
import
cn.quantgroup.xyqb.model.XContactInfo
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.http.IHttpService
;
import
cn.quantgroup.xyqb.service.http.IHttpService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
...
@@ -45,6 +47,7 @@ import com.google.common.base.MoreObjects;
...
@@ -45,6 +47,7 @@ import com.google.common.base.MoreObjects;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -513,6 +516,106 @@ public class InnerController implements IBaseController {
...
@@ -513,6 +516,106 @@ public class InnerController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
"success"
,
wechatUserInfo
.
getOpenId
());
return
JsonResult
.
buildSuccessResult
(
"success"
,
wechatUserInfo
.
getOpenId
());
}
}
@RequestMapping
(
"/user-association/search/phone"
)
@LogHttpCaller
public
JsonResult
findUserAssociationByPhone
(
String
phoneNo
)
{
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
UserAssociation
bean
=
new
UserAssociation
();
if
(
null
!=
userDetail
)
{
Address
address
=
addressService
.
findByUserId
(
userDetail
.
getUserId
());
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userDetail
.
getUserId
());
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
userDetail
.
getUserId
());
bean
.
setUserId
(
userDetail
.
getUserId
());
bean
.
setPhoneNo
(
userDetail
.
getPhoneNo
());
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setQq
(
userDetail
.
getQq
());
if
(
null
!=
userDetail
.
getGender
())
{
bean
.
setGender
(
userDetail
.
getGender
().
getName
());
}
if
(
null
!=
address
)
{
bean
.
setCity
(
address
.
getCity
());
bean
.
setDistrict
(
address
.
getDistrict
());
bean
.
setAddress
(
address
.
getAddress
());
bean
.
setProvince
(
address
.
getProvince
());
}
if
(
null
!=
extInfo
)
{
bean
.
setEducationEnum
(
extInfo
.
getEducationEnum
().
getName
());
bean
.
setOccupationEnum
(
extInfo
.
getOccupationEnum
().
getName
());
bean
.
setMarryStatus
(
extInfo
.
getMarryStatus
().
getDescription
());
}
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isNotEmpty
(
contacts
))
{
List
<
XContactInfo
>
userContacts
=
contacts2ContactRets
(
contacts
);
bean
.
setContractResults
(
userContacts
);
}
}
return
JsonResult
.
buildSuccessResult
(
""
,
bean
);
}
@RequestMapping
(
"/user-association/search/uid"
)
@LogHttpCaller
public
JsonResult
findUserAssociationByUid
(
Long
uid
)
{
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
uid
);
UserAssociation
bean
=
new
UserAssociation
();
if
(
null
!=
userDetail
)
{
Address
address
=
addressService
.
findByUserId
(
userDetail
.
getUserId
());
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userDetail
.
getUserId
());
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
userDetail
.
getUserId
());
bean
.
setUserId
(
userDetail
.
getUserId
());
bean
.
setPhoneNo
(
userDetail
.
getPhoneNo
());
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setQq
(
userDetail
.
getQq
());
if
(
null
!=
userDetail
.
getGender
())
{
bean
.
setGender
(
userDetail
.
getGender
().
getName
());
}
if
(
null
!=
address
)
{
bean
.
setCity
(
address
.
getCity
());
bean
.
setDistrict
(
address
.
getDistrict
());
bean
.
setAddress
(
address
.
getAddress
());
bean
.
setProvince
(
address
.
getProvince
());
}
if
(
null
!=
extInfo
)
{
bean
.
setEducationEnum
(
extInfo
.
getEducationEnum
().
getName
());
bean
.
setOccupationEnum
(
extInfo
.
getOccupationEnum
().
getName
());
bean
.
setMarryStatus
(
extInfo
.
getMarryStatus
().
getDescription
());
}
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isNotEmpty
(
contacts
))
{
List
<
XContactInfo
>
userContacts
=
contacts2ContactRets
(
contacts
);
bean
.
setContractResults
(
userContacts
);
}
}
return
JsonResult
.
buildSuccessResult
(
""
,
bean
);
}
public
static
XContactInfo
contact2ContactRet
(
Contact
c
)
{
if
(
c
==
null
)
{
return
null
;
}
XContactInfo
ret
=
new
XContactInfo
();
ret
.
setId
(
c
.
getId
());
ret
.
setUserId
(
c
.
getUserId
());
ret
.
setName
(
c
.
getName
());
ret
.
setPhoneNo
(
c
.
getPhoneNo
());
ret
.
setRelation
(
c
.
getRelation
().
getDescription
());
return
ret
;
}
public
static
List
<
XContactInfo
>
contacts2ContactRets
(
List
<
Contact
>
cs
)
{
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isEmpty
(
cs
))
{
return
Collections
.
emptyList
();
}
List
<
XContactInfo
>
contactRets
=
new
ArrayList
<>();
for
(
Contact
c
:
cs
)
{
contactRets
.
add
(
contact2ContactRet
(
c
));
}
return
contactRets
;
}
@RequestMapping
(
"/user/wechat/phone_no"
)
@RequestMapping
(
"/user/wechat/phone_no"
)
@LogHttpCaller
@LogHttpCaller
public
JsonResult
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
public
JsonResult
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/user/center/UserCenterController.java
View file @
75916fbc
...
@@ -68,7 +68,6 @@ public class UserCenterController {
...
@@ -68,7 +68,6 @@ public class UserCenterController {
}
}
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(
userDetail
!=
null
)
{
if
(
userDetail
!=
null
)
{
result
.
put
(
"name"
,
userDetail
.
getName
());
result
.
put
(
"name"
,
userDetail
.
getName
());
result
.
put
(
"sex"
,
userDetail
.
getGender
().
ordinal
()
+
""
);
result
.
put
(
"sex"
,
userDetail
.
getGender
().
ordinal
()
+
""
);
result
.
put
(
"phoneNo"
,
userDetail
.
getPhoneNo
().
substring
(
0
,
3
)+
"****"
+
userDetail
.
getPhoneNo
().
substring
(
7
,
11
));
result
.
put
(
"phoneNo"
,
userDetail
.
getPhoneNo
().
substring
(
0
,
3
)+
"****"
+
userDetail
.
getPhoneNo
().
substring
(
7
,
11
));
...
@@ -183,6 +182,8 @@ public class UserCenterController {
...
@@ -183,6 +182,8 @@ public class UserCenterController {
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
}
}
/**
/**
* 个人资料信息
* 个人资料信息
* @param phoneNo
* @param phoneNo
...
...
src/main/java/cn/quantgroup/xyqb/filter/RequestFilter.java
View file @
75916fbc
...
@@ -26,7 +26,7 @@ import java.io.PrintWriter;
...
@@ -26,7 +26,7 @@ import java.io.PrintWriter;
public
class
RequestFilter
implements
Filter
{
public
class
RequestFilter
implements
Filter
{
private
static
final
String
[]
ALLOWED_PATTERNS
=
{
private
static
final
String
[]
ALLOWED_PATTERNS
=
{
"/innerapi/**"
,
"/user/exist"
,
"/motan/**"
,
"/user/register"
,
"/user/login"
,
"/user/register/fast"
,
"/auth/info/login"
,
"/
hello/**"
,
"/
innerapi/**"
,
"/user/exist"
,
"/motan/**"
,
"/user/register"
,
"/user/login"
,
"/user/register/fast"
,
"/auth/info/login"
,
"/user/login/fast"
,
"/user/reset_password"
,
"/user/exist_check"
,
"/user/center/**"
,
"/user/login/fast"
,
"/user/reset_password"
,
"/user/exist_check"
,
"/user/center/**"
,
"/jr58/**"
,
"/app/login"
,
"/app/login_super"
,
"/app/login2"
,
"/user/login2"
,
"/wechat/**"
,
"/config/**"
,
"/api/**"
,
"/user/exists_token"
,
"/query/**"
,
"/jr58/**"
,
"/app/login"
,
"/app/login_super"
,
"/app/login2"
,
"/user/login2"
,
"/wechat/**"
,
"/config/**"
,
"/api/**"
,
"/user/exists_token"
,
"/query/**"
,
"/platform/api/page/return_url"
,
"/MP_"
+
"/platform/api/page/return_url"
,
"/MP_"
+
...
...
src/main/java/cn/quantgroup/xyqb/model/UserAssociation.java
0 → 100644
View file @
75916fbc
package
cn
.
quantgroup
.
xyqb
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
import
lombok.Data
;
/**
* Created by xuran on 2017/8/1.
*/
@Data
public
class
UserAssociation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
Long
userId
;
private
String
phoneNo
;
private
String
idNo
;
private
String
name
;
private
String
gender
;
private
String
marryStatus
;
private
String
educationEnum
;
private
String
occupationEnum
;
private
String
province
;
private
String
city
;
private
String
district
;
private
String
address
;
private
String
qq
;
private
List
<
XContactInfo
>
contractResults
;
}
src/main/java/cn/quantgroup/xyqb/model/XContactIn.java
0 → 100644
View file @
75916fbc
package
cn
.
quantgroup
.
xyqb
.
model
;
import
lombok.Data
;
/**
* Created by xuran on 2017/8/1.
*/
@Data
public
class
XContactIn
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
Long
id
;
private
Long
userId
;
private
String
name
;
private
String
phoneNo
;
private
String
relation
;
}
src/main/java/cn/quantgroup/xyqb/model/XContactInfo.java
0 → 100644
View file @
75916fbc
package
cn
.
quantgroup
.
xyqb
.
model
;
import
java.io.Serializable
;
import
lombok.Data
;
/**
* Created by xuran on 2017/8/1.
*/
@Data
public
class
XContactInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
Long
id
;
private
Long
userId
;
private
String
name
;
private
String
phoneNo
;
private
String
relation
;
}
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