|
|
@@ -365,4 +365,32 @@ public class PosOrderQsOprateController extends BaseController {
|
|
|
return success(org);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 返回订单详情,带上store、user信息(返回格式与 orderList 列表项一致,仅返回单条)
|
|
|
+ * @param token
|
|
|
+ * @param ddId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Anonymous
|
|
|
+ @Auth
|
|
|
+ @GetMapping("/getOrderDetial")
|
|
|
+ public AjaxResult getOrderDetial(@RequestHeader String token, @RequestParam String ddId) {
|
|
|
+ JwtUtil jwtUtil = new JwtUtil();
|
|
|
+ String qsId = jwtUtil.getusid(token);
|
|
|
+ Long riderId = Long.valueOf(qsId);
|
|
|
+
|
|
|
+ PosOrder order = posOrderService.getOne(new LambdaQueryWrapper<PosOrder>().eq(PosOrder::getDdId, ddId).eq(PosOrder::getQsId,riderId));
|
|
|
+ if (order == null) {
|
|
|
+ throw new ServiceException(MessageUtils.message("no.order.not.found"));
|
|
|
+ }
|
|
|
+ // 序列化格式与 orderList 列表项保持一致:PosOrder 全字段 + juli + store + user
|
|
|
+ JSONObject org = JSON.parseObject(
|
|
|
+ JSON.toJSONStringWithDateFormat(order, "yyyy-MM-dd HH:mm:ss")
|
|
|
+ );
|
|
|
+ org.put("juli", null);
|
|
|
+ org.put("store", order.getMdId() == null ? null : posStoreService.getById(order.getMdId().intValue()));
|
|
|
+ org.put("user", order.getUserId() == null ? null : infoUserService.getById(order.getUserId()));
|
|
|
+ return success(org);
|
|
|
+ }
|
|
|
+
|
|
|
}
|