Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
shop-Mall
Commits
d88bf12e
Commit
d88bf12e
authored
Mar 23, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增统计月度奖金接口
parent
4bf27a2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
AccountMapper.java
...pper/src/main/java/cn/wisenergy/mapper/AccountMapper.java
+0
-2
TradeRecordService.java
...ain/java/cn/wisenergy/service/app/TradeRecordService.java
+1
-1
TradeRecordServiceImpl.java
...cn/wisenergy/service/app/impl/TradeRecordServiceImpl.java
+9
-3
TradeRecordController.java
...nergy/web/admin/controller/app/TradeRecordController.java
+9
-1
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/AccountMapper.java
View file @
d88bf12e
...
...
@@ -5,8 +5,6 @@ import cn.wisenergy.model.app.AccountInfo;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* @author 86187
*/
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/TradeRecordService.java
View file @
d88bf12e
...
...
@@ -16,7 +16,7 @@ public interface TradeRecordService {
*
* @return true or false
*/
Boolean
monthAwardCount
();
R
<
Boolean
>
monthAwardCount
();
/**
* 交易流水列表查询
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/TradeRecordServiceImpl.java
View file @
d88bf12e
...
...
@@ -39,7 +39,7 @@ public class TradeRecordServiceImpl extends ServiceImpl<TradeRecordMapper, Trade
private
TradeRecordMapper
tradeRecordMapper
;
@Override
public
Boolean
monthAwardCount
()
{
public
R
<
Boolean
>
monthAwardCount
()
{
MonthAward
result
=
new
MonthAward
();
//1、获取本月新增奖金
Double
monthGrow
=
baseMapper
.
queryMonthGrow
(
new
Date
());
...
...
@@ -93,11 +93,17 @@ public class TradeRecordServiceImpl extends ServiceImpl<TradeRecordMapper, Trade
MonthAward
currentMonth
=
monthAwardMapper
.
getByTime
(
new
Date
());
if
(
null
==
currentMonth
)
{
int
count
=
monthAwardMapper
.
add
(
result
);
return
count
!=
0
;
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
else
{
int
count
=
monthAwardMapper
.
edit
(
result
);
return
count
!=
0
;
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
return
R
.
ok
(
0
,
true
);
}
@Override
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TradeRecordController.java
View file @
d88bf12e
...
...
@@ -3,7 +3,6 @@ package cn.wisenergy.web.admin.controller.app;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.TradeRecord
;
import
cn.wisenergy.model.dto.TradeRecordQuery
;
import
cn.wisenergy.model.vo.TaxRateVo
;
import
cn.wisenergy.service.app.TradeRecordService
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
...
...
@@ -12,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -33,4 +33,12 @@ public class TradeRecordController {
log
.
info
(
"shop-mall[]TradeRecordController[]queryList[]input.param.query:"
+
query
);
return
tradeRecordService
.
queryList
(
query
);
}
@ApiOperation
(
value
=
"统计月度奖金"
,
notes
=
"统计月度奖金"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/monthAwardCount"
)
public
R
<
Boolean
>
monthAwardCount
()
{
log
.
info
(
"shop-mall[]TradeRecordController[]monthAwardCount[]input.method"
);
return
tradeRecordService
.
monthAwardCount
();
}
}
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