Commit 7a4b79a3 authored by zhangyong's avatar zhangyong

1

parent 80514e88
......@@ -13,9 +13,9 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
private OpenInterceptor openInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
//注册自定义拦截器,添加拦截路径和排除拦截路径
/* //注册自定义拦截器,添加拦截路径和排除拦截路径
System.out.println("-addInterceptors------");
registry.addInterceptor(openInterceptor).excludePathPatterns("api/path/login");
super.addInterceptors(registry);
super.addInterceptors(registry);*/
}
}
......@@ -54,8 +54,14 @@ public class OpenInterceptor extends HandlerInterceptorAdapter {
parameters.put(key,value);
}
String md5Key = (String)redisTemplate.opsForValue().get(ShopContstrant.CLIENT_MD5KEY);
parameters.put("md5Key", md5Key);
Map<String,Object> map = (Map<String,Object>)redisTemplate.opsForHash().get(ShopContstrant.SystemCtl_Redis_Base_Key, ShopContstrant.CLIENT_MD5KEY);
System.out.println(map);
if(map != null) {
parameters.put("md5Key", map.get("sValue1")+"");
}else {
logger.info("从redis中获取 计算签名用的md5key 获取失败");
throw new XException(I18NUtils.getMessage(langID, "Msg_Sign_failure"));
}
logger.info("request sign >>>>>>"+sign);
String createSign = MD5Util.createSign(encoding, parameters);
......
......@@ -73,24 +73,11 @@ public class GoodsServiceImpl implements GoodsService {
@Override
public List<Map<String, Object>> getHotSaleGoods(Map<String, Object> map, Page page) {
String sql="SELECT "
+"GoodsID = a.nGoodsID, "
+"GoodsNO = g.sGoodsNO, "
+"GoodsName = g.sGoodsDesc, "
+"Price = acg.nSalePrice, "
+"MinQty = acg.nMinSaleQty, "
+"SaleUnit = acg.nSaleUnits, "
+"Unit = acg.sUnit, "
+"MarketPrice = acg.nMarketPrice, "
+"MarketUnit = acg.sMarketUnit, "
+"SaleQty = sum(a.nSaleQty) "
+"FROM tAgentGoodsDailyOnline a "
+"JOIN tGoods g ON a.nGoodsID = g.nGoodsID "
+"JOIN tAgentContractGoods acg ON a.sAgentContractNO = acg.sAgentContractNO "
+"and a.nGoodsID = acg.nGoodsID "
+"WHERE acg.sOrgNO = ? "
+"GROUP BY a.nGoodsID, g.sGoodsNO, g.sGoodsDesc, "
+"acg.nSalePrice, acg.nMinSaleQty, acg.nSaleUnits,acg.sUnit, acg.nMarketPrice, acg.sMarketUnit " ;
String sql="SELECT GoodsID = agd.nGoodsID,ContractNO = agd.sAgentContractNO ,SaleQty = sum(agd.nSaleQty), ImageUrl = isnull(g.sURL ,'') "
+ " FROM tAgentGoodsDailyOnline agd JOIN tAgentContractGoods acg ON agd.sAgentContractNO = acg.sAgentContractNO "
+ " LEFT JOIN tGoodsPic g ON agd.nGoodsID = g.nGoodsID AND g.sPicTypeID = '1' AND g.nItem = 1 AND g.nTag&1=0 "
+ " WHERE acg.nTag&1=0 AND acg.sOrgNO = ? "
+ " GROUP BY agd.nGoodsID,agd.sAgentContractNO,g.sURL ";
String OrgNO=(String) map.get("OrgNO");
jdbcTemplate.setDialect(new SqlServerDialect());
......
......@@ -11,6 +11,8 @@ public class ShopContstrant {
public static final String SMS_TEMPLATE_CODE = "SmsTemplate"; //模板字典 code tcommon表
public static final String SystemCtl_Redis_Base_Key = "SystemCtl"; //与job服务中缓存的Key一样 存放在 opsForHash中
public static final String CLIENT_MD5KEY ="Client_Md5Key"; //客户端计算签名的MD5 Key
}
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