子单超时信息查询
This commit is contained in:
parent
3c3e2e7d92
commit
bab6425637
|
|
@ -28,8 +28,10 @@ import com.ghy.order.service.OrderGoodsService;
|
|||
import com.ghy.order.service.OrderMasterService;
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.domain.FinancialMaster;
|
||||
import com.ghy.payment.domain.OrderTimeoutRecord;
|
||||
import com.ghy.payment.service.FinancialDetailService;
|
||||
import com.ghy.payment.service.FinancialMasterService;
|
||||
import com.ghy.payment.service.OrderFineRecordService;
|
||||
import com.ghy.system.domain.SysArea;
|
||||
import com.ghy.system.service.ISysAreaService;
|
||||
import com.ghy.web.pojo.vo.*;
|
||||
|
|
@ -98,6 +100,9 @@ public class OrderController extends BaseController {
|
|||
@Autowired
|
||||
private ISysAreaService sysAreaService;
|
||||
|
||||
@Autowired
|
||||
private OrderFineRecordService orderFineRecordService;
|
||||
|
||||
/**
|
||||
* 可派单商品数量
|
||||
* */
|
||||
|
|
@ -574,6 +579,10 @@ public class OrderController extends BaseController {
|
|||
standardList.add(orderStandard);
|
||||
}
|
||||
|
||||
// 查询是否超时
|
||||
OrderTimeoutRecord orderTimeoutRecord = orderFineRecordService.selectByDetailIdAndStatus(detail.getId(), detail.getOrderStatus());
|
||||
Boolean isOverTime = orderTimeoutRecord == null ? false : true;
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setOrderDetailId(detail.getId());
|
||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||
|
|
@ -601,6 +610,7 @@ public class OrderController extends BaseController {
|
|||
orderListResponse.setRemark(goods.getRemark());
|
||||
orderListResponse.setCustomerRemark(orderMaster.getRemark());
|
||||
orderListResponse.setOrderType(detail.getOrderType());
|
||||
orderListResponse.setIsOverTime(isOverTime);
|
||||
orderListResponses.add(orderListResponse);
|
||||
});
|
||||
return orderListResponses;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ import com.ghy.order.service.OrderDetailService;
|
|||
import com.ghy.order.service.OrderGoodsService;
|
||||
import com.ghy.order.service.OrderMasterService;
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.domain.OrderTimeoutRecord;
|
||||
import com.ghy.payment.service.FinancialDetailService;
|
||||
import com.ghy.payment.service.OrderFineRecordService;
|
||||
import com.ghy.system.domain.SysArea;
|
||||
import com.ghy.system.service.ISysAreaService;
|
||||
import com.ghy.web.pojo.vo.OrderListResponse;
|
||||
|
|
@ -85,6 +87,8 @@ public class OrderDetailController extends BaseController {
|
|||
private GoodsStandardService goodsStandardService;
|
||||
@Autowired
|
||||
private FinancialDetailService financialDetailService;
|
||||
@Autowired
|
||||
private OrderFineRecordService orderFineRecordService;
|
||||
|
||||
@RequiresPermissions("order:detail:view")
|
||||
@GetMapping()
|
||||
|
|
@ -240,6 +244,10 @@ public class OrderDetailController extends BaseController {
|
|||
standardList.add(orderStandard);
|
||||
}
|
||||
|
||||
// 查询是否超时
|
||||
OrderTimeoutRecord orderTimeoutRecord = orderFineRecordService.selectByDetailIdAndStatus(detail.getId(), detail.getOrderStatus());
|
||||
Boolean isOverTime = orderTimeoutRecord == null ? false : true;
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setOrderDetailId(detail.getId());
|
||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||
|
|
@ -267,6 +275,7 @@ public class OrderDetailController extends BaseController {
|
|||
orderListResponse.setRemark(goods.getRemark());
|
||||
orderListResponse.setCustomerRemark(orderMaster.getRemark());
|
||||
orderListResponse.setOrderType(detail.getOrderType());
|
||||
orderListResponse.setIsOverTime(isOverTime);
|
||||
orderListResponses.add(orderListResponse);
|
||||
});
|
||||
return voDataTable(orderListResponses, list);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ public class OrderListResponse {
|
|||
|
||||
private String remark;
|
||||
|
||||
private Boolean isOverTime;
|
||||
|
||||
private List<OrderStandard> standardList;
|
||||
|
||||
private List<OrderStandardDetail> orderStandardDetailList;
|
||||
|
|
|
|||
|
|
@ -109,5 +109,10 @@ public interface OrderDetailService {
|
|||
*/
|
||||
void finish(Long orderDetailId) throws BaseAdaPayException;
|
||||
|
||||
/**
|
||||
* 统计符合条件的子单数量
|
||||
* @param orderDetail
|
||||
* @return 数量
|
||||
*/
|
||||
Long countOrderDetailList(OrderDetail orderDetail);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ghy.payment.mapper;
|
||||
|
||||
import com.ghy.payment.domain.OrderTimeoutRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -9,6 +10,8 @@ import java.util.List;
|
|||
*/
|
||||
public interface OrderFineRecordMapper {
|
||||
|
||||
OrderTimeoutRecord selectByDetailIdAndStatus(@Param("orderDetailId")Long orderDetailId, @Param("orderStatus")Integer orderStatus);
|
||||
|
||||
List<OrderTimeoutRecord> selectList(OrderTimeoutRecord orderTimeoutRecord);
|
||||
|
||||
int insert(OrderTimeoutRecord orderTimeoutRecord);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.ghy.payment.service;
|
||||
|
||||
import com.ghy.payment.domain.OrderTimeoutRecord;
|
||||
|
||||
/**
|
||||
* 订单超时扣款记录接口
|
||||
* @author ydq
|
||||
* @date : 2022-09-13 22:56
|
||||
*/
|
||||
public interface OrderFineRecordService {
|
||||
/**
|
||||
* 通过子单id查询超时记录
|
||||
* @param orderDetailId 子单id
|
||||
* @param orderStatus 子单状态
|
||||
* @return 超时记录
|
||||
*/
|
||||
OrderTimeoutRecord selectByDetailIdAndStatus(Long orderDetailId, Integer orderStatus);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.ghy.payment.service.impl;
|
||||
|
||||
import com.ghy.payment.domain.OrderTimeoutRecord;
|
||||
import com.ghy.payment.mapper.OrderFineRecordMapper;
|
||||
import com.ghy.payment.service.OrderFineRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author ydq
|
||||
* @date : 2022-09-13 22:58
|
||||
*/
|
||||
@Service
|
||||
public class OrderFineRecordServiceImpl implements OrderFineRecordService {
|
||||
|
||||
@Resource
|
||||
private OrderFineRecordMapper orderFineRecordMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public OrderTimeoutRecord selectByDetailIdAndStatus(Long orderDetailId, Integer orderStatus) {
|
||||
return orderFineRecordMapper.selectByDetailIdAndStatus(orderDetailId, orderStatus);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,11 @@
|
|||
FROM order_timeout_record
|
||||
</sql>
|
||||
|
||||
<select id="selectByDetailIdAndStatus" resultMap="OrderFineRecordResult">
|
||||
<include refid="selectOrderFineRecord"></include>
|
||||
WHERE order_detail_id = #{orderDetailId} AND order_status = #{orderStatus}
|
||||
</select>
|
||||
|
||||
<select id="selectList" parameterType="com.ghy.payment.domain.OrderTimeoutRecord"
|
||||
resultMap="OrderFineRecordResult">
|
||||
<include refid="selectOrderFineRecord"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue