Commit ce085142 authored by Quxl's avatar Quxl

x

parent 162244fe
......@@ -131,7 +131,11 @@ public class BrandController {
@RequestMapping(value = "/getBrandList",method=RequestMethod.GET)
public String getBrandList(String orgNo, HttpServletRequest request, HttpServletResponse response) {
List<Map<String, Object>> returnList = brandService.queryBrandList(orgNo);
return Rjx.jsonOk().set("list", returnList).toJson();
List<String> cs = new ArrayList<String>();
for(Map<String, Object> map : returnList) {
cs.add((String)map.get("sBrandName"));
}
return Rjx.jsonOk().set("keys", cs).set("list", returnList).toJson();
}
@ApiOperation("热销品牌列表")
......
package com.egolm.shop.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -59,6 +60,11 @@ public class CategoryController {
@RequestMapping(value = "/queryCategoryByLevel",method=RequestMethod.GET)
public String queryCategoryByLevel(String orgNo, String scopeTypeID, Integer level, HttpServletRequest request, HttpServletResponse response) {
List<Map<String, Object>> list = categoryService.queryCategoryByLevel(orgNo, scopeTypeID, level);
return Rjx.jsonOk().set("list", list).toJson();
List<String> cs = new ArrayList<String>();
for(Map<String, Object> map : list) {
cs.add((String)map.get("sCategoryDesc"));
}
return Rjx.jsonOk().set("keys", cs).set("list", list).toJson();
}
}
......@@ -92,6 +92,7 @@ public class BrandServiceImpl implements BrandService {
+ "b.sBrandName, "
+ "b.sLogoUrl "
+ "ORDER BY "
+ "b.nSort, "
+ "b.sPinyinCode ";
return jdbcTemplate.queryForList(sql, orgNo);
}
......
......@@ -69,7 +69,7 @@ public class CategoryServiceImpl implements CategoryService {
if(level == null) {
level = jdbcTemplate.queryForInt("select GoodsCategoryLevel = isnull((select Convert(int,sValue1) from tSystemCtrl where sCode = 'GoodsCategoryLevel'),0)");
}
String three="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and nCategoryLevel = ?";
String three="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and nCategoryLevel = ? order by nSort";
List<Map<String,Object>> list3=jdbcTemplate.queryForList(three, orgNO, level);
return list3;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment