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
e37f1f12
Commit
e37f1f12
authored
Mar 28, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户表
parent
0e60f9ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
workspace.xml
.idea/workspace.xml
+0
-0
TkioAccountController.java
src/main/java/tkio/controller/TkioAccountController.java
+17
-0
TkioAccountService.java
src/main/java/tkio/service/TkioAccountService.java
+4
-0
TkioAccountServiceImpl.java
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
+28
-0
No files found.
.idea/workspace.xml
View file @
e37f1f12
This diff is collapsed.
Click to expand it.
src/main/java/tkio/controller/TkioAccountController.java
View file @
e37f1f12
...
...
@@ -24,6 +24,23 @@ public class TkioAccountController {
@Autowired
TkioAccountService
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
)
@ResponseBody
...
...
src/main/java/tkio/service/TkioAccountService.java
View file @
e37f1f12
...
...
@@ -9,6 +9,10 @@ import java.util.Map;
* Created by mxq on 2017/12/26.
*/
public
interface
TkioAccountService
{
Map
<
String
,
Object
>
findSale
(
User
user
,
Long
sale
);
Account4Web
updateSale
(
String
email
,
String
account
);
List
<
Account4Web
>
findAll
(
User
user
);
Account4Web
findOne
(
String
email
);
...
...
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
View file @
e37f1f12
...
...
@@ -7,6 +7,7 @@ import common.service.UserService;
import
dic.RoleEnum
;
import
dic.RoleTypeEnum
;
import
org.apache.commons.collections.map.AbstractMapDecorator
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.collections4.list.TreeList
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
...
...
@@ -74,6 +75,33 @@ public class TkioAccountServiceImpl implements TkioAccountService {
ReminderLevelRepository
reminderLevelRepository
;
@Override
public
Map
<
String
,
Object
>
findSale
(
User
user
,
Long
sale
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
();
String
email
=
null
;
if
(
null
!=
sale
){
email
=
salesManLeaderRepository
.
findLeaderByBussinessMan
(
sale
);
User
user1
=
userRepository
.
findByEmail
(
email
);
map
.
put
(
"old"
,
user1
.
getName
());
}
List
<
User
>
list
=
userService
.
findbyRole
(
user
.
getRole
());
map
.
put
(
"new"
,
list
);
return
map
;
}
@Override
public
Account4Web
updateSale
(
String
email
,
String
account
)
{
Account
accountTkio
=
accountRepository
.
findByEmail
(
account
);
Account4Web
account4Web
=
account4WebRepository
.
findByEmail
(
account
);
SalesManLeader
leader
=
salesManLeaderRepository
.
findOneByEmail
(
email
);
accountTkio
.
setBussinessman
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
accountRepository
.
save
(
accountTkio
);
account4Web
.
setBussinessMan
(
Long
.
parseLong
(
leader
.
getId
()+
""
));
return
account4WebRepository
.
save
(
account4Web
);
}
@Override
public
List
<
Account4Web
>
findAll
(
User
user
)
{
List
<
Account4Web
>
result
=
new
ArrayList
<>();
List
<
Account4Web
>
account4WebList
=
null
;
...
...
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