Commit 89cd022b authored by 张永's avatar 张永

select 走读库

parent fecc57b5
......@@ -6,6 +6,7 @@ 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.Qualifier;
import org.springframework.stereotype.Service;
import com.aliyuncs.utils.StringUtils;
......@@ -21,6 +22,11 @@ public class ActivityServiceImpl implements ActivityService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("readonly")
private JdbcTemplate readJdbcTemplate;
/**
* 众筹项目列表
* <p>Title: </p>
......@@ -31,11 +37,11 @@ public class ActivityServiceImpl implements ActivityService {
*/
public List<Map<String, Object>> crowdFundingsProjectList(Map<String, Object> params, Page page) {
String orgNo = params.get("orgNO")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String sql = projectSql(orgNo, "");
List<Map<String,Object>> list = jdbcTemplate.limit(sql, page);
List<Map<String,Object>> list = readJdbcTemplate.limit(sql, page);
// if(list != null && list.size()>0) {
// for(Map<String,Object> map:list) {
// String projectId = map.get("ProjectID")+"";
......@@ -62,10 +68,10 @@ public class ActivityServiceImpl implements ActivityService {
public Map<String, Object> crowdFundingsProjectDetail(Map<String, Object> params) {
String projectId = params.get("projectId")+"";
String orgNo = params.get("orgNo")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String projectSql = projectSql(orgNo, projectId);
Map<String,Object> projectMap = jdbcTemplate.queryForMap(projectSql);
Map<String,Object> projectMap = readJdbcTemplate.queryForMap(projectSql);
String sql = "SELECT PlanID = a.nPlanID,ProjectID = a.nProjectID,PlanName = a.sPlanName, PlanSummary = a.sPlanSummary,PlanUrl = a.sUrl,AgentContractNO = a.sAgentContractNO, "
+ " GoodsID = a.nGoodsID, GoodsNO = acg.sGoodsNO,GoodsDesc = acg.sGoodsDesc,PlanStock = a.nPlanStock, PlanPrice = a.nPrice,LimitQty = a.nLimitQty, "
+ " PlanReturnDays = (select datediff(dd, dEndDate, dReturnDate) from tZHCProject p where p.nProjectID = a.nProjectID), LastUpdateTime = a.dLastUpdateTime ,SaleCount = 0 "
......@@ -73,9 +79,9 @@ public class ActivityServiceImpl implements ActivityService {
+ " WHERE a.nProjectID = ? ";
String sql0 = "select so.nPlanID, sum(so.nTotalSaleQty) nSaleQty from tSalesOrder so, tZHCPlan p where so.sB2BOrderTypeID = '3' and so.nPlanID = p.nPlanID and p.nProjectID = " + projectId + " group by so.nPlanID";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql0);
List<Map<String, Object>> list = readJdbcTemplate.queryForList(sql0);
Map<String, Map<String, Object>> mm = Util.listToMM(list, "nPlanID");
List<Map<String,Object>> goodsList = jdbcTemplate.queryForList(sql,projectId);
List<Map<String,Object>> goodsList = readJdbcTemplate.queryForList(sql,projectId);
for(Map<String, Object> map : goodsList) {
Object PlanID = map.get("PlanID");
Map<String, Object> mmm = mm.get("" + PlanID);
......
......@@ -9,6 +9,7 @@ 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.Qualifier;
import org.springframework.stereotype.Service;
import com.egolm.common.bean.Rjx;
......@@ -27,6 +28,12 @@ public class BrandServiceImpl implements BrandService {
private static final Log logger = LogFactory.getLog(BrandServiceImpl.class);
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("readonly")
private JdbcTemplate readJdbcTemplate;
@Autowired
private UserService userService;
/*
......@@ -46,8 +53,8 @@ public class BrandServiceImpl implements BrandService {
}else {
sql +=" AND sOrgList like '%"+orgNO+"%' ";
}
jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.limit(sql, page);
readJdbcTemplate.setDialect(new SqlServerDialect());
return readJdbcTemplate.limit(sql, page);
}
@Override
......@@ -69,8 +76,8 @@ public class BrandServiceImpl implements BrandService {
+ "b.sBrandName, "
+ "b.sLogoUrl ";
String orgNo=(String) map.get("orgNo");
jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.limit(sql, page,orgNo);
readJdbcTemplate.setDialect(new SqlServerDialect());
return readJdbcTemplate.limit(sql, page,orgNo);
}
@Override
......@@ -98,7 +105,7 @@ public class BrandServiceImpl implements BrandService {
+ "ORDER BY "
+ "b.nSort desc, "
+ "b.sPinyinCode ";
return jdbcTemplate.queryForList(sql, orgNo);
return readJdbcTemplate.queryForList(sql, orgNo);
}
......
......@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONArray;
......@@ -23,6 +24,12 @@ public class CartServiceImpl implements CartService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("readonly")
private JdbcTemplate readJdbcTemplate;
@Autowired
private CartQueryService cartRedisService;
......@@ -117,7 +124,7 @@ public class CartServiceImpl implements CartService {
* @throws
*/
public Map<String, Object> count(String orgNo, String shopNO) {
return jdbcTemplate.queryForMap("select count(nSaleQty) totalCount , isnull(sum(nSaleQty), 0) totalSaleQty from V_Cart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'");
return readJdbcTemplate.queryForMap("select count(nSaleQty) totalCount , isnull(sum(nSaleQty), 0) totalSaleQty from V_Cart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'");
}
......
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.egolm.common.jdbc.JdbcTemplate;
......@@ -15,18 +16,22 @@ public class CategoryServiceImpl implements CategoryService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("readonly")
private JdbcTemplate readJdbcTemplate;
public List<Map<String, Object>> queryCategoryByLevel(String orgNO, String scopeTypeID, Integer level) {
if(level == null) {
level = jdbcTemplate.queryForInt("select GoodsCategoryLevel = isnull((select Convert(int,sValue1) from tSystemCtrl where sCode = 'GoodsCategoryLevel'),0)");
level = readJdbcTemplate.queryForInt("select GoodsCategoryLevel = isnull((select Convert(int,sValue1) from tSystemCtrl where sCode = 'GoodsCategoryLevel'),0)");
}
String three="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and nCategoryLevel = ? and nTag&1 = 0 order by nSort desc";
List<Map<String,Object>> list3=jdbcTemplate.queryForList(three, orgNO, level);
List<Map<String,Object>> list3=readJdbcTemplate.queryForList(three, orgNO, level);
return list3;
}
public List<Map<String, Object>> queryCategory(String orgNO, String scopeTypeID, String upCategoryNo) {
String three="select sCategoryNO, sCategoryDesc, sUpCategoryNO from tOrgCategory where sOrgNO = ? and sUpCategoryNO = ? and nTag&1 = 0 order by nSort desc";
List<Map<String,Object>> list3=jdbcTemplate.queryForList(three, orgNO, upCategoryNo);
List<Map<String,Object>> list3=readJdbcTemplate.queryForList(three, orgNO, upCategoryNo);
return list3;
}
......
......@@ -178,7 +178,7 @@ public class GoodsServiceImpl implements GoodsService {
" and a.nAgentID = ? " +
" and a.nGoodsID = ?";
int mCount = jdbcTemplate.queryForInt(mSql,agentID,goodsId);
int mCount = readJdbcTemplate.queryForInt(mSql,agentID,goodsId);
if(mCount >0 ) {
IsGoodsUnit = 1;
}
......@@ -192,10 +192,10 @@ public class GoodsServiceImpl implements GoodsService {
try {
if(isCheckAgentID) {
gSql += " and t.nAgentID = ? ";
detail = jdbcTemplate.queryForMap(gSql, custTypeId, orgNo, contractNo, goodsId,agentID);
detail = readJdbcTemplate.queryForMap(gSql, custTypeId, orgNo, contractNo, goodsId,agentID);
}else {
detail = jdbcTemplate.queryForMap(gSql, custTypeId, orgNo, contractNo, goodsId);
detail = readJdbcTemplate.queryForMap(gSql, custTypeId, orgNo, contractNo, goodsId);
}
BigDecimal nApSalePrice = (BigDecimal) detail.get("nApSalePrice");
......@@ -210,9 +210,9 @@ public class GoodsServiceImpl implements GoodsService {
List<Map<String, Object>> specList = new ArrayList<Map<String,Object>>();
if(isCheckAgentID) {
sql += " and og.nAgentID = ? ";
specList = jdbcTemplate.queryForList(sql, orgNo, contractNo, custTypeId, goodsId,agentID);
specList = readJdbcTemplate.queryForList(sql, orgNo, contractNo, custTypeId, goodsId,agentID);
}else {
specList = jdbcTemplate.queryForList(sql, orgNo, contractNo, custTypeId, goodsId);
specList = readJdbcTemplate.queryForList(sql, orgNo, contractNo, custTypeId, goodsId);
}
......@@ -264,7 +264,7 @@ public class GoodsServiceImpl implements GoodsService {
}else {
args = new Object[] {custTypeId, orgNo, contractNo, goodsId};
}
List<Map<String, Object>> promoList = jdbcTemplate.queryForList(promoSql, args);
List<Map<String, Object>> promoList = readJdbcTemplate.queryForList(promoSql, args);
detail.put("promoList", promoList);
......@@ -292,7 +292,7 @@ public class GoodsServiceImpl implements GoodsService {
" and t.nAgentID = ? " +
" order by nConvertRate";
List<Map<String,Object>> goodsUnitList = jdbcTemplate.queryForList(GoodsUnitSql,orgNo,contractNo,goodsId,agentID,orgNo,contractNo,goodsId,agentID);
List<Map<String,Object>> goodsUnitList = readJdbcTemplate.queryForList(GoodsUnitSql,orgNo,contractNo,goodsId,agentID,orgNo,contractNo,goodsId,agentID);
rjx.set("goodsUnitList", goodsUnitList);
}else {
rjx.set("goodsUnitList", null);
......@@ -334,7 +334,7 @@ public class GoodsServiceImpl implements GoodsService {
" and a.nGoodsID = ? " +
"order by sPicTypeID, nIdx " +
" ";
List<Map<String, Object>> picList1 = jdbcTemplate.queryForList(sql1, agentContractNO, goodsID, agentContractNO, goodsID);
List<Map<String, Object>> picList1 = readJdbcTemplate.queryForList(sql1, agentContractNO, goodsID, agentContractNO, goodsID);
Map<String, List<Map<String,Object>>> picML1 = Util.listToML(picList1, "sPicTypeID");
Map<String, List<Map<String, Object>>> pics = new HashMap<String, List<Map<String, Object>>>();
for(String sPicTypeID : new String[] {"1", "2", "3", "4","5"}) {
......
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.egolm.common.StringUtil;
......@@ -17,6 +18,11 @@ public class PageServiceImpl implements PageService {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("readonly")
private JdbcTemplate readJdbcTemplate;
/**
* 查询首页配置
* <p>Title: query</p>
......@@ -29,8 +35,8 @@ public class PageServiceImpl implements PageService {
public List<Map<String, Object>> query(Map<String, Object> params) {
String sql = "SELECT sPlatformNO platformNO,sPlatformName platformName,sLogoPath1 logoPath1 ,sLogoPath2 logoPath2,sLogoPath3 logoPath3,sThemeNO themeNO,sThemeJson themeJson,sMemo memo,dLastUpdateTime lastUpdateTime "
+ " FROM tPlatformLayout " + "WHERE nTag &1=0 ORDER BY dLastUpdateTime DESC ";
jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.queryForList(sql);
readJdbcTemplate.setDialect(new SqlServerDialect());
return readJdbcTemplate.queryForList(sql);
}
/**
......@@ -45,11 +51,11 @@ public class PageServiceImpl implements PageService {
@Override
public List<Map<String, Object>> queryIcon(Map<String, Object> params, Page page) {
String iconGroupNO = params.get("iconGroupNO")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String sql = " SELECT IconNO = i.sIconNO ,IconPath=i.sIconPath,DefaultTxt=i.sDefaultTxt,DefaultLinkType=i.sDefaultLinkType,DefaultLink=i.sDefaultLink "
+ " FROM tIcon i ,tIconGroup ig"
+ " WHERE i.sGroupNO = ig.sGroupNO AND ig.nTag&1=0 and ig.sGroupNO = ? ";
return jdbcTemplate.limit(sql, page, iconGroupNO);
return readJdbcTemplate.limit(sql, page, iconGroupNO);
}
/**
......@@ -67,7 +73,7 @@ public class PageServiceImpl implements PageService {
String adTypeID = params.get("adTypeID")+"";
String custNo = params.get("custNo")+"";
String AgentID = params.get("AgentID")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String sql = "SELECT BannerAdNO = b.sBannerAdNO, BannerAdTitle = b.sBannerAdTitle,OrgNO = b.sOrgNO,AdPostionTypeID = b.sAdPositionTypeID,AdPostionType = b.sAdPositionType,"
+ " LayoutTypeID = b.sLayoutTypeID,LayoutType = b.sLayoutType,JumpTypeID = b.sJumpTypeID,JumpType = b.sJumpType,JumpList = b.sJumpList,Idx = b.nIdx,ImagePath = b.sImagePath,"
......@@ -75,7 +81,7 @@ public class PageServiceImpl implements PageService {
+ " from tBannerAd b "
+ " WHERE b.sOrgNO = ? AND sAdPositionTypeID = ? AND b.dStartTime <=getdate() AND b.dEndTime >= getdate() AND b.nTag&2 = 2 and b.nAgentID = ? ";
return jdbcTemplate.limit(sql, page, orgNO, adTypeID,AgentID);
return readJdbcTemplate.limit(sql, page, orgNO, adTypeID,AgentID);
}
......@@ -93,16 +99,16 @@ public class PageServiceImpl implements PageService {
String orgNO = params.get("orgNO")+"";
String msgTypeID = params.get("msgTypeID")+"";
String agentID = params.get("agentID")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String sql = "SELECT BillBoardID = b.nBillboardID, MsgTypeID = b.sMsgTypeID,MsgType = b.sMsgType,Title = b.sTitle,Content = b.sText,Sort = b.nSort,TradeDate = b.dTradeDate"
+ " FROM tBillboard b "
+ " WHERE b.nTag&2=2 AND b.sMsgTypeID = ? and b.sOrgNO = ? ";
if(StringUtil.isNotBlank(agentID)) {
sql += " and b.nAgentID = ? ";
return jdbcTemplate.limit(sql, page, msgTypeID, orgNO,agentID);
return readJdbcTemplate.limit(sql, page, msgTypeID, orgNO,agentID);
}else {
return jdbcTemplate.limit(sql, page, msgTypeID, orgNO);
return readJdbcTemplate.limit(sql, page, msgTypeID, orgNO);
}
}
......@@ -118,18 +124,18 @@ public class PageServiceImpl implements PageService {
*/
public List<Map<String, Object>> queryFinanceProd(Map<String, Object> params, Page page) {
String orgNO = params.get("orgNO")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
readJdbcTemplate.setDialect(new SqlServerDialect());
String sql = "select FinanceID = a.nFinanceID, OrgNO = a.sOrgNO, FinanceName = a.sFinanceName,AgentContractNO = a.sAgentContractNO,BannerUrl = a.sBannerUrl,LogoUrl = a.sLogoUrl,"
+ " AddressUrl = a.sAddressUrl, Introduce = a.sMemo, LastUpdateTime = a.dLastUpdateTime "
+ " from tFinanceProd a where a.nTag&2 = 2 and a.sOrgNO = ? ";
List<Map<String,Object>> list = jdbcTemplate.limit(sql, page, orgNO);
List<Map<String,Object>> list = readJdbcTemplate.limit(sql, page, orgNO);
if(list != null && list.size() >0) {
for(Map<String,Object> map:list) {
String FinanceID = map.get("FinanceID")+"";
String picSql = "select FinanceID = nFinanceID,Item = nItem, PicDesc = sPicDesc,URL = sURL from tFinanceProdPic where nFinanceID = ?";
List<Map<String,Object>> picList = jdbcTemplate.queryForList(picSql,FinanceID);
List<Map<String,Object>> picList = readJdbcTemplate.queryForList(picSql,FinanceID);
map.put("picList", picList);
}
}
......
......@@ -85,16 +85,16 @@ public class UserServiceImpl implements UserService {
}
try {
String sql = "SELECT * FROM tCustomer WHERE sCustNO = ? AND nTag&1=0";
jdbcTemplate.setDialect(new SqlServerDialect());
TCustomer tcustomer = jdbcTemplate.queryForBean(sql, TCustomer.class, custNO);
readJdbcTemplate.setDialect(new SqlServerDialect());
TCustomer tcustomer = readJdbcTemplate.queryForBean(sql, TCustomer.class, custNO);
List<TShop> shops = null;
String shopSql = "SELECT * FROM tShop WHERE nTag&1=0 and sCustNO =? ";
if(StringUtil.isNotEmpty(shopNO)) {
shopSql += " AND sShopNO = ? ";
shops = jdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim(),shopNO.trim());
shops = readJdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim(),shopNO.trim());
}else {
shops = jdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim());
shops = readJdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim());
}
tcustomer.settShops(shops);
......@@ -118,7 +118,7 @@ public class UserServiceImpl implements UserService {
public boolean checkShopExists(String custNO,String shopNO) {
try {
String sql = "SELECT count(1) FROM tShop WHERE sCustNO = ? AND sShopNO = ? AND nTag&1=0";
int i = jdbcTemplate.queryForInt(sql,custNO,shopNO);
int i = readJdbcTemplate.queryForInt(sql,custNO,shopNO);
if(i >0) {
return true;
}
......@@ -132,7 +132,7 @@ public class UserServiceImpl implements UserService {
public TCustomer getCustomer(String mobile) {
try {
String sql = "SELECT * FROM tCustomer WHERE sMobile = ? AND nTag&1=0";
return jdbcTemplate.queryForBean(sql, TCustomer.class, mobile);
return readJdbcTemplate.queryForBean(sql, TCustomer.class, mobile);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -144,8 +144,8 @@ public class UserServiceImpl implements UserService {
return new TShop();
}
String sql = "SELECT * FROM tShop WHERE sShopNO = ? AND nTag&1=0";
jdbcTemplate.setDialect(new SqlServerDialect());
return jdbcTemplate.queryForBean(sql, TShop.class, shopNO);
readJdbcTemplate.setDialect(new SqlServerDialect());
return readJdbcTemplate.queryForBean(sql, TShop.class, shopNO);
}
/**
......@@ -660,7 +660,7 @@ public class UserServiceImpl implements UserService {
@Override
public Map<String, Object> queryCustomerByOpenId(String openId) {
String sql = "select c.*, m.sMobile sSalesmanMobile from tCustomer c left join tSalesman m on m.sSalesmanNO = c.sSalesmanNO1, tB2BUser u where c.sCustNO = u.sCustNO and u.sOpenID = ? and c.nTag&1 = 0 and u.nTag&1 = 0";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, openId);
List<Map<String, Object>> list = readJdbcTemplate.queryForList(sql, openId);
if(list.size() > 1) {
throw new XException("OpenID绑定异常");
}
......@@ -669,7 +669,7 @@ public class UserServiceImpl implements UserService {
@Override
public Map<String, Object> queryCustomerByMobile(String mobile) {
List<Map<String, Object>> list = jdbcTemplate.queryForList("select * from tCustomer where sMobile = ? or sCustNO = ? and nTag&1 = 0", mobile, mobile);
List<Map<String, Object>> list = readJdbcTemplate.queryForList("select * from tCustomer where sMobile = ? or sCustNO = ? and nTag&1 = 0", mobile, mobile);
return list.size() == 0 ? null : list.get(0);
}
......@@ -677,7 +677,7 @@ public class UserServiceImpl implements UserService {
public Map<String, Object> createCustomer(String orgNo, String openId, String mobile) {
String sSalesmanNO1 = null;
try {
sSalesmanNO1 = jdbcTemplate.queryForString("select sSalesmanNO from tOrg where sOrgNO = ?", orgNo);
sSalesmanNO1 = readJdbcTemplate.queryForString("select sSalesmanNO from tOrg where sOrgNO = ?", orgNo);
} catch (EmptyResultDataAccessException e) {
e.printStackTrace();
}
......@@ -707,7 +707,7 @@ public class UserServiceImpl implements UserService {
@Override
public List<Map<String, Object>> queryShopList(String orgNo, String custNo) {
List<Map<String, Object>> shopList = jdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.sOrgNO = ? and s.nTag&1 = 0", custNo, orgNo);
List<Map<String, Object>> shopList = readJdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.sOrgNO = ? and s.nTag&1 = 0", custNo, orgNo);
return shopList;
}
......@@ -763,7 +763,7 @@ public class UserServiceImpl implements UserService {
}, keyHolder);
Object key = keyHolder.getKey();
jdbcTemplate.update("update tShop set sShopNO = RIGHT('00000000'+ CAST(nShopID as varchar(8)), 8) where nShopID = ?", key);
String sShopNO = jdbcTemplate.queryForString("select sShopNO from tShop where nShopID = ?", key);
String sShopNO = readJdbcTemplate.queryForString("select sShopNO from tShop where nShopID = ?", key);
map.put("sShopNO", sShopNO);
return map;
}
......@@ -838,13 +838,13 @@ public class UserServiceImpl implements UserService {
+ "left join tOrg o on o.sOrgNO = s.sOrgNO "
+ "where "
+ "sm.sSalesmanNO = s.sSalesmanNO1 and s.sShopNO = ?";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, shopNo);
List<Map<String, Object>> list = readJdbcTemplate.queryForList(sql, shopNo);
return list != null && list.size() > 0 ? list.get(0) : null;
}
@Override
public Map<String, Object> getCustomerByNO(String custNo) {
return jdbcTemplate.queryForMap("select * from tCustomer where sCustNO = ?", custNo);
return readJdbcTemplate.queryForMap("select * from tCustomer where sCustNO = ?", custNo);
}
@Override
......@@ -857,7 +857,7 @@ public class UserServiceImpl implements UserService {
@Override
public List<Map<String, Object>> queryBankList(String sCustNO) {
String sql = "SELECT * FROM tCustBank where sCustNO = ? and nTag&1 = 0 order by dLastUpdateTime desc";
return jdbcTemplate.queryForList(sql, sCustNO);
return readJdbcTemplate.queryForList(sql, sCustNO);
}
@Override
......
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