月为单位 查用户
This commit is contained in:
@@ -43,7 +43,7 @@ public interface PayDetailsDao extends BaseMapper<PayDetails> {
|
|||||||
|
|
||||||
int selectPayCount(Long userId);
|
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);
|
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;
|
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.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -80,7 +81,9 @@ public class PayDetailsServiceImpl extends ServiceImpl<PayDetailsDao, PayDetails
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Double instantselectSumPay(String date, Long userId) {
|
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
|
@Override
|
||||||
|
|||||||
@@ -141,10 +141,14 @@
|
|||||||
order by d.pay_time desc
|
order by d.pay_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="instantselectSumPay" resultType="Double">
|
<select id="instantselectSumPay" resultType="Double">
|
||||||
select sum(money) from pay_details where 1=1
|
select sum(money)
|
||||||
and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
|
from pay_details
|
||||||
and state=1 and user_id=#{userId}
|
where 1 = 1
|
||||||
</select>
|
and create_time > #{startTime}
|
||||||
|
and create_time < #{endTime}
|
||||||
|
and state = 1
|
||||||
|
and user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectUserMemberList" resultType="Map">
|
<select id="selectUserMemberList" resultType="Map">
|
||||||
|
|||||||
Reference in New Issue
Block a user