Browse Source

二级市场收购商购买功能修改

linbl 1 year ago
parent
commit
a786bbaef9

+ 4 - 8
sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersApiController.java

@@ -104,14 +104,10 @@ public class TbOrdersApiController {
 
 
 	/** 查 根据订单Id查订单详情 */
 	/** 查 根据订单Id查订单详情 */
 	@RequestMapping("getDetailById")
 	@RequestMapping("getDetailById")
-	public AjaxJson getDetailById(Long id) {
-		TbOrders t = tbOrdersService.getById(id);
-
-		List<TbOrders> OrderList = new ArrayList<>();
-		OrderList.add(t);
-		List<TbOrdersDto> tbOrdersDto = methodOrdersService.getTbOrdersDto(OrderList);
-		if(tbOrdersDto.size() > 0) return AjaxJson.getSuccessData(tbOrdersDto.get((0)));
-		return AjaxJson.getError();
+	public AjaxJson getDetailById() {
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbOrders> list = tbOrdersService.getDetailById(so);
+		return AjaxJson.getSuccessData(list);
 	}
 	}
 
 
 
 

+ 13 - 0
sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersService.java

@@ -100,6 +100,19 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
 		return true;
 		return true;
     }
     }
 
 
+	List<TbOrders> getDetailById(SoMap so){
+		String idStr = so.getString("ids");
+		if(StringUtils.isEmpty(idStr)) throw new RuntimeException("当前订单操作异常,请重新登录或联系管理员!");
+
+		List<TbOrders> list = new ArrayList<>();
+
+		String[] idArr = idStr.split(",");
+		for (String id : idArr) {
+			TbOrders orders = getById(id);
+			list.add(orders);
+		}
+		return list;
+	}
 	/** 查 */
 	/** 查 */
 	TbOrders getById(Long id){
 	TbOrders getById(Long id){
 		return super.getById(id);
 		return super.getById(id);