Commit 6c807939 authored by chang20170705's avatar chang20170705

brand

parent ac44a8f9
...@@ -36,7 +36,6 @@ public class BrandServiceImpl implements BrandService { ...@@ -36,7 +36,6 @@ public class BrandServiceImpl implements BrandService {
@Override @Override
public List<Map<String, Object>> getBrandList(Map<String, Object> map) { public List<Map<String, Object>> getBrandList(Map<String, Object> map) {
List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>();
String sql=" SELECT PinyinCode = b.sPinyinCode,BrandNO = acg.sBrandID, " String sql=" SELECT PinyinCode = b.sPinyinCode,BrandNO = acg.sBrandID, "
+ "BrandName = b.sBrandName,ImgPath = b.sLogoUrl " + "BrandName = b.sBrandName,ImgPath = b.sLogoUrl "
+ "FROM tAgentContractGoods acg, tBrand b " + "FROM tAgentContractGoods acg, tBrand b "
...@@ -44,13 +43,11 @@ public class BrandServiceImpl implements BrandService { ...@@ -44,13 +43,11 @@ public class BrandServiceImpl implements BrandService {
+ "group by b.sPinyinCode, acg.sBrandID, b.sBrandName, b.sLogoUrl " + "group by b.sPinyinCode, acg.sBrandID, b.sBrandName, b.sLogoUrl "
+ "ORDER BY b.sPinyinCode "; + "ORDER BY b.sPinyinCode ";
String OrgNO=(String) map.get("OrgNO"); String OrgNO=(String) map.get("OrgNO");
listMap=jdbcTemplate.queryForList(sql, OrgNO); return jdbcTemplate.queryForList(sql, OrgNO);
return listMap;
} }
@Override @Override
public List<Map<String, Object>> getHotSaleBrands(Map<String, Object> map) { public List<Map<String, Object>> getHotSaleBrands(Map<String, Object> map) {
List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>();
String sql="SELECT TOP 20 " String sql="SELECT TOP 20 "
+ "BrandNO = b.sBrandID, " + "BrandNO = b.sBrandID, "
+ "BrandName = b.sBrandName, " + "BrandName = b.sBrandName, "
...@@ -65,7 +62,6 @@ public class BrandServiceImpl implements BrandService { ...@@ -65,7 +62,6 @@ public class BrandServiceImpl implements BrandService {
+ "GROUP BY b.sBrandID, b.sBrandName, b.sLogoUrl " + "GROUP BY b.sBrandID, b.sBrandName, b.sLogoUrl "
+ "ORDER BY sum(a.nSaleQty) DESC "; + "ORDER BY sum(a.nSaleQty) DESC ";
String OrgNO=(String) map.get("OrgNO"); String OrgNO=(String) map.get("OrgNO");
listMap=jdbcTemplate.queryForList(sql, OrgNO); return jdbcTemplate.queryForList(sql, OrgNO);
return listMap;
} }
} }
...@@ -52,7 +52,6 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -52,7 +52,6 @@ public class GoodsServiceImpl implements GoodsService {
@Override @Override
public List<Map<String, Object>> getHotSaleGoods(Map<String, Object> map) { public List<Map<String, Object>> getHotSaleGoods(Map<String, Object> map) {
List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>();
String sql="SELECT TOP 20" String sql="SELECT TOP 20"
+"GoodsID = a.nGoodsID, " +"GoodsID = a.nGoodsID, "
+"GoodsNO = g.sGoodsNO, " +"GoodsNO = g.sGoodsNO, "
...@@ -73,8 +72,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -73,8 +72,7 @@ public class GoodsServiceImpl implements GoodsService {
+"acg.nSalePrice, acg.nMinSaleQty, acg.nSaleUnits,acg.sUnit, acg.nMarketPrice, acg.sMarketUnit " +"acg.nSalePrice, acg.nMinSaleQty, acg.nSaleUnits,acg.sUnit, acg.nMarketPrice, acg.sMarketUnit "
+"ORDER BY sum(a.nSaleQty) DESC "; +"ORDER BY sum(a.nSaleQty) DESC ";
String OrgNO=(String) map.get("OrgNO"); String OrgNO=(String) map.get("OrgNO");
listMap=jdbcTemplate.queryForList(sql, OrgNO); return jdbcTemplate.queryForList(sql, OrgNO);
return listMap;
} }
......
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