|
@@ -9,6 +9,9 @@ import com.sckw.stream.model.SckwBusSum;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cloud.stream.function.StreamBridge;
|
|
import org.springframework.cloud.stream.function.StreamBridge;
|
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
|
|
+import org.springframework.data.domain.PageRequest;
|
|
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -46,6 +49,13 @@ public class KwFleetController {
|
|
|
busSum.setMethod(method);
|
|
busSum.setMethod(method);
|
|
|
busSum.setObject(order);
|
|
busSum.setObject(order);
|
|
|
streamBridge.send("sckw-busSum", JSON.toJSONString(busSum));
|
|
streamBridge.send("sckw-busSum", JSON.toJSONString(busSum));
|
|
|
- return HttpResult.ok();
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //根据条件查询所有并排序,且分页
|
|
|
|
|
+ Pageable pageable = PageRequest.of(0, 2);
|
|
|
|
|
+ Page<SckwTradeOrder> all3 = tradeOrderRepository.findAll(pageable);
|
|
|
|
|
+ List<SckwTradeOrder> content = all3.getContent();
|
|
|
|
|
+
|
|
|
|
|
+ return HttpResult.ok(content);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|