Commit b517aa1a authored by Quxl's avatar Quxl

x

parent f6da9878
...@@ -203,8 +203,10 @@ public class UserController { ...@@ -203,8 +203,10 @@ public class UserController {
XException.assertNotBlank(openId, "OpenID不能为空"); XException.assertNotBlank(openId, "OpenID不能为空");
mobile = StringUtil.isBlank(mobile) ? "" : mobile; mobile = StringUtil.isBlank(mobile) ? "" : mobile;
name = StringUtil.isBlank(name) ? "" : name; name = StringUtil.isBlank(name) ? "" : name;
userService.loginByOpenId(orgNo, openId, mobile, name); Map<String, Object> map = userService.loginByOpenId(orgNo, openId, mobile, name);
return this.queryUserInfoByOpenId(orgNo, openId, langID, request, response); Rjx rjx = Rjx.jsonOk();
rjx.putAll(map);
return rjx.toJson();
} }
@ApiOperation("修改认证信息") @ApiOperation("修改认证信息")
......
...@@ -49,6 +49,6 @@ public interface UserService { ...@@ -49,6 +49,6 @@ public interface UserService {
public List<Map<String, Object>> queryBankList(String sCustNO); public List<Map<String, Object>> queryBankList(String sCustNO);
public void loginByOpenId(String orgNo, String openId, String mobile, String name); public Map<String, Object> loginByOpenId(String orgNo, String openId, String mobile, String name);
} }
...@@ -55,7 +55,7 @@ public class CartServiceImpl implements CartService { ...@@ -55,7 +55,7 @@ public class CartServiceImpl implements CartService {
List<String> strs = new ArrayList<String>(); List<String> strs = new ArrayList<String>();
strs.add("sOrgNO = '" + orgNo + "'"); strs.add("sOrgNO = '" + orgNo + "'");
strs.add("sShopNO = '" + shopNO + "'"); strs.add("sShopNO = '" + shopNO + "'");
strs.add("nTag = " + nGoodsTypeID); strs.add("nTag = " + nGoodsTypeID);
strs.add("sAgentContractNO = '" + sAgentContractNO + "'"); strs.add("sAgentContractNO = '" + sAgentContractNO + "'");
strs.add("nGoodsID = " + nGoodsID); strs.add("nGoodsID = " + nGoodsID);
if(StringUtil.isNotBlank(sPromoPaperNO)) { if(StringUtil.isNotBlank(sPromoPaperNO)) {
......
...@@ -809,7 +809,7 @@ public class UserServiceImpl implements UserService { ...@@ -809,7 +809,7 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
public void loginByOpenId(String orgNo, String openId, String mobile, String name) { public Map<String, Object> loginByOpenId(String orgNo, String openId, String mobile, String name) {
String sql = "exec up_B2BUserRegisterLogin ?, ?, ?, ?"; String sql = "exec up_B2BUserRegisterLogin ?, ?, ?, ?";
ResultMutil result = jdbcTemplate.executeMutil(sql, orgNo, openId, mobile, name); ResultMutil result = jdbcTemplate.executeMutil(sql, orgNo, openId, mobile, name);
List<List<Map<String, Object>>> datas = result.getDatas(); List<List<Map<String, Object>>> datas = result.getDatas();
...@@ -817,20 +817,29 @@ public class UserServiceImpl implements UserService { ...@@ -817,20 +817,29 @@ public class UserServiceImpl implements UserService {
Map<String, Object> sMap = sList.get(0); Map<String, Object> sMap = sList.get(0);
Object Status = sMap.get("Status"); Object Status = sMap.get("Status");
Object ErrorMsg = sMap.get("ErrorMsg"); Object ErrorMsg = sMap.get("ErrorMsg");
Map<String, Object> map = new HashMap<String, Object>();
if(Status != null) { if(Status != null) {
Integer code = ((Number)Status).intValue(); Integer code = ((Number)Status).intValue();
if(code != 0) { if(code != 0) {
throwLoginError(ErrorMsg); throw throwLoginError(ErrorMsg);
} else {
map.put("userinfo", sMap);
map.put("customer", datas.get(1).get(0));
map.put("bankList", datas.get(2));
map.put("shopList", datas.get(3));
return map;
} }
} else { } else {
throwLoginError(ErrorMsg); throw throwLoginError(ErrorMsg);
} }
} }
private void throwLoginError(Object errorMsg) { private XException throwLoginError(Object errorMsg) {
if(StringUtil.isBlank(errorMsg)) { if(StringUtil.isBlank(errorMsg)) {
errorMsg = "登陆失败"; errorMsg = "登陆失败";
} }
throw new XException((String)errorMsg); return new XException((String)errorMsg);
} }
} }
\ No newline at end of file
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