Commit cc3c64f8 authored by Quxl's avatar Quxl

x

parent d4012e02
...@@ -16,6 +16,7 @@ import org.apache.commons.logging.Log; ...@@ -16,6 +16,7 @@ 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.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.support.GeneratedKeyHolder; import org.springframework.jdbc.support.GeneratedKeyHolder;
...@@ -606,6 +607,12 @@ public class UserServiceImpl implements UserService { ...@@ -606,6 +607,12 @@ public class UserServiceImpl implements UserService {
@Override @Override
public Map<String, Object> createCustomer(String openId, String mobile) { public Map<String, Object> createCustomer(String openId, String mobile) {
String sSalesmanNO1 = null;
try {
sSalesmanNO1 = jdbcTemplate.queryForString("SELECT SalesmanNO = sValue1 FROM tSystemCtrl WHERE sCode = 'DefSalesman'");
} catch (EmptyResultDataAccessException e) {
e.printStackTrace();
}
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
map.put("sOpenID", openId); map.put("sOpenID", openId);
map.put("sMobile", mobile); map.put("sMobile", mobile);
...@@ -614,6 +621,7 @@ public class UserServiceImpl implements UserService { ...@@ -614,6 +621,7 @@ public class UserServiceImpl implements UserService {
map.put("sPassword", ""); map.put("sPassword", "");
map.put("sCustLeveType", "普通客户"); map.put("sCustLeveType", "普通客户");
map.put("sCustLeveTypeID", "1"); map.put("sCustLeveTypeID", "1");
map.put("sSalesmanNO1", sSalesmanNO1);
map.put("nTag", 0); map.put("nTag", 0);
map.put("sCreateUser", ""); map.put("sCreateUser", "");
map.put("dCreateDate", new Date()); map.put("dCreateDate", new Date());
...@@ -633,6 +641,7 @@ public class UserServiceImpl implements UserService { ...@@ -633,6 +641,7 @@ public class UserServiceImpl implements UserService {
public Map<String, Object> createShop(String orgNo, Map<String, Object> customerMap) { public Map<String, Object> createShop(String orgNo, Map<String, Object> customerMap) {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String sCustNO = (String)customerMap.get("sCustNO"); String sCustNO = (String)customerMap.get("sCustNO");
String sSalesmanNO1 = (String)customerMap.get("sSalesmanNO1");
map.put("sCustNO", sCustNO); map.put("sCustNO", sCustNO);
map.put("sShopNO", ""); map.put("sShopNO", "");
map.put("sShopName", "无名小店"); map.put("sShopName", "无名小店");
...@@ -647,6 +656,7 @@ public class UserServiceImpl implements UserService { ...@@ -647,6 +656,7 @@ public class UserServiceImpl implements UserService {
map.put("sCity", ""); map.put("sCity", "");
map.put("sDistrictID", ""); map.put("sDistrictID", "");
map.put("sDistrict", ""); map.put("sDistrict", "");
map.put("sSalesmanNO1", sSalesmanNO1);
map.put("nTag", 0); map.put("nTag", 0);
map.put("sCreateUser", ""); map.put("sCreateUser", "");
map.put("dCreateDate", new Date()); map.put("dCreateDate", new Date());
......
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