Commit b76510f2 authored by Quxl's avatar Quxl

x

parent 6ae2b70c
......@@ -325,4 +325,19 @@ public class UserController {
customerMap.put("nShopID", shopList.get(0).get("nShopID"));
return Rjx.jsonOk().set("customer", customerMap).set("shopList", shopList).setMessage(I18NUtils.getMessage(langID, "Msg_Login_success")).toJson();
}
@ApiOperation("根据店铺编号查询业务员")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "shopNo", dataType = "String", required = false),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = true, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@RequestMapping(value = "/getSalesmanByShopNo",method=RequestMethod.GET)
public String getSalesmanByShopNo(String shopNo) {
Map<String, Object> map = userService.getSalesmanByShopNo(shopNo);
return Rjx.jsonOk().set("data", map).toJson();
}
}
......@@ -41,4 +41,6 @@ public interface UserService {
public String queryShopAuthInfo(Integer shopId, String langID);
public Map<String, Object> getSalesmanByShopNo(String shopNo);
}
......@@ -694,4 +694,10 @@ public class UserServiceImpl implements UserService {
jdbcTemplate.update("update tCustomer set sOpenID = ? where sCustNO = ?", openId, sCustNO);
}
@Override
public Map<String, Object> getSalesmanByShopNo(String shopNo) {
String sql = "select top 1 sm.* from tSalesman sm, tShop s where sm.sSalesmanNO = s.sSalesmanNO1 or sm.sSalesmanNO = s.sSalesmanNO2 and s.sShopNO = ?";
return jdbcTemplate.queryForMap(sql, shopNo);
}
}
\ 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