|
@@ -0,0 +1,34 @@
|
|
|
|
|
+package com.uas.platform.b2c;
|
|
|
|
|
+
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
|
+import com.uas.account.entity.UserSpaceDetail;
|
|
|
|
|
+import com.uas.sso.common.util.HttpUtil;
|
|
|
|
|
+import com.uas.sso.common.util.HttpUtil.ResponseWrap;
|
|
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
+
|
|
|
|
|
+public class RegistForMall {
|
|
|
|
|
+
|
|
|
|
|
+ public static void main(String args[]) throws Exception {
|
|
|
|
|
+ UserSpaceDetail detail = new UserSpaceDetail();
|
|
|
|
|
+ detail.setName("B2B公司研发测试数据-不要购买-wangyuchao");
|
|
|
|
|
+ detail.setShortName("B2B公司");
|
|
|
|
|
+ detail.setAdminName("余佳");
|
|
|
|
|
+ detail.setAdminTel("15989329613");
|
|
|
|
|
+ detail.setAdminEmail("yuj@usoftchina.com");
|
|
|
|
|
+ detail.setBusinessCode("11122233344456789");
|
|
|
|
|
+ detail.setRegisterDate(new Date().getTime());
|
|
|
|
|
+ detail.setTel("15989329613");
|
|
|
|
|
+ detail.setFax("11-2222222");
|
|
|
|
|
+ String url = "http://113.105.74.135:8001/api/userspace";
|
|
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
+ ResponseWrap res = HttpUtil.doPost(url,
|
|
|
|
|
+ new ModelMap("_operate", "registForMall").addAttribute("detail", JSON.toJSON(detail)));
|
|
|
|
|
+ System.out.println(res.getContent());
|
|
|
|
|
+ if (!res.isSuccess())
|
|
|
|
|
+ throw new Exception(res.getContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|