Commit b517aa1a authored by Quxl's avatar Quxl

x

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