Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
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
data-server
Commits
584c65af
Commit
584c65af
authored
Mar 09, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月度奖金接口调试
parent
080b4735
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
MonthAwardMapper.java
...r/src/main/java/cn/wisenergy/mapper/MonthAwardMapper.java
+5
-0
MonthAwardMapper.xml
...rgy-mapper/src/main/resources/mapper/MonthAwardMapper.xml
+1
-2
TradeRecordMapper.xml
...gy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
+1
-1
MonthAwardServiceImpl.java
.../cn/wisenergy/service/app/impl/MonthAwardServiceImpl.java
+3
-0
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/MonthAwardMapper.java
View file @
584c65af
...
...
@@ -35,5 +35,10 @@ public interface MonthAwardMapper extends BaseMapper<MonthAward> {
*/
int
delById
(
Integer
id
);
/**
* 获取本月 月度奖金
* @param yearMonth 年月
* @return 月度奖金
*/
MonthAward
getByTime
(
@Param
(
"yearMonth"
)
Date
yearMonth
);
}
wisenergy-mapper/src/main/resources/mapper/MonthAwardMapper.xml
View file @
584c65af
...
...
@@ -93,9 +93,8 @@
<include
refid=
"table"
/>
<where>
<if
test=
"yearMonth != null"
>
AND(
YEAR(create_time) = YEAR(#{yearMonth})
AND MONTH(create_time) = MONTH(#{yearMonth})
)
AND MONTH(create_time) = MONTH(#{yearMonth})
</if>
order by create_time desc
limit 1
...
...
wisenergy-mapper/src/main/resources/mapper/TradeRecordMapper.xml
View file @
584c65af
...
...
@@ -141,7 +141,7 @@
from
<include
refid=
"table"
/>
<where>
(type=2 or status=0)
(t
rade_t
ype=2 or status=0)
<if
test=
"userId"
>
and user_id=#{userId}
</if>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/MonthAwardServiceImpl.java
View file @
584c65af
package
cn
.
wisenergy
.
service
.
app
.
impl
;
import
cn.wisenergy.common.utils.DateUtil
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.mapper.MonthAwardMapper
;
import
cn.wisenergy.mapper.TradeRecordMapper
;
...
...
@@ -20,6 +21,8 @@ import java.util.Date;
@Slf4j
@Service
public
class
MonthAwardServiceImpl
extends
ServiceImpl
<
MonthAwardMapper
,
MonthAward
>
implements
MonthAwardService
{
private
static
final
String
PATTERN
=
"yyyy-MM"
;
@Autowired
private
TradeRecordMapper
tradeRecordMapper
;
...
...
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