Commit 22f847e1 authored by Quxl's avatar Quxl

x

parent b02e2b02
...@@ -213,14 +213,14 @@ public class UserController { ...@@ -213,14 +213,14 @@ public class UserController {
userService.saveOpenId((String)customerMap.get("sCustNO"), openId); userService.saveOpenId((String)customerMap.get("sCustNO"), openId);
} }
String custNo = (String)customerMap.get("sCustNO"); String custNo = (String)customerMap.get("sCustNO");
List<Map<String, Object>> shopList = userService.queryShopList(custNo); List<Map<String, Object>> shopList = userService.queryShopList(orgNo, custNo);
if(shopList.size() == 0) { if(shopList.size() == 0) {
shopList = new ArrayList<Map<String, Object>>(); shopList = new ArrayList<Map<String, Object>>();
Map<String, Object> shopMap = userService.createShop(orgNo, customerMap); Map<String, Object> shopMap = userService.createShop(orgNo, customerMap);
shopList.add(shopMap); shopList.add(shopMap);
} }
customerMap.put("sShopNO", shopList.get(0).get("sShopNO")); customerMap.put("sShopNO", shopList.get(0).get("sShopNO"));
return this.queryUserInfoByOpenId(openId, langID, request, response); return this.queryUserInfoByOpenId(orgNo, openId, langID, request, response);
} }
@ApiOperation("修改认证信息") @ApiOperation("修改认证信息")
...@@ -317,14 +317,14 @@ public class UserController { ...@@ -317,14 +317,14 @@ public class UserController {
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "") @ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
}) })
@RequestMapping(value = "/queryUserInfoByOpenId",method=RequestMethod.GET) @RequestMapping(value = "/queryUserInfoByOpenId",method=RequestMethod.GET)
public String queryUserInfoByOpenId(String openId, String langID, HttpServletRequest request, HttpServletResponse response) { public String queryUserInfoByOpenId(String orgNo, String openId, String langID, HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> customerMap = userService.queryCustomerByOpenId(openId); Map<String, Object> customerMap = userService.queryCustomerByOpenId(openId);
if(customerMap == null) { if(customerMap == null) {
return Rjx.jsonErr().setCode(201).setMessage(I18NUtils.getMessage(langID, "Msg_OpenID_notExist")).toJson(); return Rjx.jsonErr().setCode(201).setMessage(I18NUtils.getMessage(langID, "Msg_OpenID_notExist")).toJson();
} }
String sCustNO = (String)customerMap.get("sCustNO"); String sCustNO = (String)customerMap.get("sCustNO");
List<Map<String, Object>> bankList = userService.queryBankList(sCustNO); List<Map<String, Object>> bankList = userService.queryBankList(sCustNO);
List<Map<String, Object>> shopList = userService.queryShopList(sCustNO); List<Map<String, Object>> shopList = userService.queryShopList(orgNo, sCustNO);
customerMap.put("sShopNO", shopList.get(0).get("sShopNO")); customerMap.put("sShopNO", shopList.get(0).get("sShopNO"));
customerMap.put("nShopID", shopList.get(0).get("nShopID")); customerMap.put("nShopID", shopList.get(0).get("nShopID"));
customerMap.put("sEmail", shopList.get(0).get("sEmail")); customerMap.put("sEmail", shopList.get(0).get("sEmail"));
......
...@@ -31,7 +31,7 @@ public interface UserService { ...@@ -31,7 +31,7 @@ public interface UserService {
public Map<String, Object> createCustomer(String openId, String mobile); public Map<String, Object> createCustomer(String openId, String mobile);
public List<Map<String, Object>> queryShopList(String custNo); public List<Map<String, Object>> queryShopList(String orgNo, String custNo);
public Map<String, Object> createShop(String orgNo, Map<String, Object> customerMap); public Map<String, Object> createShop(String orgNo, Map<String, Object> customerMap);
......
...@@ -642,8 +642,8 @@ public class UserServiceImpl implements UserService { ...@@ -642,8 +642,8 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
public List<Map<String, Object>> queryShopList(String custNo) { public List<Map<String, Object>> queryShopList(String orgNo, String custNo) {
List<Map<String, Object>> shopList = jdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.nTag&1 = 0", custNo); List<Map<String, Object>> shopList = jdbcTemplate.queryForList("select s.*, m.sSalesmanName, m.sMobile sSalesmanMobile from tShop s left join tSalesman m on m.sSalesmanNO = s.sSalesmanNO1 where s.sCustNO = ? and s.sOrgNO = ? and s.nTag&1 = 0", custNo, orgNo);
return shopList; return shopList;
} }
......
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