Commit b487b17f authored by Quxl's avatar Quxl

x

parent 21bf32d3
...@@ -111,7 +111,7 @@ public class CartController { ...@@ -111,7 +111,7 @@ public class CartController {
@ApiOperation("修改数量(JSON格式)") @ApiOperation("修改数量(JSON格式)")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true), @ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\" }"), @ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\", \"price\": \"10.5\"}"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""), @ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "") @ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
}) })
......
package com.egolm.shop.service;
import java.util.Map;
public interface CartQueryService {
public Map<String, Object> query(String orgNo, String shopNo, String terminal) ;
}
package com.egolm.shop.service;
import java.util.Map;
public interface CartRedisService {
public void reCache(String orgNo, String shopNo, String terminal);
public void changeQty(String orgNo, String shopNo, String terminal, Integer nIdx, Double nSaleQty);
public Map<String, Object> querySync(String orgNo, String shopNo, String terminal) ;
}
...@@ -3,7 +3,6 @@ package com.egolm.shop.service; ...@@ -3,7 +3,6 @@ package com.egolm.shop.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
public interface GoodsService { public interface GoodsService {
...@@ -28,16 +27,6 @@ public interface GoodsService { ...@@ -28,16 +27,6 @@ public interface GoodsService {
* @throws * @throws
*/ */
public Map<String, List<Map<String, Object>>> goodsPicList(String goodsID,String agentContractNO ); public Map<String, List<Map<String, Object>>> goodsPicList(String goodsID,String agentContractNO );
/**
* 批量查询商品价格
* @Title: queryGoodsPrice
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param: @param params
* @param: @return
* @return: List<Map<String,Object>>
* @throws
*/
public String queryGoodsPrice(JSONObject jsonObj);
/** /**
* 收藏及取消收藏 * 收藏及取消收藏
* @Title: updateFlavor * @Title: updateFlavor
......
...@@ -10,13 +10,10 @@ import java.util.HashSet; ...@@ -10,13 +10,10 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.egolm.common.GsonUtil; import com.egolm.common.GsonUtil;
...@@ -27,8 +24,7 @@ import com.egolm.common.bean.Rjx; ...@@ -27,8 +24,7 @@ import com.egolm.common.bean.Rjx;
import com.egolm.common.exception.ReflectException; import com.egolm.common.exception.ReflectException;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.ResultMutil; import com.egolm.common.jdbc.ResultMutil;
import com.egolm.shop.config.XException; import com.egolm.shop.service.CartQueryService;
import com.egolm.shop.service.CartRedisService;
/** /**
* 购物车数据缓存服务 * 购物车数据缓存服务
...@@ -39,86 +35,14 @@ import com.egolm.shop.service.CartRedisService; ...@@ -39,86 +35,14 @@ import com.egolm.shop.service.CartRedisService;
* *
*/ */
@Service @Service
public class CartRedisServiceImpl implements CartRedisService { public class CartQueryServiceImpl implements CartQueryService {
private static final Log logger = LogFactory.getLog(CartRedisService.class);
private static boolean useCache = false;
@Autowired
private RedisTemplate<String, String> redisTemplate;
@Autowired
private JdbcTemplate jdbcTemplate;
@Async
public void changeQty(String orgNo, String shopNo, String terminal, Integer nIdx, Double nSaleQty) {
if (useCache) {
String json = (String) redisTemplate.opsForHash().get("CART_" + orgNo + "_" + shopNo, terminal);
if (json == null) {
this.querySync(orgNo, shopNo, terminal);
} else {
Rjx rjx = Rjx.json(GsonUtil.toMap(json));
Map<String, Object> shopGoodsObj = (Map) rjx.get("shopGoodsObj");
for (String key : shopGoodsObj.keySet()) {
Map<String, Object> obj = (Map) shopGoodsObj.get(key);
Integer nIdx_ = (Integer) obj.get("nIdx");
if (nIdx_.intValue() == nIdx.intValue()) {
obj.put("saleQty", nSaleQty);
this.processPayAmount(rjx);
this.cacheData(orgNo, shopNo, terminal, rjx);
}
}
}
}
}
public void clearCache(String orgNo, String shopNo) { private static final Log logger = LogFactory.getLog(CartQueryService.class);
redisTemplate.delete("CART_" + orgNo + "_" + shopNo);
}
@Async @Autowired
public void reCache(String orgNo, String shopNo, String terminal) { private JdbcTemplate jdbcTemplate;
if (useCache) {
redisTemplate.delete("CART_" + orgNo + "_" + shopNo);
this.querySync(orgNo, shopNo, terminal);
logger.info("刷新购物车缓存全量缓存:sShopNO=" + shopNo + ",sTerminalType=" + terminal);
}
}
@Async
public void queryAsync(String orgNo, String shopNo, String terminal) {
querySync(orgNo, shopNo, terminal);
}
public Map<String, Object> querySync(String orgNo, String shopNo, String terminal) {
Integer queryCount = 0;
System.out.println("useCache: " + useCache);
logger.info("useCache: " + useCache);
while (useCache) {
queryCount++;
String json = (String) this.redisTemplate.opsForHash().get("CART_" + orgNo + "_" + shopNo, terminal);
if (json == null) {
this.cacheTmpData(orgNo, shopNo, terminal);
break;
} else {
Map<String, Object> cache = GsonUtil.toMap(json);
Double nCacheStatus = (Double) cache.get("nCacheStatus");
if (nCacheStatus == null) {
this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.MINUTES);
logger.info("购物车查询缓存命中:sShopNO=" + shopNo + ",sTerminalType=" +terminal);
return GsonUtil.toMap(json);
} else if (nCacheStatus == 1D) {
if (queryCount >= 4) {
this.clearCache(orgNo, shopNo);
break;
} else {
try {
Thread.sleep(500L);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}
public Map<String, Object> query(String orgNo, String shopNo, String terminal) {
Rjx rjx = Rjx.json().set("IsValid", true); Rjx rjx = Rjx.json().set("IsValid", true);
if (!StringUtil.isNotUndefinedAndNull(shopNo, terminal)) { if (!StringUtil.isNotUndefinedAndNull(shopNo, terminal)) {
throw new ReflectException("Query the shopping cart parameter error:" throw new ReflectException("Query the shopping cart parameter error:"
...@@ -201,7 +125,6 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -201,7 +125,6 @@ public class CartRedisServiceImpl implements CartRedisService {
rjx.set("isOrnament", isOrnament); rjx.set("isOrnament", isOrnament);
rjx.set("isInvalid", isInvalid); rjx.set("isInvalid", isInvalid);
this.processPayAmount(rjx); this.processPayAmount(rjx);
this.cacheData(orgNo, shopNo, terminal, rjx);
return rjx; return rjx;
} }
...@@ -260,20 +183,6 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -260,20 +183,6 @@ public class CartRedisServiceImpl implements CartRedisService {
return freightAmountMap; return freightAmountMap;
} }
private void cacheTmpData(String orgNo, String shopNo, String terminal) {
this.redisTemplate.opsForHash().put("CART_" + orgNo + "_" + shopNo, terminal,
Rjx.json().set("nCacheStatus", 1).toJson());
this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.SECONDS);
}
private void cacheData(String orgNo, String shopNo, String terminal, Rjx rjx) {
if (useCache) {
this.redisTemplate.opsForHash().put("CART_" + orgNo + "_" + shopNo, terminal, rjx);
this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.MINUTES);
logger.info("购物车查询数据缓存已完成,缓存有效期5分钟:sShopNO=" + shopNo + ",sTerminalType=" + terminal);
}
}
private void processWmsPayAmount(String wmsNo, List<Map<String, Object>> wmsData, BigDecimal goodsAmount, private void processWmsPayAmount(String wmsNo, List<Map<String, Object>> wmsData, BigDecimal goodsAmount,
BigDecimal goodsPoint) { BigDecimal goodsPoint) {
if (goodsAmount == null) { if (goodsAmount == null) {
...@@ -1029,9 +938,13 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -1029,9 +938,13 @@ public class CartRedisServiceImpl implements CartRedisService {
for (Map<String, Object> map : datas) { for (Map<String, Object> map : datas) {
Integer nPartakeNum = Util.objTo(map.get("nPartakeNum"), Integer.class, 0); Integer nPartakeNum = Util.objTo(map.get("nPartakeNum"), Integer.class, 0);
BigDecimal nApSalePrice = (BigDecimal)map.get("nApSalePrice"); BigDecimal nApSalePrice = (BigDecimal)map.get("nApSalePrice");
BigDecimal nSetPrice = (BigDecimal)map.get("nSetPrice");
if(nApSalePrice != null) { if(nApSalePrice != null) {
map.put("nRealSalePrice", nApSalePrice); map.put("nRealSalePrice", nApSalePrice);
} }
if(nSetPrice != null && nSetPrice.compareTo(BigDecimal.ZERO) > 0) {
map.put("nRealSalePrice", nSetPrice);
}
String sPromoPaperNO = (String) map.get("sPromoPaperNO"); String sPromoPaperNO = (String) map.get("sPromoPaperNO");
if (StringUtil.isNotBlank(sPromoPaperNO) && nPartakeNum > 0) { if (StringUtil.isNotBlank(sPromoPaperNO) && nPartakeNum > 0) {
for (Map<String, Object> pm : pds) { for (Map<String, Object> pm : pds) {
...@@ -1048,6 +961,4 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -1048,6 +961,4 @@ public class CartRedisServiceImpl implements CartRedisService {
return datas; return datas;
} }
} }
package com.egolm.shop.service.impl; package com.egolm.shop.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -15,17 +14,16 @@ import com.egolm.common.StringUtil; ...@@ -15,17 +14,16 @@ import com.egolm.common.StringUtil;
import com.egolm.common.Util; import com.egolm.common.Util;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.shop.service.CartRedisService; import com.egolm.shop.service.CartQueryService;
import com.egolm.shop.service.CartService; import com.egolm.shop.service.CartService;
@Service @Service
public class CartServiceImpl implements CartService { public class CartServiceImpl implements CartService {
private static final Log logger = LogFactory.getLog(CartServiceImpl.class);
@Autowired @Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@Autowired @Autowired
private CartRedisService cartRedisService; private CartQueryService cartRedisService;
public String append(JSONObject obj,String terminal) { public String append(JSONObject obj,String terminal) {
String shopNO = obj.getString("shopNO"); String shopNO = obj.getString("shopNO");
...@@ -79,7 +77,6 @@ public class CartServiceImpl implements CartService { ...@@ -79,7 +77,6 @@ public class CartServiceImpl implements CartService {
} }
} }
} }
cartRedisService.reCache(orgNo, shopNO, terminal);
return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
...@@ -127,7 +124,6 @@ public class CartServiceImpl implements CartService { ...@@ -127,7 +124,6 @@ public class CartServiceImpl implements CartService {
jdbcTemplate.executeUpdate(sql); jdbcTemplate.executeUpdate(sql);
jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx)); jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx));
cartRedisService.reCache(orgNo, shopNO, terminal);
return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
...@@ -145,11 +141,10 @@ public class CartServiceImpl implements CartService { ...@@ -145,11 +141,10 @@ public class CartServiceImpl implements CartService {
String orgNo = obj.getString("orgNo"); String orgNo = obj.getString("orgNo");
String shopNO = obj.getString("shopNO"); String shopNO = obj.getString("shopNO");
Integer idx = obj.getInteger("idx"); Integer idx = obj.getInteger("idx");
Double saleQty = obj.getDouble("saleQty"); BigDecimal saleQty = obj.getBigDecimal("saleQty");
BigDecimal setPrice = obj.getBigDecimal("nSetPrice");
String langID = obj.getString("langID"); String langID = obj.getString("langID");
System.out.println(saleQty ); if(saleQty.compareTo(BigDecimal.ZERO) == 0) {
System.out.println(saleQty == 0 );
if(saleQty == 0) {
JSONObject removeObj = new JSONObject(); JSONObject removeObj = new JSONObject();
removeObj.put("shopNO", shopNO); removeObj.put("shopNO", shopNO);
removeObj.put("terminal", terminal); removeObj.put("terminal", terminal);
...@@ -160,9 +155,9 @@ public class CartServiceImpl implements CartService { ...@@ -160,9 +155,9 @@ public class CartServiceImpl implements CartService {
System.out.println(removeObj); System.out.println(removeObj);
this.remove(removeObj,terminal); this.remove(removeObj,terminal);
} else { } else {
jdbcTemplate.executeUpdate("update tCart set nSaleQty = " + saleQty + " where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "' and nIdx = " + idx); String sql = "update tCart set nSaleQty = ?, nSetPrice = ? where sOrgNO = ? and sShopNO = ? and nIdx = ?";
jdbcTemplate.executeUpdate(sql, saleQty, setPrice, orgNo, shopNO, idx);
} }
cartRedisService.changeQty(orgNo, shopNO, terminal, idx, saleQty);
return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
...@@ -179,7 +174,7 @@ public class CartServiceImpl implements CartService { ...@@ -179,7 +174,7 @@ public class CartServiceImpl implements CartService {
String orgNo = (String)params.get("orgNo"); String orgNo = (String)params.get("orgNo");
String shopNO = params.get("shopNO")+""; String shopNO = params.get("shopNO")+"";
String terminal = params.get("terminal")+""; String terminal = params.get("terminal")+"";
Map<String, Object> queryMap = cartRedisService.querySync(orgNo, shopNO, terminal); Map<String, Object> queryMap = cartRedisService.query(orgNo, shopNO, terminal);
Map<String, Object> countMap = this.count(orgNo, shopNO); Map<String, Object> countMap = this.count(orgNo, shopNO);
queryMap.putAll(countMap); queryMap.putAll(countMap);
return Rjx.jsonOk().setData(queryMap).toJson(); return Rjx.jsonOk().setData(queryMap).toJson();
......
...@@ -10,13 +10,10 @@ import java.util.Map; ...@@ -10,13 +10,10 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.egolm.common.DateUtil; import com.egolm.common.DateUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.Util; import com.egolm.common.Util;
...@@ -25,23 +22,14 @@ import com.egolm.common.jdbc.JdbcTemplate; ...@@ -25,23 +22,14 @@ import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.shop.config.XException; import com.egolm.shop.config.XException;
import com.egolm.shop.pojo.TCustomer;
import com.egolm.shop.pojo.TShop;
import com.egolm.shop.service.CommonService;
import com.egolm.shop.service.GoodsService; import com.egolm.shop.service.GoodsService;
import com.egolm.shop.service.UserService;
import com.egolm.shop.util.I18NUtils; import com.egolm.shop.util.I18NUtils;
@Service @Service
public class GoodsServiceImpl implements GoodsService { public class GoodsServiceImpl implements GoodsService {
private static final Log logger = LogFactory.getLog(GoodsServiceImpl.class);
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired @Autowired
private UserService userService; private JdbcTemplate jdbcTemplate;
@Autowired
private CommonService commonService;
/** /**
* 获取当前用户历史购买的商品同分类(三级)下的三个月内购买数量最多的商品Top 20, * 获取当前用户历史购买的商品同分类(三级)下的三个月内购买数量最多的商品Top 20,
* 未登录时获取当前区域三个月内购买数量最多的商品Top 20 * 未登录时获取当前区域三个月内购买数量最多的商品Top 20
...@@ -233,43 +221,6 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -233,43 +221,6 @@ public class GoodsServiceImpl implements GoodsService {
System.out.println((154&3)); System.out.println((154&3));
} }
/**
* 批量查询商品价格
* @Title: queryGoodsPrice
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param: @param params
* @param: @return
* @return: List<Map<String,Object>>
* @throws
*/
public String queryGoodsPrice(JSONObject jsonObj){
List goodsIDList= (List) jsonObj.get("goodsList");
String shopNO=(String)jsonObj.get("shopNO");
String custNO=(String)jsonObj.get("custNO");
String terminal=((String) jsonObj.get("terminal")).toLowerCase();
String goodsID="";
for(int i=0;i<goodsIDList.size();i++){
goodsID+=goodsIDList.get(i)+",";
}
System.out.println("custNO "+custNO);
System.out.println("shopNO "+shopNO);
System.out.println("goodsID "+goodsID);
System.out.println("goodsIDList "+goodsIDList);
TCustomer customer = userService.getCustomer(custNO, shopNO);
if(customer == null) {
return Rjx.jsonErr().setMessage("用户不存在").toJson();
}
TShop shop = customer.gettShops().get(0);
String districtID = shop.getsDistrictID();
String priceSql = GoodsSql.goodsPriceSql(goodsID, districtID, shopNO);
jdbcTemplate.setDialect(new SqlServerDialect());
List<Map<String,Object>> priceList = jdbcTemplate.queryForList(priceSql);
return Rjx.jsonOk().setData(priceList).toJson();
}
/** /**
* 收藏及取消收藏 * 收藏及取消收藏
* @Title: updateFlavor * @Title: updateFlavor
...@@ -310,12 +261,6 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -310,12 +261,6 @@ public class GoodsServiceImpl implements GoodsService {
return Rjx.jsonErr().setCode(-1).setMessage(I18NUtils.getMessage(langID, "Msg_Operate_failure")).toJson(); return Rjx.jsonErr().setCode(-1).setMessage(I18NUtils.getMessage(langID, "Msg_Operate_failure")).toJson();
} }
private void insertSearchLog(String key, String typeID, String ShopNO){
String sql = "insert into tShopSearchLog (sShopNO, sKeyword, sOriginalKeyWord, sTypeID, dLastUpdateTime) values (?, ?, ?, ?, ?)";
jdbcTemplate.update(sql, new Object[]{ShopNO, key, key, typeID, new Date()});
}
@Override @Override
public Map<String, Map<String, Object>> queryStockPrice(String orgNo, String shopNo, String[] uidAry) { public Map<String, Map<String, Object>> queryStockPrice(String orgNo, String shopNo, String[] uidAry) {
List<String> args = new ArrayList<String>(); List<String> args = new ArrayList<String>();
...@@ -333,7 +278,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -333,7 +278,7 @@ public class GoodsServiceImpl implements GoodsService {
} catch (Exception e) { } catch (Exception e) {
//shopNo为空,没有登陆 //shopNo为空,没有登陆
} }
String sql = "select t.sAgentContractNO, t.nGoodsID, t.nStockQty, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args); String sql = "select t.sAgentContractNO, t.nGoodsID, t.nStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args);
List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql); List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql);
Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID"); Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID");
......
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