Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
799bb62a
Commit
799bb62a
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete menu service interface
parent
44ad4bf0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
45 deletions
+28
-45
MenuController.java
...main/java/pwc/taxtech/atms/controller/MenuController.java
+15
-10
MenuService.java
...i/src/main/java/pwc/taxtech/atms/service/MenuService.java
+0
-19
MenuServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
+12
-14
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+1
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/MenuController.java
View file @
799bb62a
package
pwc
.
taxtech
.
atms
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.MenuDisplayDto
;
import
pwc.taxtech.atms.dto.MenuDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.entity.Menu
;
import
pwc.taxtech.atms.service.MenuService
;
import
pwc.taxtech.atms.service.impl.MenuServiceImpl
;
import
java.util.List
;
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\MenuController.cs */
@RestController
@RequestMapping
(
"/api/v1/menu"
)
public
class
MenuController
{
...
...
@@ -23,18 +26,20 @@ public class MenuController {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MenuController
.
class
);
@Autowired
private
MenuService
menuService
;
private
MenuService
Impl
menuService
;
@ApiOperation
(
value
=
"获取用于显示的菜单列表"
,
notes
=
"请提供条件参数serviceId"
)
@RequestMapping
(
value
=
"/display"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
MenuDisplayDto
>
getMenusForDisplay
(
@RequestParam
(
"serviceId"
)
Integer
serviceId
)
{
public
@ResponseBody
List
<
MenuDisplayDto
>
getMenusForDisplay
(
@RequestParam
(
"serviceId"
)
Integer
serviceId
)
{
logger
.
info
(
"come into menu display"
);
return
menuService
.
getMenusForDisplay
(
serviceId
);
}
@ApiOperation
(
value
=
"获取菜单列表"
,
notes
=
"请提供条件参数serviceId"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
MenuDto
>
getMenus
(
@RequestParam
(
"serviceId"
)
Integer
serviceId
)
{
public
@ResponseBody
List
<
MenuDto
>
getMenus
(
@RequestParam
(
"serviceId"
)
Integer
serviceId
)
{
logger
.
info
(
"come into menu"
);
return
menuService
.
getMenus
(
serviceId
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/MenuService.java
deleted
100644 → 0
View file @
44ad4bf0
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dto.MenuDisplayDto
;
import
pwc.taxtech.atms.dto.MenuDto
;
import
pwc.taxtech.atms.entity.Menu
;
public
interface
MenuService
{
List
<
MenuDisplayDto
>
getMenusForDisplay
(
Integer
moduleId
);
List
<
MenuDto
>
getMenus
(
Integer
moduleId
);
List
<
Menu
>
findByIsActive
(
Boolean
isActive
);
void
update
(
Menu
menu
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
View file @
799bb62a
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.common.CommonConstants
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.dao.MenuMapper
;
...
...
@@ -18,19 +12,22 @@ import pwc.taxtech.atms.dto.MenuDisplayDto;
import
pwc.taxtech.atms.dto.MenuDto
;
import
pwc.taxtech.atms.entity.Menu
;
import
pwc.taxtech.atms.entity.MenuExample
;
import
pwc.taxtech.atms.service.MenuService
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
*/
@Service
public
class
MenuServiceImpl
implements
MenuService
{
public
class
MenuServiceImpl
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MenuServiceImpl
.
class
);
@Autowired
private
MenuMapper
menuMapper
;
@Override
public
List
<
MenuDisplayDto
>
getMenusForDisplay
(
Integer
moduleId
)
{
logger
.
debug
(
"Start to get menus for display"
);
if
(
moduleId
==
null
)
{
...
...
@@ -53,13 +50,17 @@ public class MenuServiceImpl implements MenuService {
MenuDisplayDto
menuDisplayDto
=
new
MenuDisplayDto
();
CommonUtils
.
copyProperties
(
menu
,
menuDisplayDto
);
return
menuDisplayDto
;
};
}
;
private
MenuDto
rotateMenuToMenuDto
(
Menu
menu
)
{
MenuDto
menuDto
=
new
MenuDto
();
CommonUtils
.
copyProperties
(
menu
,
menuDto
);
return
menuDto
;
};
}
;
private
void
getSubMenuDto
(
MenuDisplayDto
menu
,
List
<
Menu
>
menus
)
{
List
<
MenuDisplayDto
>
subMenuDtos
=
menus
.
stream
()
...
...
@@ -72,7 +73,6 @@ public class MenuServiceImpl implements MenuService {
}
}
@Override
public
List
<
MenuDto
>
getMenus
(
Integer
moduleId
)
{
logger
.
debug
(
"Start to get menus"
);
if
(
moduleId
==
null
)
{
...
...
@@ -112,14 +112,12 @@ public class MenuServiceImpl implements MenuService {
}
}
@Override
public
List
<
Menu
>
findByIsActive
(
Boolean
isActive
)
{
MenuExample
menuExample
=
new
MenuExample
();
menuExample
.
createCriteria
().
andIsActiveEqualTo
(
isActive
);
return
menuMapper
.
selectByExample
(
menuExample
);
}
@Override
public
void
update
(
Menu
menu
)
{
menuMapper
.
updateByPrimaryKeySelective
(
menu
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
799bb62a
...
...
@@ -54,7 +54,6 @@ import pwc.taxtech.atms.exception.ApplicationException;
import
pwc.taxtech.atms.security.AtmsPasswordEncoder
;
import
pwc.taxtech.atms.security.JwtUtil
;
import
pwc.taxtech.atms.security.LdapAuthenticationProvider
;
import
pwc.taxtech.atms.service.MenuService
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
java.util.ArrayList
;
...
...
@@ -85,7 +84,7 @@ public class UserServiceImpl extends AbstractService {
@Autowired
private
RoleServiceImpl
roleService
;
@Autowired
private
MenuService
menuService
;
private
MenuService
Impl
menuService
;
@Autowired
private
UserAccountServiceImpl
userAccountService
;
@Autowired
...
...
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