Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
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
hooloo
ms
soss
Commits
9d685b0e
Commit
9d685b0e
authored
Jun 03, 2022
by
张新旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码什么时候是个头
parent
eb82b202
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
soss-admin/src/main/java/com/soss/web/controller/system/SysLoginController.java
+1
-1
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
+2
-2
soss-system/src/main/java/com/soss/system/service/impl/SysMenuServiceImpl.java
+2
-1
No files found.
soss-admin/src/main/java/com/soss/web/controller/system/SysLoginController.java
View file @
9d685b0e
...
...
@@ -79,7 +79,7 @@ public class SysLoginController
@GetMapping
(
"getRouters"
)
public
AjaxResult
getRouters
()
{
Long
userId
=
1L
;
SecurityUtils
.
getUserId
();
Long
userId
=
SecurityUtils
.
getUserId
();
List
<
SysMenu
>
menus
=
menuService
.
selectMenuTreeByUserId
(
userId
);
return
AjaxResult
.
success
(
menuService
.
buildMenus
(
menus
));
}
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
View file @
9d685b0e
...
...
@@ -154,10 +154,10 @@ public class OrderServiceImpl implements IOrderService
if
(
orderDetails
!=
null
&&
!
orderDetails
.
isEmpty
()){
BigDecimal
bigDecimal
=
new
BigDecimal
(
0
);
for
(
OrderDetail
orderDetail
:
orderDetails
)
{
bigDecimal
.
add
(
orderDetail
.
getRealAmount
().
multiply
(
new
BigDecimal
(
orderDetail
.
getNum
())));
bigDecimal
=
bigDecimal
.
add
(
orderDetail
.
getRealAmount
().
multiply
(
new
BigDecimal
(
orderDetail
.
getNum
())));
}
if
(
order
.
getAmount
().
compareTo
(
bigDecimal
)!=
0
){
throw
new
ServiceException
(
"价格计算出现了问题,请重新计算"
);
throw
new
ServiceException
(
"价格计算出现了问题,请重新计算"
+
bigDecimal
.
stripTrailingZeros
().
toString
()
);
}
order
.
setAmount
(
bigDecimal
);
int
i
=
orderMapper
.
insertOrder
(
order
);
...
...
soss-system/src/main/java/com/soss/system/service/impl/SysMenuServiceImpl.java
View file @
9d685b0e
...
...
@@ -154,7 +154,8 @@ public class SysMenuServiceImpl implements ISysMenuService
router
.
setQuery
(
menu
.
getQuery
());
router
.
setMeta
(
new
MetaVo
(
menu
.
getMenuName
(),
menu
.
getIcon
(),
StringUtils
.
equals
(
"1"
,
menu
.
getIsCache
()),
menu
.
getPath
()));
List
<
SysMenu
>
cMenus
=
menu
.
getChildren
();
if
(!
cMenus
.
isEmpty
()
&&
cMenus
.
size
()
>
0
&&
(
UserConstants
.
TYPE_DIR
.
equals
(
menu
.
getMenuType
())||
UserConstants
.
TYPE_MENU
.
equals
(
menu
.
getMenuType
())))
//||UserConstants.TYPE_MENU.equals(menu.getMenuType())
if
(!
cMenus
.
isEmpty
()
&&
cMenus
.
size
()
>
0
&&
(
UserConstants
.
TYPE_DIR
.
equals
(
menu
.
getMenuType
())))
{
router
.
setAlwaysShow
(
true
);
router
.
setRedirect
(
"noRedirect"
);
...
...
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