Commit 584c65af authored by licc's avatar licc

月度奖金接口调试

parent 080b4735
......@@ -35,5 +35,10 @@ public interface MonthAwardMapper extends BaseMapper<MonthAward> {
*/
int delById(Integer id);
/**
* 获取本月 月度奖金
* @param yearMonth 年月
* @return 月度奖金
*/
MonthAward getByTime(@Param("yearMonth")Date yearMonth);
}
......@@ -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
......
......@@ -141,7 +141,7 @@
from
<include refid="table"/>
<where>
(type=2 or status=0)
(trade_type=2 or status=0)
<if test="userId">
and user_id=#{userId}
</if>
......
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment