提交实物代码

dev-discount
袁野 2 years ago
parent ecb007c81e
commit 06d83cbcde
  1. 23
      hai-order/src/main/java/com/web/controller/business/OrderMobileRechargeController.java
  2. 11
      hai-service/src/main/java/com/hai/order/service/OrderService.java
  3. 12
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  4. 3
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

@ -41,10 +41,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
@Controller
@RequestMapping(value = "mobileRecharge")
@ -68,6 +65,9 @@ public class OrderMobileRechargeController {
@Autowired
private RedisTemplate redisTemplate;
@Resource
private OutRechargeChildOrderService outRechargeChildOrderService;
@RequestMapping(value = "/getOrderList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询话费订单列表")
@ -249,7 +249,7 @@ public class OrderMobileRechargeController {
public ResponseData getMobileOrderDetail(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
Map<String, Object> map = new HashMap<>();
map.put("tradeOrder", orderService.getOrderDetailByNo(orderNo));
map.put("tradeOrder", orderService.getOrderDetail(orderNo));
map.put("mobileOrder", outRechargeOrderService.findByOrderNo(orderNo));
return ResponseMsgUtil.success(map);
@ -288,6 +288,8 @@ public class OrderMobileRechargeController {
refundOrder(orderNo);
}
HighOrder order = highOrderService.getOrderByOrderNo(orderNo);
order.setExceptionStatus(false);
highOrderService.updateOrder(order);
@ -311,6 +313,17 @@ public class OrderMobileRechargeController {
try {
OutRechargeOrder rechargeOrder = outRechargeOrderService.findByOrderNo(orderNo);
List<OutRechargeChildOrder> rechargeChildOrderList = outRechargeChildOrderService.getListRechargeChildOrderByOrderId(rechargeOrder.getId());
for (OutRechargeChildOrder rechargeChildOrder : rechargeChildOrderList) {
if (rechargeChildOrder.getStatus() == 104) {
rechargeChildOrder.setStatus(102);
}
outRechargeChildOrderService.updateOrder(rechargeChildOrder);
}
HighOrder order = highOrderService.getOrderByOrderNo(orderNo);
order.setExceptionStatus(false);
highOrderService.updateOrder(order);

@ -69,6 +69,17 @@ public interface OrderService {
*/
HighOrder getOrderDetailByNo(String orderNo);
/**
* @Author Sum1Dream
* @Name getOrderDetail
* @Description // 查询线上
* @Date 18:29 2023/5/18
* @Param [orderNo]
* @Return com.hai.entity.HighOrder
*/
HighOrder getOrderDetail(String orderNo);
/**
* 根据子订单号查询子订单信息
* @param childOrderNo

@ -756,6 +756,18 @@ public class OrderServiceImpl implements OrderService {
return order;
}
@Override
public HighOrder getOrderDetail(String orderNo) {
HighOrderExample orderExample = new HighOrderExample();
orderExample.createCriteria().andOrderNoEqualTo(orderNo);
List<HighOrder> orderList = orderMapper.selectByExample(orderExample);
if (orderList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单号");
}
return orderList.get(0);
}
@Override
public HighChildOrder getChildOrderByNo(String childOrderNo) {
HighChildOrderExample childOrderExample = new HighChildOrderExample();

@ -760,6 +760,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
if (status == 2 || status == -1) {
childOrder.setStatus(103);
}
if (status == 99 ) {
childOrder.setStatus(104);
}
childOrder.setUpdateTime(new Date());
outRechargeChildOrderService.updateOrder(childOrder);

Loading…
Cancel
Save