1.财务中心和数据中心收入明细不匹配修复
This commit is contained in:
@@ -273,9 +273,9 @@ public class CashController {
|
||||
@ApiOperation("收入统计")
|
||||
@GetMapping("/statisticsIncomeMoney")
|
||||
public Result statisticsIncomeMoney(String time, Integer flag) {
|
||||
Double sumMoney = ordersService.statisticsIncomeMoney(time, flag, null);
|
||||
Double courseMoney = ordersService.statisticsIncomeMoney(time, flag, 1);
|
||||
Double vipMoney = ordersService.statisticsIncomeMoney(time, flag, 2);
|
||||
Double sumMoney = payDetailsService.statisticsIncomeMoney(time, flag, null);
|
||||
Double courseMoney = payDetailsService.statisticsIncomeMoney(time, flag, 1);
|
||||
Double vipMoney = payDetailsService.statisticsIncomeMoney(time, flag, 2);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("sumMoney", sumMoney == null ? 0.00 : sumMoney);
|
||||
map.put("courseMoney", courseMoney == null ? 0.00 : courseMoney);
|
||||
|
||||
@@ -20,4 +20,5 @@ public interface PayDetailsService {
|
||||
|
||||
Double instantselectSumPay(String date, Long userId);
|
||||
|
||||
Double statisticsIncomeMoney(String time, Integer flag, Integer ordersType);
|
||||
}
|
||||
|
||||
@@ -83,5 +83,8 @@ public class PayDetailsServiceImpl extends ServiceImpl<PayDetailsDao, PayDetails
|
||||
return payDetailsDao.instantselectSumPay(date, userId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Double statisticsIncomeMoney(String time, Integer flag, Integer ordersType) {
|
||||
return baseMapper.statisticsIncomeMoney(time, flag, ordersType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +162,18 @@
|
||||
select count(*) from pay_details
|
||||
where `state`=1 and user_id=#{userId}
|
||||
</select>
|
||||
<select id="statisticsIncomeMoney" resultType="java.lang.Double">
|
||||
select sum(money) from pay_details where state=1
|
||||
<if test="flag!=null and flag==1">
|
||||
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="flag!=null and flag==2">
|
||||
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
|
||||
</if>
|
||||
<if test="flag!=null and flag==3">
|
||||
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user