Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
72f1d57a
提交
72f1d57a
编写于
9月 29, 2019
作者:
rushui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20190929 修改验证码字段
上级
1eecda48
流水线
#15384
已失败 于阶段
in 0 second
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
30 行增加
和
19 行删除
+30
-19
Test.java
...main/java/com/pica/cloud/account/account/server/Test.java
+9
-1
LoginController.java
...ud/account/account/server/controller/LoginController.java
+2
-2
ModifyMobileController.java
...unt/account/server/controller/ModifyMobileController.java
+1
-1
PasswordController.java
...account/account/server/controller/PasswordController.java
+1
-1
RegisterController.java
...account/account/server/controller/RegisterController.java
+1
-1
SysCodeController.java
.../account/account/server/controller/SysCodeController.java
+1
-1
EncryptEntity.java
...ca/cloud/account/account/server/entity/EncryptEntity.java
+7
-7
BaseRequest.java
...om/pica/cloud/account/account/server/req/BaseRequest.java
+5
-5
DoctorServiceImpl.java
...ccount/account/server/service/impl/DoctorServiceImpl.java
+3
-0
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/Test.java
浏览文件 @
72f1d57a
...
...
@@ -28,7 +28,7 @@ public class Test {
register
=
new
BaseRequest
();
register
.
setMobile
(
"13024112588"
);
register
.
setPassword
(
"qq123456"
);
register
.
set
Sys
Code
(
"111111"
);
register
.
set
Auth
Code
(
"111111"
);
String
registerString
=
JSONObject
.
toJSONString
(
register
);
System
.
out
.
println
(
registerString
);
EncryptEntity
registerEncryptEntity
=
new
EncryptEntity
();
...
...
@@ -65,6 +65,14 @@ public class Test {
jsonObject
.
put
(
"authCode"
,
"13024112565"
);
jsonObject
.
put
(
"password"
,
"qq123456"
);
System
.
out
.
println
(
jsonObject
.
toJSONString
());
System
.
out
.
println
(
"--------------------》"
);
EncryptEntity
encryptEntity1
=
new
EncryptEntity
();
encryptEntity1
.
setContent
(
"content"
);
encryptEntity1
.
setKey
(
"awgvsfgwgv"
);
String
encryptEntity1Json
=
JSONObject
.
toJSONString
(
encryptEntity1
);
System
.
out
.
println
(
encryptEntity1Json
);
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/LoginController.java
浏览文件 @
72f1d57a
...
...
@@ -78,7 +78,7 @@ public class LoginController extends AccountBaseController {
@PostMapping
(
value
=
"/login-register"
)
public
PicaResponse
loginAndRegister
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_LOGIN
.
getCode
()
+
""
,
request
.
get
Sys
Code
());
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_LOGIN
.
getCode
()
+
""
,
request
.
get
Auth
Code
());
request
.
setProductType
(
super
.
getProductType
());
request
.
setSourceType
(
super
.
getSourceType
());
request
.
setLoginIp
(
super
.
getIpAddr
());
...
...
@@ -101,7 +101,7 @@ public class LoginController extends AccountBaseController {
@PostMapping
(
value
=
"/login/wechat/step2"
)
public
PicaResponse
loginByWeChatStep
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_WE_CHAT
.
getCode
()
+
""
,
request
.
get
Sys
Code
());
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_WE_CHAT
.
getCode
()
+
""
,
request
.
get
Auth
Code
());
request
.
setProductType
(
super
.
getProductType
());
request
.
setSourceType
(
super
.
getSourceType
());
request
.
setLoginIp
(
super
.
getIpAddr
());
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/ModifyMobileController.java
浏览文件 @
72f1d57a
...
...
@@ -30,7 +30,7 @@ public class ModifyMobileController extends AccountBaseController {
Integer
acctId
=
super
.
getAcctId
();
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
String
mobile
=
request
.
getMobile
();
accountUtils
.
checkMobilePhoneAndAuthCode
(
mobile
,
AccountTypeEnum
.
SYSCODE_TYPE_MODIFY_MOBILE
.
getCode
()
+
""
,
request
.
get
Sys
Code
());
accountUtils
.
checkMobilePhoneAndAuthCode
(
mobile
,
AccountTypeEnum
.
SYSCODE_TYPE_MODIFY_MOBILE
.
getCode
()
+
""
,
request
.
get
Auth
Code
());
modifyMobileService
.
modify
(
acctId
,
mobile
);
return
PicaResponse
.
toResponse
();
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/PasswordController.java
浏览文件 @
72f1d57a
...
...
@@ -62,7 +62,7 @@ public class PasswordController extends AccountBaseController {
@PostMapping
(
value
=
"/reset"
)
public
PicaResponse
forgetPassword
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_RESET_PASSWORD
.
getCode
()
+
""
,
request
.
get
Sys
Code
());
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_RESET_PASSWORD
.
getCode
()
+
""
,
request
.
get
Auth
Code
());
if
(
StringUtils
.
isEmpty
(
request
.
getPassword
()))
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PASSWORD_ERROR
);
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/RegisterController.java
浏览文件 @
72f1d57a
...
...
@@ -30,7 +30,7 @@ public class RegisterController extends AccountBaseController {
@PostMapping
(
value
=
""
)
public
PicaResponse
<
String
>
register
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_REGISTER
.
getCode
()+
""
,
request
.
get
Sys
Code
());
accountUtils
.
checkMobilePhoneAndAuthCode
(
request
.
getMobile
(),
AccountTypeEnum
.
SYSCODE_TYPE_REGISTER
.
getCode
()+
""
,
request
.
get
Auth
Code
());
accountUtils
.
checkPassword
(
request
.
getPassword
());
request
.
setFlag
(
AccountTypeEnum
.
SYSCODE_TYPE_REGISTER
.
getCode
());
request
.
setProductType
(
super
.
getProductType
());
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/SysCodeController.java
浏览文件 @
72f1d57a
...
...
@@ -50,7 +50,7 @@ public class SysCodeController extends AccountBaseController {
*/
@ApiOperation
(
"获取短信验证码"
)
@PostMapping
(
value
=
""
)
public
PicaResponse
get
Sys
Code
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
public
PicaResponse
get
Auth
Code
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
AccountUtils
.
checkMobilePhone
(
request
.
getMobile
());
processSysCode
(
request
.
getMobile
(),
request
.
getFlag
());
...
...
server/src/main/java/com/pica/cloud/account/account/server/entity/EncryptEntity.java
浏览文件 @
72f1d57a
...
...
@@ -14,13 +14,13 @@ public class EncryptEntity {
*/
private
String
content
;
//
public String getKey() {
//
return key;
//
}
//
//
public void setKey(String key) {
//
this.key = key;
//
}
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getContent
()
{
return
content
;
...
...
server/src/main/java/com/pica/cloud/account/account/server/req/BaseRequest.java
浏览文件 @
72f1d57a
...
...
@@ -16,7 +16,7 @@ public class BaseRequest {
private
String
password
;
@ApiModelProperty
(
"旧密码"
)
private
String
oldPwd
;
private
String
sys
Code
;
private
String
auth
Code
;
private
int
flag
;
@ApiModelProperty
(
"产品线类型"
)
private
int
productType
;
...
...
@@ -64,12 +64,12 @@ public class BaseRequest {
this
.
oldPwd
=
oldPwd
;
}
public
String
get
Sys
Code
()
{
return
sys
Code
;
public
String
get
Auth
Code
()
{
return
auth
Code
;
}
public
void
set
SysCode
(
String
sys
Code
)
{
this
.
sysCode
=
sys
Code
;
public
void
set
AuthCode
(
String
auth
Code
)
{
this
.
authCode
=
auth
Code
;
}
public
int
getFlag
()
{
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/DoctorServiceImpl.java
浏览文件 @
72f1d57a
...
...
@@ -11,8 +11,11 @@ import com.pica.cloud.account.account.server.util.AESUtil;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.Date
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录