Skip to content
Snippets Groups Projects
Commit d5f5b76d authored by Josh's avatar Josh
Browse files

numsPerRow=4

parent 49755d77
No related branches found
No related tags found
1 merge request!8numsPerRow=4
......@@ -54,6 +54,8 @@ public class GoodsService {
* price_range: List<BigDecimal> price_range: Arrays.asList(minInit: MAX_PRICE, maxInit: MIN_PRICE)
* goods_total: Integer goods_total
*/
Integer numPerRow = 4, rowsPerPage = 5;
public JSONObject getSearch(JSONObject param){
try {
Class.forName("com.mysql.cj.jdbc.Driver");
......@@ -122,7 +124,6 @@ public class GoodsService {
}
String sql_page;
Integer numPerRow = 5, rowsPerPage = 5;
Integer item_low = (page-1) * numPerRow * rowsPerPage, item_high = page * numPerRow * rowsPerPage;
sql_page = "\n limit " + item_low + "," + item_high;
......@@ -200,6 +201,7 @@ public class GoodsService {
output.put("price_range", JSONObject.toJSONString(price_range));
output.put("brand_list", JSONObject.toJSONString(new ArrayList<>(brand_set)));
output.put("goods_total", goods_total);
output.put("page", page);
return output;
}
......
......@@ -4,7 +4,7 @@
spring.datasource.url=jdbc:mysql://localhost:3306/FreshOnline?useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=Bin86087
spring.datasource.password=
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.type-aliases-package=com.example.freshonline.dao
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment