Commit f57d2e18 authored by Quxl's avatar Quxl

x

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