Commit 9465e5a4 authored by Quxl's avatar Quxl

x

parent 651918c6
......@@ -12,7 +12,7 @@ import org.springframework.transaction.PlatformTransactionManager;
import com.alibaba.druid.pool.DruidDataSource;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.dialect.MySqlDialect;
import com.egolm.common.jdbc.dialect.SqlServerDialect;
@Configuration
public class DataSourceConfig {
......@@ -35,7 +35,7 @@ public class DataSourceConfig {
public JdbcTemplate getJdbcTemplate(DataSource dataSource) {
JdbcTemplate jdbcTemplate = new JdbcTemplate();
jdbcTemplate.setDataSource(dataSource);
jdbcTemplate.setDialect(new MySqlDialect());
jdbcTemplate.setDialect(new SqlServerDialect());
jdbcTemplate.setSql_level(3);
return jdbcTemplate;
}
......
......@@ -174,6 +174,7 @@ public class UserController {
@ApiOperation("小程序登陆")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "openId", dataType = "String", required = false, value = "OPENID", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "unionId", dataType = "String", required = false, value = "unionId", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "mobile", dataType = "String", required = false, value = "手机号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = false, value = "orgNo", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
......@@ -182,16 +183,17 @@ public class UserController {
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@RequestMapping(value = "/loginByOpenId",method=RequestMethod.POST)
public String loginByOpenId(String openId, String mobile, String orgNo, String langID, HttpServletRequest request, HttpServletResponse response) {
public String loginByOpenId(String openId, String mobile, String orgNo, String unionId, String langID, HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> customerMap = userService.queryCustomerByOpenId(openId);
if(customerMap == null) {
customerMap = userService.queryCustomerByMobile(mobile);
}
if(customerMap == null) {
if(StringUtil.isNotBlank(openId, mobile)) {
customerMap = userService.createCustomer(openId, mobile);
} else {
throw new XException("手机号码和OPENID不能为空");
}
customerMap = userService.createCustomer(openId, mobile);
}
String custNo = (String)customerMap.get("sCustNO");
List<Map<String, Object>> shopList = userService.queryShopList(custNo);
......
......@@ -474,8 +474,8 @@ public class UserServiceImpl implements UserService {
map.put("sMobile", mobile);
map.put("sCustNO", mobile);
map.put("sCustName", mobile);
map.put("sCustLevelType", "普通客户");
map.put("sCustLevelTypeID", "1");
map.put("sCustLeveType", "普通客户");
map.put("sCustLeveTypeID", "1");
map.put("nTag", 0);
map.put("sCreateUser", "");
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