Commit 22f847e1 authored by Quxl's avatar Quxl

x

parent b02e2b02
......@@ -213,14 +213,14 @@ public class UserController {
userService.saveOpenId((String)customerMap.get("sCustNO"), openId);
}
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) {
shopList = new ArrayList<Map<String, Object>>();
Map<String, Object> shopMap = userService.createShop(orgNo, customerMap);
shopList.add(shopMap);
}
customerMap.put("sShopNO", shopList.get(0).get("sShopNO"));
return this.queryUserInfoByOpenId(openId, langID, request, response);
return this.queryUserInfoByOpenId(orgNo, openId, langID, request, response);
}
@ApiOperation("修改认证信息")
......@@ -317,14 +317,14 @@ public class UserController {
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@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);
if(customerMap == null) {
return Rjx.jsonErr().setCode(201).setMessage(I18NUtils.getMessage(langID, "Msg_OpenID_notExist")).toJson();
}
String sCustNO = (String)customerMap.get("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("nShopID", shopList.get(0).get("nShopID"));
customerMap.put("sEmail", shopList.get(0).get("sEmail"));
......
......@@ -31,7 +31,7 @@ public interface UserService {
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);
......
......@@ -642,8 +642,8 @@ public class UserServiceImpl implements UserService {
}
@Override
public List<Map<String, Object>> queryShopList(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);
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.sOrgNO = ? and s.nTag&1 = 0", custNo, orgNo);
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