Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
aaa3d448
Commit
aaa3d448
authored
Mar 23, 2020
by
zhengjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
你我贷
parent
99598b8a
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
450 additions
and
33 deletions
+450
-33
pom.xml
pom.xml
+6
-5
RedisKeyConstants.java
...tgroup/asset/distribution/constant/RedisKeyConstants.java
+1
-1
INiwodaiAssetService.java
...et/distribution/service/niwodai/INiwodaiAssetService.java
+9
-0
NiwodaiAssetServiceImpl.java
...ibution/service/niwodai/impl/NiwodaiAssetServiceImpl.java
+267
-12
NiwodaiServiceImpl.java
...distribution/service/niwodai/impl/NiwodaiServiceImpl.java
+1
-1
Address.java
...tgroup/asset/distribution/service/niwodai/vo/Address.java
+23
-0
BasicInfo2Detail.java
...set/distribution/service/niwodai/vo/BasicInfo2Detail.java
+26
-0
Contacts.java
...group/asset/distribution/service/niwodai/vo/Contacts.java
+21
-0
GZIPUtils.java
...ava/com/quantgroup/asset/distribution/util/GZIPUtils.java
+78
-0
NiwodaiTest.java
...om/quantgroup/asset/distribution/niwodai/NiwodaiTest.java
+18
-14
No files found.
pom.xml
View file @
aaa3d448
...
...
@@ -324,11 +324,12 @@
<groupId>
com.lkb.data
</groupId>
<artifactId>
lkb-data-service
</artifactId>
<version>
1.7.8.4-3c-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.lkb.data
</groupId>
<artifactId>
lkb-core
</artifactId>
<version>
1.0.21
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
src/main/java/com/quantgroup/asset/distribution/constant/RedisKeyConstants.java
View file @
aaa3d448
...
...
@@ -29,5 +29,5 @@ public class RedisKeyConstants {
/**
* 你我贷token
*/
public
static
final
String
NI_WO_DAI_TOKEN_KEY
=
"DATA_EXPORT_PLATFORM:NIWODAI:TOKEN:YHA
L
EA"
;
public
static
final
String
NI_WO_DAI_TOKEN_KEY
=
"DATA_EXPORT_PLATFORM:NIWODAI:TOKEN:YHA
B
EA"
;
}
src/main/java/com/quantgroup/asset/distribution/service/niwodai/INiwodaiAssetService.java
View file @
aaa3d448
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
niwodai
;
import
com.quantgroup.asset.distribution.service.niwodai.vo.NiwodaiCostant
;
import
com.quantgroup.asset.distribution.service.niwodai.vo.NiwodaiIncomingResponseVO
;
import
java.util.Map
;
public
interface
INiwodaiAssetService
{
NiwodaiIncomingResponseVO
incoming
(
String
uuid
,
String
orderId
,
String
amount
,
Integer
term
,
NiwodaiCostant
.
MnoData
mnoData
);
Map
<
String
,
Object
>
queryUserBasic2Info
(
String
userId
,
String
phoneNo
,
boolean
isQuery
);
}
src/main/java/com/quantgroup/asset/distribution/service/niwodai/impl/NiwodaiAssetServiceImpl.java
View file @
aaa3d448
This diff is collapsed.
Click to expand it.
src/main/java/com/quantgroup/asset/distribution/service/niwodai/impl/NiwodaiServiceImpl.java
View file @
aaa3d448
...
...
@@ -78,7 +78,7 @@ public class NiwodaiServiceImpl implements INiwodaiService {
NiwodaiAccessTokenResponseVO
vo
=
acquireAccessToken
();
if
(
vo
!=
null
){
token
=
vo
.
getAccessToken
();
iRedisService
.
setStringEx
(
RedisKeyConstants
.
NI_WO_DAI_TOKEN_KEY
,
token
,
10
,
TimeUnit
.
MINUTES
);
iRedisService
.
setStringEx
(
RedisKeyConstants
.
NI_WO_DAI_TOKEN_KEY
,
token
,
8
,
TimeUnit
.
MINUTES
);
}
else
{
return
null
;
}
...
...
src/main/java/com/quantgroup/asset/distribution/service/niwodai/vo/Address.java
0 → 100644
View file @
aaa3d448
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
niwodai
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author fengjunkai
* @create 2018-05-25 下午 3:27
**/
@Data
public
class
Address
implements
Serializable
{
private
static
final
long
serialVersionUID
=
665730924402064515L
;
private
Long
provinceCode
;
private
String
province
;
private
Long
cityCode
;
private
String
city
;
private
Long
districtCode
;
private
String
district
;
private
String
address
;
}
src/main/java/com/quantgroup/asset/distribution/service/niwodai/vo/BasicInfo2Detail.java
0 → 100644
View file @
aaa3d448
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
niwodai
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author fengjunkai
* @create 2018-05-25 下午 10:47
**/
@Data
public
class
BasicInfo2Detail
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8649600289150722511L
;
private
String
email
;
private
String
educationEnum
;
private
String
occupationEnum
;
private
String
incomeRangeEnum
;
private
String
name
;
private
String
marryStatus
;
private
List
<
Address
>
addressList
;
private
List
<
Contacts
>
contactList
;
}
src/main/java/com/quantgroup/asset/distribution/service/niwodai/vo/Contacts.java
0 → 100644
View file @
aaa3d448
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
niwodai
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 原本有一个联系人,为了兼容全量用户信息需要重新创建一个
*
* @author fengjunkai
* @create 2018-05-25 下午 10:57
**/
@Data
public
class
Contacts
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3119705836615833451L
;
private
String
name
;
private
String
phoneNo
;
private
String
relationName
;
}
src/main/java/com/quantgroup/asset/distribution/util/GZIPUtils.java
0 → 100644
View file @
aaa3d448
package
com
.
quantgroup
.
asset
.
distribution
.
util
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.util.zip.GZIPInputStream
;
import
java.util.zip.GZIPOutputStream
;
public
class
GZIPUtils
{
public
static
String
compress
(
String
primStr
)
{
if
(
primStr
==
null
||
primStr
.
length
()
==
0
)
{
return
primStr
;
}
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
GZIPOutputStream
gzip
=
null
;
try
{
gzip
=
new
GZIPOutputStream
(
out
);
gzip
.
write
(
primStr
.
getBytes
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
gzip
!=
null
)
{
try
{
gzip
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
new
sun
.
misc
.
BASE64Encoder
().
encode
(
out
.
toByteArray
());
}
/**
* 使用gzip进行解压缩
*/
public
static
String
uncompress
(
String
compressedStr
)
{
if
(
compressedStr
==
null
)
{
return
null
;
}
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
ByteArrayInputStream
in
=
null
;
GZIPInputStream
ginzip
=
null
;
byte
[]
compressed
=
null
;
String
decompressed
=
null
;
try
{
compressed
=
new
sun
.
misc
.
BASE64Decoder
().
decodeBuffer
(
compressedStr
);
in
=
new
ByteArrayInputStream
(
compressed
);
ginzip
=
new
GZIPInputStream
(
in
);
byte
[]
buffer
=
new
byte
[
1024
];
int
offset
=
-
1
;
while
((
offset
=
ginzip
.
read
(
buffer
))
!=
-
1
)
{
out
.
write
(
buffer
,
0
,
offset
);
}
decompressed
=
out
.
toString
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
ginzip
!=
null
)
{
try
{
ginzip
.
close
();
}
catch
(
IOException
e
)
{
}
}
if
(
in
!=
null
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
}
}
try
{
out
.
close
();
}
catch
(
IOException
e
)
{
}
}
return
decompressed
;
}
}
src/test/java/com/quantgroup/asset/distribution/niwodai/NiwodaiTest.java
View file @
aaa3d448
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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