Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
8de9ef96
Commit
8de9ef96
authored
Oct 10, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加空值判断
parent
a614038d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
pz-admin/src/main/java/com/pz/web/controller/system/SysLoginController.java
+5
-1
pz-system/src/main/resources/mapper/system/TotalOrderMapper.xml
+1
-1
No files found.
pz-admin/src/main/java/com/pz/web/controller/system/SysLoginController.java
View file @
8de9ef96
...
...
@@ -26,6 +26,7 @@ import javax.validation.constraints.NotBlank;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
/**
* 登录验证
...
...
@@ -110,7 +111,10 @@ public class SysLoginController {
public
R
<
Map
<
String
,
Object
>>
getInfo
()
{
LoginUser
loginUser
=
LoginHelper
.
getLoginUser
();
SysUser
user
=
userService
.
selectUserById
(
loginUser
.
getUserId
());
user
.
setRoleId
(
iSysRoleService
.
getRoleByUserId
(
user
.
getUserId
()).
getRoleId
());
Optional
.
ofNullable
(
iSysRoleService
.
getRoleByUserId
(
user
.
getUserId
()))
.
ifPresent
(
sysRole
->
{
user
.
setRoleId
(
sysRole
.
getRoleId
());
});
Map
<
String
,
Object
>
ajax
=
new
HashMap
<>();
ajax
.
put
(
"user"
,
user
);
ajax
.
put
(
"roles"
,
loginUser
.
getRolePermission
());
...
...
pz-system/src/main/resources/mapper/system/TotalOrderMapper.xml
View file @
8de9ef96
...
...
@@ -71,7 +71,7 @@
where t.id = #{id}
</select>
<select
id=
"selectSaleroom"
resultType=
"com.pz.system.domain.vo.DataOrderVo"
>
SELECT IFNULL(ROUND(SUM(pay_money), 2),0) as dataSum FROM total_order WHERE `status`
= 1
and refund_amount = 0
SELECT IFNULL(ROUND(SUM(pay_money), 2),0) as dataSum FROM total_order WHERE `status`
!= 0
and refund_amount = 0
<if
test=
"dataViewBo.condition == 2"
>
and finish_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
</if>
...
...
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