月为单位 查用户
This commit is contained in:
parent
d4183436e6
commit
f13daaf01e
|
|
@ -43,7 +43,7 @@ public interface PayDetailsDao extends BaseMapper<PayDetails> {
|
|||
|
||||
int selectPayCount(Long userId);
|
||||
|
||||
Double instantselectSumPay(@Param("date") String date, @Param("userId") Long userId);
|
||||
Double instantselectSumPay(@Param("startTime") String startTime,@Param("endTime") String endTime, @Param("userId") Long userId);
|
||||
|
||||
|
||||
Double statisticsIncomeMoney(@Param("time") String time, @Param("flag") Integer flag, @Param("ordersType") Integer ordersType);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.sqx.modules.pay.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
|
@ -80,7 +81,9 @@ public class PayDetailsServiceImpl extends ServiceImpl<PayDetailsDao, PayDetails
|
|||
|
||||
@Override
|
||||
public Double instantselectSumPay(String date, Long userId) {
|
||||
return payDetailsDao.instantselectSumPay(date, userId);
|
||||
return payDetailsDao.instantselectSumPay(
|
||||
DateUtil.parse(date,"yyyy-MM")+"-00 00:00:00",
|
||||
DateUtil.endOfMonth(DateUtil.parse(date)).toString(), userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -141,10 +141,14 @@
|
|||
order by d.pay_time desc
|
||||
</select>
|
||||
<select id="instantselectSumPay" resultType="Double">
|
||||
select sum(money) from pay_details where 1=1
|
||||
and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
|
||||
and state=1 and user_id=#{userId}
|
||||
</select>
|
||||
select sum(money)
|
||||
from pay_details
|
||||
where 1 = 1
|
||||
and create_time > #{startTime}
|
||||
and create_time < #{endTime}
|
||||
and state = 1
|
||||
and user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserMemberList" resultType="Map">
|
||||
|
|
|
|||
Loading…
Reference in New Issue