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
68585343
Commit
68585343
authored
Apr 25, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
fd059d16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
118 additions
and
3 deletions
+118
-3
workspace.xml
.idea/workspace.xml
+0
-0
Account4Web.java
src/main/java/common/model/Account4Web.java
+9
-0
IOAccount4Web.java
src/main/java/common/model/IOAccount4Web.java
+9
-0
TkioAccountServiceImpl.java
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
+8
-0
AccountTask.java
src/main/java/tkio/task/AccountTask.java
+3
-0
IoAccountController.java
src/main/java/userio/controller/IoAccountController.java
+17
-0
IOSalesManLeaderRepository.java
...in/java/userio/repository/IOSalesManLeaderRepository.java
+1
-1
IOAccountService.java
src/main/java/userio/service/IOAccountService.java
+4
-0
IOAccountServiceImpl.java
src/main/java/userio/service/impl/IOAccountServiceImpl.java
+65
-0
IOAccountTask.java
src/main/java/userio/task/IOAccountTask.java
+1
-1
applicationContext-schedule.xml
src/main/resources/spring/applicationContext-schedule.xml
+1
-1
No files found.
.idea/workspace.xml
View file @
68585343
This diff is collapsed.
Click to expand it.
src/main/java/common/model/Account4Web.java
View file @
68585343
...
@@ -15,6 +15,7 @@ public class Account4Web {
...
@@ -15,6 +15,7 @@ public class Account4Web {
private
String
createDs
;
private
String
createDs
;
private
String
status
;
private
String
status
;
private
String
packageType
;
private
String
packageType
;
private
Long
packageTypeId
;
private
String
pastDate
;
private
String
pastDate
;
private
BigInteger
track
;
private
BigInteger
track
;
private
BigInteger
io
;
private
BigInteger
io
;
...
@@ -35,6 +36,14 @@ public class Account4Web {
...
@@ -35,6 +36,14 @@ public class Account4Web {
private
String
saleEamil
;
private
String
saleEamil
;
private
Long
sale
;
private
Long
sale
;
public
Long
getPackageTypeId
()
{
return
packageTypeId
;
}
public
void
setPackageTypeId
(
Long
packageTypeId
)
{
this
.
packageTypeId
=
packageTypeId
;
}
public
String
getSaleEamil
()
{
public
String
getSaleEamil
()
{
return
saleEamil
;
return
saleEamil
;
}
}
...
...
src/main/java/common/model/IOAccount4Web.java
View file @
68585343
...
@@ -16,6 +16,7 @@ public class IOAccount4Web {
...
@@ -16,6 +16,7 @@ public class IOAccount4Web {
private
String
createDs
;
private
String
createDs
;
private
String
status
;
private
String
status
;
private
String
packageType
;
private
String
packageType
;
private
Long
packageTypeId
;
private
String
pastDate
;
private
String
pastDate
;
private
BigInteger
track
;
private
BigInteger
track
;
private
BigInteger
io
;
private
BigInteger
io
;
...
@@ -36,6 +37,14 @@ public class IOAccount4Web {
...
@@ -36,6 +37,14 @@ public class IOAccount4Web {
private
String
saleEamil
;
private
String
saleEamil
;
private
Long
sale
;
private
Long
sale
;
public
Long
getPackageTypeId
()
{
return
packageTypeId
;
}
public
void
setPackageTypeId
(
Long
packageTypeId
)
{
this
.
packageTypeId
=
packageTypeId
;
}
public
String
getSaleEamil
()
{
public
String
getSaleEamil
()
{
return
saleEamil
;
return
saleEamil
;
}
}
...
...
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
View file @
68585343
...
@@ -105,11 +105,13 @@ public class TkioAccountServiceImpl implements TkioAccountService {
...
@@ -105,11 +105,13 @@ public class TkioAccountServiceImpl implements TkioAccountService {
Account
accountTkio
=
accountRepository
.
findByEmail
(
account
);
Account
accountTkio
=
accountRepository
.
findByEmail
(
account
);
Account4Web
account4Web
=
account4WebRepository
.
findByEmail
(
account
);
Account4Web
account4Web
=
account4WebRepository
.
findByEmail
(
account
);
SalesManLeader
leader
=
salesManLeaderRepository
.
findOneByEmail
(
email
);
SalesManLeader
leader
=
salesManLeaderRepository
.
findOneByEmail
(
email
);
User
user
=
userRepository
.
findByEmail
(
email
);
accountTkio
.
setBussinessman
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
accountTkio
.
setBussinessman
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
accountRepository
.
save
(
accountTkio
);
accountRepository
.
save
(
accountTkio
);
account4Web
.
setBussinessMan
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
account4Web
.
setBussinessMan
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
account4Web
.
setSaleEamil
(
user
.
getEmail
());
return
account4WebRepository
.
save
(
account4Web
);
return
account4WebRepository
.
save
(
account4Web
);
}
}
...
@@ -327,6 +329,9 @@ public class TkioAccountServiceImpl implements TkioAccountService {
...
@@ -327,6 +329,9 @@ public class TkioAccountServiceImpl implements TkioAccountService {
contractRepository
.
save
(
contract
);
contractRepository
.
save
(
contract
);
}
}
Account4Web
account4Web
=
account4WebRepository
.
findByEmail
(
resource
.
getEmail
());
account4Web
.
setStatus
(
"已激活"
);
account4WebRepository
.
save
(
account4Web
);
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
account
.
setStatus
(
1
);
account
.
setStatus
(
1
);
...
@@ -361,6 +366,9 @@ public class TkioAccountServiceImpl implements TkioAccountService {
...
@@ -361,6 +366,9 @@ public class TkioAccountServiceImpl implements TkioAccountService {
contractRepository
.
save
(
contract
);
contractRepository
.
save
(
contract
);
}
}
Account4Web
account4Web
=
account4WebRepository
.
findByEmail
(
resource
.
getEmail
());
account4Web
.
setStatus
(
"已禁用"
);
account4WebRepository
.
save
(
account4Web
);
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
account
.
setStatus
(
0
);
account
.
setStatus
(
0
);
...
...
src/main/java/tkio/task/AccountTask.java
View file @
68585343
...
@@ -65,6 +65,7 @@ public class AccountTask {
...
@@ -65,6 +65,7 @@ public class AccountTask {
for
(
Account
ac
:
accountValidList
){
for
(
Account
ac
:
accountValidList
){
Account4Web
account4Web
=
new
Account4Web
();
Account4Web
account4Web
=
new
Account4Web
();
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setPackageTypeId
(
ac
.
getPricelevel
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setCompany
(
ac
.
getCompany
());
account4Web
.
setCompany
(
ac
.
getCompany
());
account4Web
.
setCreateDate
(
ac
.
getPubDate
());
account4Web
.
setCreateDate
(
ac
.
getPubDate
());
...
@@ -135,6 +136,7 @@ public class AccountTask {
...
@@ -135,6 +136,7 @@ public class AccountTask {
if
(
ValidateUtil
.
isValid
(
pastAccountList
)){
if
(
ValidateUtil
.
isValid
(
pastAccountList
)){
for
(
Account
ac
:
pastAccountList
){
for
(
Account
ac
:
pastAccountList
){
Account4Web
account4Web
=
new
Account4Web
();
Account4Web
account4Web
=
new
Account4Web
();
account4Web
.
setPackageTypeId
(
ac
.
getPricelevel
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setCompany
(
ac
.
getCompany
());
account4Web
.
setCompany
(
ac
.
getCompany
());
...
@@ -159,6 +161,7 @@ public class AccountTask {
...
@@ -159,6 +161,7 @@ public class AccountTask {
if
(
ValidateUtil
.
isValid
(
accountList
)){
if
(
ValidateUtil
.
isValid
(
accountList
)){
for
(
Account
ac
:
accountList
){
for
(
Account
ac
:
accountList
){
Account4Web
account4Web
=
new
Account4Web
();
Account4Web
account4Web
=
new
Account4Web
();
account4Web
.
setPackageTypeId
(
ac
.
getPricelevel
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setCompany
(
ac
.
getCompany
());
account4Web
.
setCompany
(
ac
.
getCompany
());
...
...
src/main/java/userio/controller/IoAccountController.java
View file @
68585343
...
@@ -23,6 +23,23 @@ public class IoAccountController {
...
@@ -23,6 +23,23 @@ public class IoAccountController {
@Autowired
@Autowired
IOAccountService
tkioAccountService
;
IOAccountService
tkioAccountService
;
//sale
@RequestMapping
(
value
=
"/findSale"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findSale
(
@CurrentAccount
User
loginAccount
,
@RequestParam
(
required
=
false
)
Long
sale
)
{
return
ResultModel
.
OK
(
tkioAccountService
.
findSale
(
loginAccount
,
sale
));
}
//sale
@RequestMapping
(
value
=
"/update/sale"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ResultModel
updateSale
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
email
,
@RequestParam
String
accountEmail
)
{
return
ResultModel
.
OK
(
tkioAccountService
.
updateSale
(
email
,
accountEmail
));
}
//客户列表
//客户列表
@RequestMapping
(
value
=
"/findAll"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findAll"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/userio/repository/IOSalesManLeaderRepository.java
View file @
68585343
...
@@ -8,7 +8,7 @@ import userio.model.SalesManLeader;
...
@@ -8,7 +8,7 @@ import userio.model.SalesManLeader;
import
java.util.List
;
import
java.util.List
;
@Transactional
@Transactional
public
interface
IOSalesManLeaderRepository
extends
JpaRepository
<
SalesManLeader
,
Long
>
{
public
interface
IOSalesManLeaderRepository
extends
JpaRepository
<
SalesManLeader
,
Integer
>
{
@Query
(
value
=
"select email from sales_man_leader where id=(select leader from sales_man_leader where id=?1)"
,
nativeQuery
=
true
)
@Query
(
value
=
"select email from sales_man_leader where id=(select leader from sales_man_leader where id=?1)"
,
nativeQuery
=
true
)
String
findLeaderByBussinessMan
(
Long
bussinessMan
);
String
findLeaderByBussinessMan
(
Long
bussinessMan
);
...
...
src/main/java/userio/service/IOAccountService.java
View file @
68585343
...
@@ -9,6 +9,10 @@ import java.util.Map;
...
@@ -9,6 +9,10 @@ import java.util.Map;
* Created by mxq on 2017/12/26.
* Created by mxq on 2017/12/26.
*/
*/
public
interface
IOAccountService
{
public
interface
IOAccountService
{
Map
<
String
,
Object
>
findSale
(
User
user
,
Long
sale
);
IOAccount4Web
updateSale
(
String
email
,
String
account
);
List
<
IOAccount4Web
>
findAll
(
User
user
);
List
<
IOAccount4Web
>
findAll
(
User
user
);
IOAccount4Web
findOne
(
String
email
);
IOAccount4Web
findOne
(
String
email
);
...
...
src/main/java/userio/service/impl/IOAccountServiceImpl.java
View file @
68585343
...
@@ -69,6 +69,40 @@ public class IOAccountServiceImpl implements IOAccountService {
...
@@ -69,6 +69,40 @@ public class IOAccountServiceImpl implements IOAccountService {
ReminderLevelRepository
reminderLevelRepository
;
ReminderLevelRepository
reminderLevelRepository
;
@Autowired
@Autowired
PressMoneyRepository
pressMoneyRepository
;
PressMoneyRepository
pressMoneyRepository
;
@Override
public
Map
<
String
,
Object
>
findSale
(
User
user
,
Long
sale
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
();
String
email
=
null
;
if
(
null
!=
sale
){
SalesManLeader
one
=
salesManLeaderRepository
.
findOne
(
Integer
.
parseInt
(
sale
+
""
));
User
user1
=
userRepository
.
findByEmail
(
one
.
getEmail
());
if
(
null
!=
user1
)
map
.
put
(
"old"
,
user1
.
getName
());
}
List
<
User
>
list
=
new
ArrayList
<>();
if
(
user
.
getRole
().
equals
(
RoleEnum
.
NORTH_BUSSINUSS
.
getKey
())
||
user
.
getRole
().
equals
(
RoleEnum
.
SOUTH_BUSSINUSS
.
getKey
())){
list
=
userService
.
findbyRole
(
user
.
getRole
());
}
else
{
list
=
userRepository
.
findSales
();
}
map
.
put
(
"new"
,
list
);
return
map
;
}
@Override
public
IOAccount4Web
updateSale
(
String
email
,
String
account
)
{
Account
accountTkio
=
accountRepository
.
findByEmail
(
account
);
IOAccount4Web
account4Web
=
account4WebRepository
.
findByEmail
(
account
);
SalesManLeader
leader
=
salesManLeaderRepository
.
findOneByEmail
(
email
);
User
user
=
userRepository
.
findByEmail
(
email
);
accountTkio
.
setBussinessman
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
accountRepository
.
save
(
accountTkio
);
account4Web
.
setBussinessMan
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
account4Web
.
setSaleEamil
(
user
.
getEmail
());
return
account4WebRepository
.
save
(
account4Web
);
}
@Override
@Override
public
List
<
IOAccount4Web
>
findAll
(
User
user
)
{
public
List
<
IOAccount4Web
>
findAll
(
User
user
)
{
...
@@ -271,6 +305,21 @@ public class IOAccountServiceImpl implements IOAccountService {
...
@@ -271,6 +305,21 @@ public class IOAccountServiceImpl implements IOAccountService {
resource
.
setPlatform
(
"io"
);
resource
.
setPlatform
(
"io"
);
resource
.
setPressStatus
(
false
);
resource
.
setPressStatus
(
false
);
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
Contract
contract
=
contractRepository
.
findByPlatformAndEmailLimit1
(
"io"
,
resource
.
getEmail
(),
ContractTypeEnum
.
MAIN
.
getKey
());
if
(
null
!=
contract
){
contract
.
setStatus
(
"executing"
);
contractRepository
.
save
(
contract
);
}
IOAccount4Web
account4Web
=
account4WebRepository
.
findByEmail
(
resource
.
getEmail
());
account4Web
.
setStatus
(
"已激活"
);
account4WebRepository
.
save
(
account4Web
);
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
account
.
setStatus
(
1
);
accountRepository
.
save
(
account
);
return
pressMoneyRepository
.
save
(
resource
);
return
pressMoneyRepository
.
save
(
resource
);
}
}
...
@@ -281,6 +330,22 @@ public class IOAccountServiceImpl implements IOAccountService {
...
@@ -281,6 +330,22 @@ public class IOAccountServiceImpl implements IOAccountService {
resource
.
setPlatform
(
"io"
);
resource
.
setPlatform
(
"io"
);
resource
.
setPressStatus
(
true
);
resource
.
setPressStatus
(
true
);
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
Contract
contract
=
contractRepository
.
findByPlatformAndEmailLimit1
(
"io"
,
resource
.
getEmail
(),
ContractTypeEnum
.
MAIN
.
getKey
());
if
(
null
!=
contract
){
contract
.
setStatus
(
"stop"
);
contractRepository
.
save
(
contract
);
}
IOAccount4Web
account4Web
=
account4WebRepository
.
findByEmail
(
resource
.
getEmail
());
account4Web
.
setStatus
(
"已禁用"
);
account4WebRepository
.
save
(
account4Web
);
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
account
.
setStatus
(
0
);
accountRepository
.
save
(
account
);
return
pressMoneyRepository
.
save
(
resource
);
return
pressMoneyRepository
.
save
(
resource
);
}
}
...
...
src/main/java/userio/task/IOAccountTask.java
View file @
68585343
...
@@ -80,7 +80,7 @@ public class IOAccountTask {
...
@@ -80,7 +80,7 @@ public class IOAccountTask {
for
(
Account
ac
:
accounts
){
for
(
Account
ac
:
accounts
){
IOAccount4Web
account4Web
=
new
IOAccount4Web
();
IOAccount4Web
account4Web
=
new
IOAccount4Web
();
account4Web
.
setStatus
(
status
);
account4Web
.
setStatus
(
status
);
account4Web
.
setPackageTypeId
(
ac
.
getPricelevel
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setAccountId
(
ac
.
getId
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setEmail
(
ac
.
getEmail
());
account4Web
.
setCompany
(
ac
.
getCompany
());
account4Web
.
setCompany
(
ac
.
getCompany
());
...
...
src/main/resources/spring/applicationContext-schedule.xml
View file @
68585343
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<bean
id=
"tkioAccountTask"
class=
"tkio.task.AccountTask"
></bean>
<bean
id=
"tkioAccountTask"
class=
"tkio.task.AccountTask"
></bean>
<task:scheduled-tasks>
<task:scheduled-tasks>
<!--//定时同步短链数据(每5分钟执行一次)-->
<!--//定时同步短链数据(每5分钟执行一次)-->
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0
54 15
* * ?"
/>
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0
46 16
* * ?"
/>
</task:scheduled-tasks>
</task:scheduled-tasks>
<bean
id=
"tkioNoticeTask"
class=
"tkio.task.NoticeTask"
></bean>
<bean
id=
"tkioNoticeTask"
class=
"tkio.task.NoticeTask"
></bean>
...
...
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