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
0d043354
Commit
0d043354
authored
Aug 01, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
催收需求
parent
61f9b0bc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
166 additions
and
2 deletions
+166
-2
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+103
-0
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
xyqb.properties
src/main/resources/config/dev/xyqb.properties
+2
-2
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
0d043354
...
...
@@ -18,11 +18,13 @@ import cn.quantgroup.xyqb.model.AddressRet;
import
cn.quantgroup.xyqb.model.ContactRet
;
import
cn.quantgroup.xyqb.model.IdType
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.UserAssociation
;
import
cn.quantgroup.xyqb.model.UserDetailRet
;
import
cn.quantgroup.xyqb.model.UserExtInfoRet
;
import
cn.quantgroup.xyqb.model.UserInfo
;
import
cn.quantgroup.xyqb.model.UserRet
;
import
cn.quantgroup.xyqb.model.UserSpouseRet
;
import
cn.quantgroup.xyqb.model.XContactInfo
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.http.IHttpService
;
import
cn.quantgroup.xyqb.service.session.ISessionService
;
...
...
@@ -45,6 +47,7 @@ import com.google.common.base.MoreObjects;
import
com.google.common.collect.ImmutableMap
;
import
java.sql.Timestamp
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -513,6 +516,106 @@ public class InnerController implements IBaseController {
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"
)
@LogHttpCaller
public
JsonResult
queryOpenIdByPhoneNo
(
String
phoneNo
)
{
...
...
src/main/java/cn/quantgroup/xyqb/model/UserAssociation.java
0 → 100644
View file @
0d043354
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 @
0d043354
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 @
0d043354
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
;
}
src/main/resources/config/dev/xyqb.properties
View file @
0d043354
...
...
@@ -3,7 +3,7 @@ configserver.disable=1
configserver.system
=
xyqb-user
#xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.22:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.jdbc-url
=
jdbc:mysql://192.168.4.
155
:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.jdbc-url
=
jdbc:mysql://192.168.4.
22
:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.password
=
qatest
...
...
@@ -101,7 +101,7 @@ loanvest.rabbitmq.connection.virtual-host=/loan_order
#loanvest.rabbitmq.stateMsgQueue=loan_vest_msg_queue
loanvest.rabbitmq.queue
=
loan_user_queue
loanvest.rabbitmq.exchange
=
loan_vest_exchange
loanvest.rabbitmq.connection.host
=
192.168.4.
155
loanvest.rabbitmq.connection.host
=
192.168.4.
46
loanvest.rabbitmq.connection.port
=
5672
loanvest.rabbitmq.connection.user
=
qa
loanvest.rabbitmq.connection.password
=
qatest
...
...
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