|
@@ -184,36 +184,6 @@ public class AccountUtils {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 根据企业名查询企业详情
|
|
|
|
|
- *
|
|
|
|
|
- * @author wangmh
|
|
|
|
|
- * @date 2018/1/13 10:13
|
|
|
|
|
- * @param name 企业名
|
|
|
|
|
- * @return 企业详情
|
|
|
|
|
- * @throws Exception
|
|
|
|
|
- */
|
|
|
|
|
- public static UserSpaceDetail findByName(String name) throws Exception {
|
|
|
|
|
- String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
- if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
- url = url + "/detail/info";
|
|
|
|
|
- HttpUtil.ResponseWrap res = HttpUtil.doGet(url,
|
|
|
|
|
- new ModelMap("name", name));
|
|
|
|
|
- if (!res.isSuccess()) {
|
|
|
|
|
- throw new Exception(res.getContent());
|
|
|
|
|
- } else {
|
|
|
|
|
- ResultWrap result = JSON.parseObject(res.getContent(), ResultWrap.class);
|
|
|
|
|
- if (!result.isSuccess()) {
|
|
|
|
|
- throw new Exception(result.getErrMsg());
|
|
|
|
|
- } else if (result.getContent() != null){
|
|
|
|
|
- return JSON.parseObject(result.getContent().toString(), UserSpaceDetail.class);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据营业执照号获得企业信息
|
|
* 根据营业执照号获得企业信息
|
|
|
* @param businessCode 营业执照号
|
|
* @param businessCode 营业执照号
|
|
@@ -249,7 +219,7 @@ public class AccountUtils {
|
|
|
String saveUrl = AccountConfig.getSpaceSaveUrl();
|
|
String saveUrl = AccountConfig.getSpaceSaveUrl();
|
|
|
if (!StringUtils.isEmpty(saveUrl)) {
|
|
if (!StringUtils.isEmpty(saveUrl)) {
|
|
|
ModelMap formData = new ModelMap();
|
|
ModelMap formData = new ModelMap();
|
|
|
- saveUrl = saveUrl + "/info/businessCode";
|
|
|
|
|
|
|
+ saveUrl = saveUrl + "/info/name";
|
|
|
formData.put("spaceName", spaceName);
|
|
formData.put("spaceName", spaceName);
|
|
|
HttpUtil.ResponseWrap res = HttpUtil.doPost(saveUrl, formData);
|
|
HttpUtil.ResponseWrap res = HttpUtil.doPost(saveUrl, formData);
|
|
|
if (!res.isSuccess()) {
|
|
if (!res.isSuccess()) {
|