Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
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
reyun
manager
Commits
18c33ee3
Commit
18c33ee3
authored
Jun 07, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adi
parent
f677dde1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
ADIAccountServiceImpl.java
src/main/java/adi/service/impl/ADIAccountServiceImpl.java
+6
-13
ADISaleMap.java
src/main/java/office/model/ADISaleMap.java
+9
-0
No files found.
src/main/java/adi/service/impl/ADIAccountServiceImpl.java
View file @
18c33ee3
...
@@ -116,8 +116,10 @@ public class ADIAccountServiceImpl implements ADIAccountService {
...
@@ -116,8 +116,10 @@ public class ADIAccountServiceImpl implements ADIAccountService {
adiSaleMap
.
setAccountEmail
(
account
);
adiSaleMap
.
setAccountEmail
(
account
);
adiSaleMap
.
setSaleEmail
(
email
);
adiSaleMap
.
setSaleEmail
(
email
);
adiSaleMap
.
setSale
(
bussinessMan
.
getId
());
adiSaleMap
.
setSale
(
bussinessMan
.
getId
());
adiSaleMap
.
setArea
(
bussinessMan
.
getArea
());
adiSaleMap
.
setModifeTime
(
new
Date
());
adiSaleMap
.
setModifeTime
(
new
Date
());
}
else
{
}
else
{
adiSaleMap
.
setArea
(
bussinessMan
.
getArea
());
adiSaleMap
.
setSaleEmail
(
email
);
adiSaleMap
.
setSaleEmail
(
email
);
adiSaleMap
.
setSale
(
bussinessMan
.
getId
());
adiSaleMap
.
setSale
(
bussinessMan
.
getId
());
}
}
...
@@ -134,6 +136,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
...
@@ -134,6 +136,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
conditions
.
put
(
"expriedTime"
,
contract
.
getEndDate
()
+
" 00:00:00"
);
conditions
.
put
(
"expriedTime"
,
contract
.
getEndDate
()
+
" 00:00:00"
);
conditions
.
put
(
"constractStartTime"
,
contract
.
getStartDate
()
+
" 00:00:00"
);
conditions
.
put
(
"constractStartTime"
,
contract
.
getStartDate
()
+
" 00:00:00"
);
conditions
.
put
(
"id"
,
adiUser
.
getId
().
toString
());
conditions
.
put
(
"id"
,
adiUser
.
getId
().
toString
());
conditions
.
put
(
"useStatus"
,
"1"
);
String
request
=
HttpClientUtil
.
doHttpPostRequest
(
url
,
""
,
conditions
,
"utf-8"
);
String
request
=
HttpClientUtil
.
doHttpPostRequest
(
url
,
""
,
conditions
,
"utf-8"
);
if
(!
contract
.
getSale
().
equals
(
adiUser
.
getBussinessMan
())){
if
(!
contract
.
getSale
().
equals
(
adiUser
.
getBussinessMan
())){
...
@@ -154,13 +157,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
...
@@ -154,13 +157,7 @@ public class ADIAccountServiceImpl implements ADIAccountService {
// conditions.put("keyw","");
// conditions.put("keyw","");
String
request
=
HttpClientUtil
.
doHttpPostRequest
(
url
,
""
,
conditions
,
"utf-8"
);
String
request
=
HttpClientUtil
.
doHttpPostRequest
(
url
,
""
,
conditions
,
"utf-8"
);
JSONObject
rs
=
new
JSONObject
(
request
);
JSONObject
rs
=
new
JSONObject
(
request
);
List
<
Contract
>
contractList
=
contractRepository
.
findByPlatform
(
"adi"
);
Map
<
String
,
Contract
>
dicContract
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
contractList
)){
for
(
Contract
co
:
contractList
){
dicContract
.
put
(
co
.
getEmail
(),
co
);
}
}
List
<
ADISaleMap
>
saleMaps
=
adiSaleMapRepository
.
findAll
();
List
<
ADISaleMap
>
saleMaps
=
adiSaleMapRepository
.
findAll
();
final
Map
<
String
,
ADISaleMap
>
dicSale
=
Maps
.
uniqueIndex
(
saleMaps
,
new
Function
<
ADISaleMap
,
String
>()
{
final
Map
<
String
,
ADISaleMap
>
dicSale
=
Maps
.
uniqueIndex
(
saleMaps
,
new
Function
<
ADISaleMap
,
String
>()
{
...
@@ -179,16 +176,12 @@ public class ADIAccountServiceImpl implements ADIAccountService {
...
@@ -179,16 +176,12 @@ public class ADIAccountServiceImpl implements ADIAccountService {
System
.
out
.
println
(
object
);
System
.
out
.
println
(
object
);
val
=
new
ObjectMapper
().
readValue
(
object
,
ADIUser
.
class
);
val
=
new
ObjectMapper
().
readValue
(
object
,
ADIUser
.
class
);
System
.
out
.
println
(
val
);
System
.
out
.
println
(
val
);
val
.
setPackageType
(
"试用套餐"
);
if
(
dicContract
.
containsKey
(
val
.
getEmail
())){
if
(
val
.
getOnTrial
()){
Contract
contract
=
dicContract
.
get
(
val
.
getEmail
());
String
date
=
DateUtil
.
format
(
val
.
getExpriedTime
(),
"yyyy-MM-dd"
);
if
(
null
!=
date
&&
contract
.
getPayMoney
()
>
0
&&
contract
.
getEndDate
().
compareTo
(
date
)
>=
0
){
val
.
setPackageType
(
"正式套餐"
);
val
.
setPackageType
(
"正式套餐"
);
}
else
{
}
else
{
val
.
setPackageType
(
"试用套餐"
);
val
.
setPackageType
(
"试用套餐"
);
}
}
}
if
(
null
!=
dicSale
.
get
(
val
.
getEmail
().
toString
())){
if
(
null
!=
dicSale
.
get
(
val
.
getEmail
().
toString
())){
ADISaleMap
saleMap
=
dicSale
.
get
(
val
.
getEmail
());
ADISaleMap
saleMap
=
dicSale
.
get
(
val
.
getEmail
());
...
...
src/main/java/office/model/ADISaleMap.java
View file @
18c33ee3
...
@@ -21,6 +21,15 @@ public class ADISaleMap {
...
@@ -21,6 +21,15 @@ public class ADISaleMap {
private
String
saleName
;
private
String
saleName
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
modifeTime
;
private
Date
modifeTime
;
private
String
area
;
public
String
getArea
()
{
return
area
;
}
public
void
setArea
(
String
area
)
{
this
.
area
=
area
;
}
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
...
...
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