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
477b0603
Commit
477b0603
authored
Jan 23, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同
parent
f1e98245
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
3 deletions
+37
-3
workspace.xml
.idea/workspace.xml
+0
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+6
-0
ContractService.java
src/main/java/common/service/ContractService.java
+2
-0
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+26
-0
SyncAppDataTask.java
src/main/java/common/task/SyncAppDataTask.java
+3
-3
No files found.
.idea/workspace.xml
View file @
477b0603
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
477b0603
...
...
@@ -29,6 +29,12 @@ public class ContractController {
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
));
}
@RequestMapping
(
value
=
"findone"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findOne
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
code
)
{
return
ResultModel
.
OK
(
service
.
findOne
(
code
));
}
@RequestMapping
(
value
=
"checkAccount"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
checkAccount
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
email
)
{
...
...
src/main/java/common/service/ContractService.java
View file @
477b0603
...
...
@@ -29,6 +29,8 @@ public interface ContractService {
List
<
Contract
>
findAll
(
String
startDate
,
String
endDate
);
Contract
findOne
(
String
code
);
ContractMoney
pay
(
User
loginUser
,
ContractMoney
resource
);
Contract
change
(
User
loginUser
,
ContractChange
resource
);
...
...
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
477b0603
...
...
@@ -196,6 +196,32 @@ public class ContractServiceImpl implements ContractService{
}
@Override
public
Contract
findOne
(
String
code
)
{
List
<
Contract
>
result
=
new
ArrayList
<>();
List
<
User
>
sales
=
userRepository
.
findAll
();
Map
<
Long
,
String
>
saleMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
sales
)){
for
(
User
s:
sales
){
saleMap
.
put
(
s
.
getId
(),
s
.
getName
());
}
}
List
<
PackageType
>
typeList
=
packageTypeRepository
.
findAll
();
Map
<
Long
,
String
>
typeMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
typeList
)){
for
(
PackageType
s:
typeList
){
typeMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
Contract
contract
=
contractRepository
.
findByCode
(
code
);
contract
.
setSaleName
(
saleMap
.
containsKey
(
contract
.
getSale
())
?
saleMap
.
get
(
contract
.
getSale
())
:
""
);
contract
.
setPriceLevelName
(
typeMap
.
containsKey
(
contract
.
getPriceLevel
())
?
typeMap
.
get
(
contract
.
getPriceLevel
())
:
""
);
contract
.
setCreateName
(
saleMap
.
containsKey
(
contract
.
getSale
())
?
saleMap
.
get
(
contract
.
getSale
())
:
""
);
return
contract
;
}
@Override
public
ContractMoney
pay
(
User
loginUser
,
ContractMoney
resource
)
{
Contract
contract
=
contractRepository
.
findByCode
(
resource
.
getContractCode
());
if
(
resource
.
getType
().
equals
(
"pay"
)){
...
...
src/main/java/common/task/SyncAppDataTask.java
View file @
477b0603
...
...
@@ -242,7 +242,7 @@ public class SyncAppDataTask
opds
.
setDs
(
array
[
2
].
toString
());
resultList
.
add
(
opds
);
if
(
resultList
.
size
()
>=
2000
)
{
System
.
out
.
println
(
resultList
);
//
System.out.println(resultList);
otPkgDevStatsRepository
.
save
(
resultList
);
resultList
=
new
ArrayList
<>();
}
...
...
@@ -250,7 +250,7 @@ public class SyncAppDataTask
AppInfo
appInfo
=
generateAppInfo
(
array
,
ry_pkgNameList
,
map
,
newCategorys
,
citys
);
appResultList
.
add
(
appInfo
);
if
(
appResultList
.
size
()
>=
2000
)
{
System
.
out
.
println
(
appResultList
);
//
System.out.println(appResultList);
appInfoRepository
.
save
(
appResultList
);
appResultList
=
new
ArrayList
<>();
}
...
...
@@ -263,7 +263,7 @@ public class SyncAppDataTask
appInfoRepository
.
save
(
appResultList
);
}
System
.
out
.
println
(
newCategorys
);
//
System.out.println(newCategorys);
if
(
newCategorys
.
size
()
>
0
)
{
appCategoryRepository
.
save
(
newCategorys
);
}
...
...
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