新增 篮球订单统计功能

This commit is contained in:
2024-01-20 20:48:54 +08:00
parent 1fd9dd4109
commit 648266357e
4 changed files with 18 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
package com.sv.oms.controller;
import com.enums.OrderTypeEnum;
import com.sv.service.oms.OrderService;
import com.ydd.framework.core.common.Pagination;
import com.ydd.framework.core.common.dto.ResponseDTO;
@@ -25,7 +26,7 @@ import java.io.IOException;
public class OrderController extends OmsController {
private final Logger logger = LoggerFactory.getLogger(OrderController.class);
@Resource
private OrderService orderService;
@@ -51,13 +52,23 @@ public class OrderController extends OmsController {
}
/**
* 查询月充值金额i
* 查询月充值金额
* 报表
*/
@RequestMapping(value = "/order/money", method = RequestMethod.GET)
public ResponseDTO findMoney(@RequestParam("time") String time) {
return ResponseDTO.ok()
.addAttribute("money", orderService.findMoney(time));
.addAttribute("money", orderService.findMoney(time, OrderTypeEnum.BALANCE_ORDER.value));
}
/**
* 查询月充值金额i
* 报表
*/
@RequestMapping(value = "/order/basket/money", method = RequestMethod.GET)
public ResponseDTO findBasketMoney(@RequestParam("time") String time) {
return ResponseDTO.ok()
.addAttribute("money", orderService.findMoney(time, OrderTypeEnum.BASKETBALL_ORDER.value));
}
/**

View File

@@ -78,7 +78,7 @@ public interface OrderMapper {
*
* @return 订单报表集合
*/
List<OrderCheatDTO> findMoney(@Param("time") String time);
List<OrderCheatDTO> findMoney(@Param("time") String time,@Param("type") Integer type);
/**
* api 根据用户Id订单号查询订单

View File

@@ -137,7 +137,7 @@ public class OrderService extends BaseServiceImpl {
* @param time
* @return
*/
public List<OrderCheatDTO> findMoney(String time){
public List<OrderCheatDTO> findMoney(String time,Integer orderType){
int days = 0;
if (StringUtils.isNotBlank(time)){
time = time.replace("-","");
@@ -154,8 +154,7 @@ public class OrderService extends BaseServiceImpl {
OrderCheatDTO orderDTO = new OrderCheatDTO();
orderDTO.setDays(days);
List<OrderCheatDTO> orderDTOS = orderMapper.findMoney(time);
List<OrderCheatDTO> orderDTOS = orderMapper.findMoney(time,orderType);
List<OrderCheatDTO> dtoList = new ArrayList<>();
for (int i=1; i <= days; i++){

View File

@@ -158,7 +158,7 @@
FROM
sv_order
WHERE
(type = 2 OR type = 4)
type = #{type}
AND pay_status = 1
AND pay_type = 1
AND deleted = 0