提交 dad3eb25 编写于 作者: 權赋's avatar 權赋
......@@ -20,38 +20,41 @@ import java.io.Serializable;
@Accessors(chain = true)
public class UserRegisterBO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 手机号码
*/
@ApiModelProperty(value = "手机", required = true)
private String mobile;
/**
* 登录密码
*/
@ApiModelProperty(value = "密码", required = true)
private String password;
/**
* 重复密码
*/
@ApiModelProperty(value = "重复密码", required = true)
private String repassword;
/**
* clientId
*/
@ApiModelProperty(value = "clientId", required = true)
private String clientId;
/**
* 手机验证码
*/
@ApiModelProperty(value = "手机验证码", required = true)
private String code;
private static final long serialVersionUID = 1L;
/**
* 手机号码
*/
@ApiModelProperty(value = "手机", required = true)
private String mobile;
/**
* 登录密码
*/
@ApiModelProperty(value = "密码", required = true)
private String password;
/**
* 重复密码
*/
@ApiModelProperty(value = "重复密码", required = true)
private String repassword;
/**
* clientId
*/
@ApiModelProperty(value = "clientId", required = true)
private String clientId;
/**
* 手机验证码
*/
@ApiModelProperty(value = "手机验证码", required = true)
private String code;
@ApiModelProperty(value = "ip地址")
private String ip;
private String ip;
@ApiModelProperty(value = "注册来源", hidden = true)
private Integer source = 2;
@ApiModelProperty(value = "推荐人", hidden = true)
private String referralCode = "D92359";
}
......@@ -59,9 +59,6 @@ public class ApiUserInfoBiz extends BaseBiz {
@Autowired
private RedisTemplate<String, String> redisTemplate;
// RSA公钥
private final String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCzBzD+Sgi5z+zq8P/qMimssuozcjdx4pBu2U2OKf6bDdQEKmSB1KXCheG2m19+xnerIZ22fr8nHc0r1qIKIUrJ0UWU8qXkANe4u0wW0V52BsW6H02Jmc1mFjrYcOCpToVFGvLm17AgP6tNBAiTjiiBc0V+prAZ9ixrC5aPsI4gAwIDAQAB";
@Transactional
public Result<UserLoginDTO> register(UserRegisterBO userRegisterBO) {
if (StringUtils.isEmpty(userRegisterBO.getMobile())) {
......@@ -108,10 +105,11 @@ public class ApiUserInfoBiz extends BaseBiz {
// 同步数据到演示环境
try {
// 密码加密
String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCzBzD+Sgi5z+zq8P/qMimssuozcjdx4pBu2U2OKf6bDdQEKmSB1KXCheG2m19+xnerIZ22fr8nHc0r1qIKIUrJ0UWU8qXkANe4u0wW0V52BsW6H02Jmc1mFjrYcOCpToVFGvLm17AgP6tNBAiTjiiBc0V+prAZ9ixrC5aPsI4gAwIDAQAB";
RSA rsa = new RSA(null, publicKey);
userRegisterBO.setPassword(rsa.encryptBase64(userRegisterBO.getPassword(), KeyType.PublicKey));
userRegisterBO.setRepassword(rsa.encryptBase64(userRegisterBO.getRepassword(), KeyType.PublicKey));
String post = HttpUtil.post("http://dev.school.roncoos.com/gateway/user/api/user/register", JSONUtil.toJsonStr(userRegisterBO));
String post = HttpUtil.post("http://demo.edu.roncoo.net/gateway/user/api/user/register", JSONUtil.toJsonStr(userRegisterBO));
logger.warn("-----------------同步注册" + post);
} catch (Exception e) {
e.printStackTrace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册