|
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.page.PageDomain;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.core.page.TableSupport;
|
|
|
import com.ruoyi.web.controller.iot.domain.Order;
|
|
|
+import com.ruoyi.web.controller.iot.domain.ProductOrder;
|
|
|
import com.ruoyi.web.controller.iot.service.IOrderService;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
@@ -84,6 +85,11 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
dataSource.setPassword("By@#5c9i75sgtx3b620g6m6e");
|
|
|
JdbcTemplate template = new JdbcTemplate(dataSource);
|
|
|
detail = template.queryForObject("SELECT * FROM t_factory_order where id = ;" + order.getId(), Order.class);
|
|
|
+ if (!ObjectUtils.isEmpty(detail)){
|
|
|
+ List<ProductOrder> productOrderList = template.query("SELECT * FROM t_product_order_detail where order_id = ;"+ detail.getId(),
|
|
|
+ new BeanPropertyRowMapper<ProductOrder>(ProductOrder.class));
|
|
|
+ detail.setProductOrderList(productOrderList);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e.getMessage());
|
|
|
}
|