dev-discount
袁野 2 years ago
parent 3180a8bcad
commit 04d3aefab0
  1. 6
      hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java
  2. 19
      hai-order/src/main/java/com/web/controller/OrderController.java
  3. 10
      hai-service/src/main/java/com/hai/order/service/OrderService.java
  4. 11
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java

@ -362,14 +362,14 @@ public class HighThirdPartyController {
@RequestMapping(value = "/getThirdOrderByOrderId", method = RequestMethod.GET) @RequestMapping(value = "/getThirdOrderByOrderNo", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询第三方订单详情") @ApiOperation(value = "查询第三方订单详情")
public ResponseData getThirdOrderByOrderId(@RequestParam(name = "orderId", required = true) Long orderId) { public ResponseData getThirdOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) {
try { try {
HighOrder order = highOrderService.getOrderById(orderId); HighOrder order = highOrderService.getOrderByOrderNo(orderNo);
JSONObject object; JSONObject object;
ThirdPartyModel partyModel = new ThirdPartyModel(); ThirdPartyModel partyModel = new ThirdPartyModel();

@ -52,9 +52,6 @@ public class OrderController {
@Resource @Resource
private UserCenter userCenter; private UserCenter userCenter;
@Autowired
private RocketMQTemplate rocketMQTemplate;
@RequestMapping(value="/create",method = RequestMethod.POST) @RequestMapping(value="/create",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "创建订单") @ApiOperation(value = "创建订单")
@ -257,4 +254,20 @@ public class OrderController {
} }
} }
@RequestMapping(value = "/orderCheck", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据订单id查看订单")
public ResponseData orderCheck(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
orderService.orderCheck(orderNo);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOrderController --> cancelOrder() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -82,4 +82,14 @@ public interface OrderService {
*/ */
List<HighOrder> getOrderList(Map<String,Object> param); List<HighOrder> getOrderList(Map<String,Object> param);
/**
* @Author Sum1Dream
* @Name orderCheck
* @Description // 查看订单
* @Date 13:55 2022/10/25
* @Param [orderNo]
* @Return void
*/
void orderCheck(String orderNo);
} }

@ -655,4 +655,15 @@ public class OrderServiceImpl implements OrderService {
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
return orderMapper.selectByExample(example); return orderMapper.selectByExample(example);
} }
@Override
public void orderCheck(String orderNo) {
HighOrder highOrder = getOrderDetailByNo(orderNo);
highOrder.setWhetherCheck(true);
if (highOrder.getOrderStatus() == 3) {
orderMapper.updateByPrimaryKey(highOrder);
}
}
} }

Loading…
Cancel
Save