Commit c3d467ab authored by Quxl's avatar Quxl

x

parent c15e7a44
...@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service; ...@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.egolm.common.HttpsUtil; import com.egolm.common.HttpsUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
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.common.jdbc.dialect.Dialect; import com.egolm.common.jdbc.dialect.Dialect;
...@@ -438,9 +439,19 @@ public class UserServiceImpl implements UserService { ...@@ -438,9 +439,19 @@ public class UserServiceImpl implements UserService {
jdbcTemplate.update("update tShop set sShopName = ?, sProvinceID = ?, sCityID = ?, sDistrictID = ?, sAddress = ?, sEmail = ?, sMemo = ? where nShopID = ?", shopName, provinceId, cityId, districtId, address, email, memo, shopId); jdbcTemplate.update("update tShop set sShopName = ?, sProvinceID = ?, sCityID = ?, sDistrictID = ?, sAddress = ?, sEmail = ?, sMemo = ? where nShopID = ?", shopName, provinceId, cityId, districtId, address, email, memo, shopId);
List<Map<String, Object>> addrList = jdbcTemplate.queryForList("select * from tCustAddress where sCustNO = ? and sShopNO = ? and nTag&5 = 4", custNo, shopNo); List<Map<String, Object>> addrList = jdbcTemplate.queryForList("select * from tCustAddress where sCustNO = ? and sShopNO = ? and nTag&5 = 4", custNo, shopNo);
String provinceName = jdbcTemplate.queryForString("select sRegionDesc from tRegion where sRegionNO = ?", provinceId);
String cityName = jdbcTemplate.queryForString("select sRegionDesc from tRegion where sRegionNO = ?", cityId); List<Map<String, Object>> addrNameList = jdbcTemplate.queryForList("select sRegionNO, sRegionDesc from tRegion where sRegionNO = ? or sRegionNO = ? or sRegionNO = ?", provinceId, cityId, districtId);
String districtName = jdbcTemplate.queryForString("select sRegionDesc from tRegion where sRegionNO = ?", districtId); Map<String, Map<String, Object>> addrmm = Util.listToMM(addrNameList, "sRegionNO");
Map<String, Object> pMap = addrmm.get(provinceId);
Map<String, Object> cMap = addrmm.get(cityId);
Map<String, Object> dMap = addrmm.get(districtId);
String provinceName = pMap == null ? null : (String)pMap.get("sRegionDesc");
String cityName = cMap == null ? null : (String)cMap.get("sRegionDesc");
String districtName = dMap == null ? null : (String)dMap.get("sRegionDesc");
provinceName = provinceName == null ? "" : provinceName;
cityName = cityName == null ? "" : cityName;
districtName = districtName == null ? "" : districtName;
if(addrList.size() == 0) { if(addrList.size() == 0) {
Map<String, Object> addrMap = new HashMap<String, Object>(); Map<String, Object> addrMap = new HashMap<String, Object>();
addrMap.put("sAddrID", String.valueOf(System.currentTimeMillis())); addrMap.put("sAddrID", String.valueOf(System.currentTimeMillis()));
......
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