Commit f57d2e18 authored by Quxl's avatar Quxl

x

parent 4e33cdad
...@@ -43,12 +43,24 @@ public class BrandServiceImpl implements BrandService { ...@@ -43,12 +43,24 @@ 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) {
String sql=" SELECT PinyinCode = b.sPinyinCode,BrandNO = acg.sBrandID, " String sql="SELECT "
+ "BrandName = b.sBrandName,ImgPath = b.sLogoUrl " + "PinyinCode = b.sPinyinCode,"
+ "FROM tAgentContractGoods acg, tBrand b " + "BrandNO = acg.sBrandID, "
+ "WHERE acg.sBrandID = b.sBrandID and acg.sOrgNO = ? " + "BrandName = b.sBrandName,"
+ "group by b.sPinyinCode, acg.sBrandID, b.sBrandName, b.sLogoUrl " + "ImgPath = b.sLogoUrl "
+ "ORDER BY b.sPinyinCode "; + "FROM "
+ "tAgentContractGoods acg, "
+ "tBrand b "
+ "WHERE "
+ "acg.sBrandID = b.sBrandID "
+ "and acg.sOrgNO = ? "
+ "group by "
+ "b.sPinyinCode, "
+ "acg.sBrandID, "
+ "b.sBrandName, "
+ "b.sLogoUrl "
+ "ORDER BY "
+ "b.sPinyinCode ";
String orgNO=(String) map.get("orgNO"); String orgNO=(String) map.get("orgNO");
jdbcTemplate.setDialect(new SqlServerDialect()); jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.queryForList(sql, orgNO); return jdbcTemplate.queryForList(sql, orgNO);
...@@ -64,10 +76,14 @@ public class BrandServiceImpl implements BrandService { ...@@ -64,10 +76,14 @@ public class BrandServiceImpl implements BrandService {
+ "FROM tAgentGoodsDailyOnline a " + "FROM tAgentGoodsDailyOnline a "
+ "JOIN tGoods g ON a.nGoodsID = g.nGoodsID " + "JOIN tGoods g ON a.nGoodsID = g.nGoodsID "
+ "JOIN tBrand b ON g.sBrandID = b.sBrandID " + "JOIN tBrand b ON g.sBrandID = b.sBrandID "
+ "JOIN tAgentContractGoods acg ON a.sAgentContractNO = acg.sAgentContractNO " + "JOIN tAgentContractGoods acg ON "
+ "and a.nGoodsID = acg.nGoodsID " + "a.sAgentContractNO = acg.sAgentContractNO and a.nGoodsID = acg.nGoodsID "
+ "WHERE acg.sOrgNO = ? " + "WHERE "
+ "GROUP BY b.sBrandID, b.sBrandName, b.sLogoUrl "; + "acg.sOrgNO = ? "
+ "GROUP BY "
+ "b.sBrandID, "
+ "b.sBrandName, "
+ "b.sLogoUrl ";
String orgNO=(String) map.get("orgNO"); String orgNO=(String) map.get("orgNO");
jdbcTemplate.setDialect(new SqlServerDialect()); jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.limit(sql, page,orgNO); return jdbcTemplate.limit(sql, page,orgNO);
......
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