Commit 6942e486 authored by 周健威's avatar 周健威

修改代码

parent d7303a44
......@@ -203,6 +203,12 @@
<version>2.0-rscp-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.upyuns.platform.rs</groupId>
<artifactId>rs-datacenter-api</artifactId>
<version>2.0-rscp-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
......
......@@ -21,6 +21,7 @@ import com.github.wxiaoqi.security.common.util.*;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.upyuns.platform.rs.datacenter.fegin.DatacenterFeign;
import com.upyuns.platform.rs.gtdata.GtDataRestClient;
import com.upyuns.platform.rs.universal.dto.SmsTemplateDTO;
import com.upyuns.platform.rs.universal.feign.MQSenderFeign;
......@@ -68,8 +69,8 @@ public class AppPermissionService {
@Autowired
MQSenderFeign mqSenderFeign;
@Resource
private RegionFeign regionFeign;
@Autowired
DatacenterFeign datacenterFeign;
@Autowired
private MyWaterBiz walletBiz;
......@@ -291,6 +292,12 @@ public class AppPermissionService {
appUserLogin.setCreatetime(now);
appUserLogin.setUpdatetime(now);
appUserLoginBiz.insertSelective(appUserLogin);
//创建data账号
String gtdataPass = AssertUtils.isFeignSucc(datacenterFeign.dataRegister(appUserLogin.getId())).getData().get("gtdataPass");
appUserLogin.setGtdataPass(gtdataPass);
appUserLoginBiz.updateSelectiveById(appUserLogin);
Integer userid = appUserLogin.getId();
log.info("注册:新增登陆用户信息: " + userid+"---time===="+System.currentTimeMillis()/1000L);
// 新增用户详情
......
......@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
......@@ -32,4 +33,7 @@ public interface DatacenterFeign {
@RequestMapping(value = "/web/imageData/app/unauth/Fegin/pageBykey", method = RequestMethod.POST)
public ObjectRestResponse<PageDataVO<ImageDataVO>> pageBykey(@RequestBody ImagePageFeginDTO dto);
@RequestMapping(value = "/app/unauth/register", method = RequestMethod.GET)
public ObjectRestResponse<Map<String, String>> dataRegister(@RequestParam("id") Integer id);
}
......@@ -113,9 +113,9 @@ public class GtdataController extends CommonBaseController implements UserRestIn
@RequestMapping(value = "/app/unauth/register", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse dataRegister(AppUserLogin appUserLogin) throws Exception {
String gtdataPass = MD5.GetMD5StringLower(appUserLogin.getId().toString());
Map<String, Object> result = gtDataRestClient.register(appUserLogin.getId()+"", MD5.GetMD5StringLower(gtdataPass), (1024L* 1024L* 1024L* 100)+ "");
public ObjectRestResponse dataRegister(Integer id) throws Exception {
String gtdataPass = MD5.GetMD5StringLower(id.toString());
Map<String, Object> result = gtDataRestClient.register(id+"", MD5.GetMD5StringLower(gtdataPass), (1024L* 1024L* 1024L* 100)+ "");
result.put("gtdataPass", gtdataPass);
return ObjectRestResponse.succ(result);
}
......
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