新增 篮球订单统计功能
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
package com.sv.oms.controller;
|
package com.sv.oms.controller;
|
||||||
|
import com.enums.OrderTypeEnum;
|
||||||
import com.sv.service.oms.OrderService;
|
import com.sv.service.oms.OrderService;
|
||||||
import com.ydd.framework.core.common.Pagination;
|
import com.ydd.framework.core.common.Pagination;
|
||||||
import com.ydd.framework.core.common.dto.ResponseDTO;
|
import com.ydd.framework.core.common.dto.ResponseDTO;
|
||||||
@@ -25,7 +26,7 @@ import java.io.IOException;
|
|||||||
public class OrderController extends OmsController {
|
public class OrderController extends OmsController {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(OrderController.class);
|
private final Logger logger = LoggerFactory.getLogger(OrderController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private OrderService orderService;
|
private OrderService orderService;
|
||||||
|
|
||||||
@@ -51,13 +52,23 @@ public class OrderController extends OmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询月充值金额i
|
* 查询月充值金额
|
||||||
* 报表
|
* 报表
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/order/money", method = RequestMethod.GET)
|
@RequestMapping(value = "/order/money", method = RequestMethod.GET)
|
||||||
public ResponseDTO findMoney(@RequestParam("time") String time) {
|
public ResponseDTO findMoney(@RequestParam("time") String time) {
|
||||||
return ResponseDTO.ok()
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public interface OrderMapper {
|
|||||||
*
|
*
|
||||||
* @return 订单报表集合
|
* @return 订单报表集合
|
||||||
*/
|
*/
|
||||||
List<OrderCheatDTO> findMoney(@Param("time") String time);
|
List<OrderCheatDTO> findMoney(@Param("time") String time,@Param("type") Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* api 根据用户Id,订单号查询订单
|
* api 根据用户Id,订单号查询订单
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class OrderService extends BaseServiceImpl {
|
|||||||
* @param time
|
* @param time
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<OrderCheatDTO> findMoney(String time){
|
public List<OrderCheatDTO> findMoney(String time,Integer orderType){
|
||||||
int days = 0;
|
int days = 0;
|
||||||
if (StringUtils.isNotBlank(time)){
|
if (StringUtils.isNotBlank(time)){
|
||||||
time = time.replace("-","");
|
time = time.replace("-","");
|
||||||
@@ -154,8 +154,7 @@ public class OrderService extends BaseServiceImpl {
|
|||||||
|
|
||||||
OrderCheatDTO orderDTO = new OrderCheatDTO();
|
OrderCheatDTO orderDTO = new OrderCheatDTO();
|
||||||
orderDTO.setDays(days);
|
orderDTO.setDays(days);
|
||||||
|
List<OrderCheatDTO> orderDTOS = orderMapper.findMoney(time,orderType);
|
||||||
List<OrderCheatDTO> orderDTOS = orderMapper.findMoney(time);
|
|
||||||
List<OrderCheatDTO> dtoList = new ArrayList<>();
|
List<OrderCheatDTO> dtoList = new ArrayList<>();
|
||||||
|
|
||||||
for (int i=1; i <= days; i++){
|
for (int i=1; i <= days; i++){
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
FROM
|
FROM
|
||||||
sv_order
|
sv_order
|
||||||
WHERE
|
WHERE
|
||||||
(type = 2 OR type = 4)
|
type = #{type}
|
||||||
AND pay_status = 1
|
AND pay_status = 1
|
||||||
AND pay_type = 1
|
AND pay_type = 1
|
||||||
AND deleted = 0
|
AND deleted = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user