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
提交
bbd53501
提交
bbd53501
编写于
12月 15, 2020
作者:
Peijun.zhao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev-1223' into dev-1223
上级
3e46595b
f0f457ec
流水线
#33459
已失败 于阶段
in 0 second
变更
10
流水线
1
展开全部
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
503 行增加
和
65 行删除
+503
-65
pom.xml
server/pom.xml
+5
-0
LoginV1Controller.java
.../account/account/server/controller/LoginV1Controller.java
+4
-23
LogOneChlickCheck.java
...loud/account/account/server/entity/LogOneChlickCheck.java
+115
-0
LoginResult.java
...pica/cloud/account/account/server/entity/LoginResult.java
+29
-0
LogOneChlickCheckMapper.java
...ccount/account/server/mapper/LogOneChlickCheckMapper.java
+21
-0
OneClickLoginReq.java
...ca/cloud/account/account/server/req/OneClickLoginReq.java
+10
-0
LoginV1Service.java
.../cloud/account/account/server/service/LoginV1Service.java
+1
-1
LoginV1ServiceImpl.java
...count/account/server/service/impl/LoginV1ServiceImpl.java
+141
-41
mybatis-generator.xml
server/src/main/resources/mybatis-generator.xml
+2
-0
LogOneChlickCheckMapper.xml
...er/src/main/resources/mybatis/LogOneChlickCheckMapper.xml
+175
-0
未找到文件。
server/pom.xml
浏览文件 @
bbd53501
...
...
@@ -253,6 +253,11 @@
<!-- </exclusions>-->
<!-- </dependency>-->
<dependency>
<groupId>
com.pica.cloud.foundation
</groupId>
<artifactId>
pica-cloud-message-client
</artifactId>
<version>
1.0.6-SNAPSHOT
</version>
</dependency>
</dependencies>
<dependencyManagement>
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/LoginV1Controller.java
浏览文件 @
bbd53501
...
...
@@ -38,30 +38,11 @@ public class LoginV1Controller extends AccountBaseController {
private
LoginService
loginService
;
@ApiOperation
(
value
=
"app端手机号码一键登录 v1"
)
@PostMapping
(
"one
-
click"
)
@PostMapping
(
"one
_
click"
)
public
PicaResponse
<
LoginResult
>
oneClickLogin
(
@RequestBody
AesAuthCodeReq
aesReq
)
throws
Exception
{
//added by joy begin
EncryptEntity
entity
=
new
EncryptEntity
();
if
(
StringUtils
.
isEmpty
(
aesReq
.
getKey
())
&&
StringUtils
.
isEmpty
(
aesReq
.
getContent
()))
{
//明文时处理
entity
=
RSAUtil
.
getOneClickEncrypt
(
aesReq
);
logger
.
info
(
"AesAuthCodeReq oneClickLogin:"
+
JSONObject
.
toJSONString
(
aesReq
));
logger
.
info
(
"AesAuthCodeReq oneClickLogin encrypt:"
+
JSONObject
.
toJSONString
(
entity
));
//个别报错数据记流水
LogLoginAes
loginAes
=
new
LogLoginAes
();
loginAes
.
setChannel
(
3
);
loginAes
.
setDeviceToken
(
aesReq
.
getDevice_token
());
loginAes
.
setSourceType
(
null
==
super
.
getSourceType
()
?
0
:
super
.
getSourceType
());
loginAes
.
setOneToken
(
aesReq
.
getToken
());
loginAes
.
setMobile
(
aesReq
.
getMobile
());
loginAes
.
setDeviceInfo
(
super
.
getDeviceInfoLow
(
"deviceinfo"
));
loginService
.
insertLoginAesLog
(
loginAes
);
}
else
{
//执行原逻辑
entity
.
setKey
(
aesReq
.
getKey
());
entity
.
setContent
(
aesReq
.
getContent
());
}
//added by joy end
OneClickLoginReq
req
=
CryptoUtil
.
decrypt
(
entity
,
OneClickLoginReq
.
class
);
req
.
setProductType
(
super
.
getProductType
());
...
...
@@ -69,7 +50,7 @@ public class LoginV1Controller extends AccountBaseController {
req
.
setLoginIp
(
super
.
getIpAddr
());
req
.
setUserTokenTourist
(
super
.
getUserTokenTourist
());
logger
.
info
(
"one-click req:{}"
,
JSONObject
.
toJSONString
(
req
));
LoginResult
oneClickLoginResultVo
=
loginV1Service
.
oneClickLogin
(
req
);
LoginResult
oneClickLoginResultVo
=
loginV1Service
.
oneClickLogin
V1
(
req
);
return
PicaResponse
.
toResponse
(
oneClickLoginResultVo
);
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/entity/LogOneChlickCheck.java
0 → 100644
浏览文件 @
bbd53501
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
LogOneChlickCheck
{
private
Integer
id
;
private
String
deviceToken
;
private
String
lastMobilePhone
;
private
String
currMobilePhone
;
private
Boolean
usedShanyan
;
private
String
keepBack
;
private
Byte
deleteFlag
;
private
Integer
createdId
;
private
Date
createdTime
;
private
Integer
modifiedId
;
private
Date
modifiedTime
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getDeviceToken
()
{
return
deviceToken
;
}
public
void
setDeviceToken
(
String
deviceToken
)
{
this
.
deviceToken
=
deviceToken
==
null
?
null
:
deviceToken
.
trim
();
}
public
String
getLastMobilePhone
()
{
return
lastMobilePhone
;
}
public
void
setLastMobilePhone
(
String
lastMobilePhone
)
{
this
.
lastMobilePhone
=
lastMobilePhone
==
null
?
null
:
lastMobilePhone
.
trim
();
}
public
String
getCurrMobilePhone
()
{
return
currMobilePhone
;
}
public
void
setCurrMobilePhone
(
String
currMobilePhone
)
{
this
.
currMobilePhone
=
currMobilePhone
==
null
?
null
:
currMobilePhone
.
trim
();
}
public
Boolean
getUsedShanyan
()
{
return
usedShanyan
;
}
public
void
setUsedShanyan
(
Boolean
usedShanyan
)
{
this
.
usedShanyan
=
usedShanyan
;
}
public
String
getKeepBack
()
{
return
keepBack
;
}
public
void
setKeepBack
(
String
keepBack
)
{
this
.
keepBack
=
keepBack
==
null
?
null
:
keepBack
.
trim
();
}
public
Byte
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Byte
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getCreatedId
()
{
return
createdId
;
}
public
void
setCreatedId
(
Integer
createdId
)
{
this
.
createdId
=
createdId
;
}
public
Date
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Integer
getModifiedId
()
{
return
modifiedId
;
}
public
void
setModifiedId
(
Integer
modifiedId
)
{
this
.
modifiedId
=
modifiedId
;
}
public
Date
getModifiedTime
()
{
return
modifiedTime
;
}
public
void
setModifiedTime
(
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/entity/LoginResult.java
浏览文件 @
bbd53501
...
...
@@ -30,6 +30,35 @@ public class LoginResult {
@ApiModelProperty
(
"accountinfo表主键id"
)
private
Integer
acctId
;
private
Boolean
checkStatus
=
true
;
private
String
suggestMessage
;
private
String
differentMessage
;
public
Boolean
getCheckStatus
()
{
return
checkStatus
;
}
public
void
setCheckStatus
(
Boolean
checkStatus
)
{
this
.
checkStatus
=
checkStatus
;
}
public
String
getSuggestMessage
()
{
return
suggestMessage
;
}
public
void
setSuggestMessage
(
String
suggestMessage
)
{
this
.
suggestMessage
=
suggestMessage
;
}
public
String
getDifferentMessage
()
{
return
differentMessage
;
}
public
void
setDifferentMessage
(
String
differentMessage
)
{
this
.
differentMessage
=
differentMessage
;
}
public
String
getToken
()
{
return
token
;
...
...
server/src/main/java/com/pica/cloud/account/account/server/mapper/LogOneChlickCheckMapper.java
0 → 100644
浏览文件 @
bbd53501
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.LogOneChlickCheck
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
LogOneChlickCheckMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
LogOneChlickCheck
record
);
int
insertSelective
(
LogOneChlickCheck
record
);
LogOneChlickCheck
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
LogOneChlickCheck
record
);
int
updateByPrimaryKey
(
LogOneChlickCheck
record
);
int
insertOne
(
LogOneChlickCheck
record
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/req/OneClickLoginReq.java
浏览文件 @
bbd53501
...
...
@@ -20,6 +20,16 @@ public class OneClickLoginReq {
// 是否需要校验该设备登录的手机号
private
Boolean
checkFlag
=
false
;
private
String
deviceToken
;
public
String
getDeviceToken
()
{
return
deviceToken
;
}
public
void
setDeviceToken
(
String
deviceToken
)
{
this
.
deviceToken
=
deviceToken
;
}
public
Boolean
getCheckFlag
()
{
return
checkFlag
;
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/LoginV1Service.java
浏览文件 @
bbd53501
...
...
@@ -7,7 +7,7 @@ import com.pica.cloud.account.account.server.req.BaseRequest;
public
interface
LoginV1Service
{
LoginResult
oneClickLogin
(
OneClickLoginReq
req
);
LoginResult
oneClickLogin
V1
(
OneClickLoginReq
req
);
void
mobileValidate
(
BaseRequest
request
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/LoginV1ServiceImpl.java
浏览文件 @
bbd53501
此差异已折叠。
点击以展开。
server/src/main/resources/mybatis-generator.xml
浏览文件 @
bbd53501
...
...
@@ -9,6 +9,7 @@
<!-- <classPathEntry location="/Users/wangyongbo/Downloads/software/mysql-connector-java-5.1.39.jar"/>-->
<!-- <classPathEntry location="D:\programer\reponsitory\maven\mysql\mysql-connector-java\5.1.39\mysql-connector-java-5.1.39.jar"/>-->
<!--<classPathEntry location="E:\mysql_jar/mysql-connector-java-5.1.39.jar"/>-->
<classPathEntry
location=
"/Users/zhoupengcheng/mysql_jar/mysql-connector-java-5.1.49.jar"
/>
<context
id=
"tableEntity"
targetRuntime=
"MyBatis3"
>
<commentGenerator>
...
...
@@ -43,6 +44,7 @@
<!-- <table tableName="account_apple_info" domainObjectName="AccountAppleInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
<!-- <table tableName="account_pat_family_record" domainObjectName="AccountPatFamilyRecord" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
<table
tableName=
"log_one_chlick_check"
domainObjectName=
"LogOneChlickCheck"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
></table>
</context>
</generatorConfiguration>
...
...
server/src/main/resources/mybatis/LogOneChlickCheckMapper.xml
0 → 100644
浏览文件 @
bbd53501
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pica.cloud.account.account.server.mapper.LogOneChlickCheckMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"device_token"
property=
"deviceToken"
jdbcType=
"VARCHAR"
/>
<result
column=
"last_mobile_phone"
property=
"lastMobilePhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"curr_mobile_phone"
property=
"currMobilePhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"used_shanyan"
property=
"usedShanyan"
jdbcType=
"BIT"
/>
<result
column=
"keep_back"
property=
"keepBack"
jdbcType=
"VARCHAR"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
jdbcType=
"TINYINT"
/>
<result
column=
"created_id"
property=
"createdId"
jdbcType=
"INTEGER"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modified_id"
property=
"modifiedId"
jdbcType=
"INTEGER"
/>
<result
column=
"modified_time"
property=
"modifiedTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, device_token, last_mobile_phone, curr_mobile_phone, used_shanyan, keep_back,
delete_flag, created_id, created_time, modified_id, modified_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from log_one_chlick_check
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from log_one_chlick_check
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
insert into log_one_chlick_check (id, device_token, last_mobile_phone,
curr_mobile_phone, used_shanyan, keep_back,
delete_flag, created_id, created_time,
modified_id, modified_time)
values (#{id,jdbcType=INTEGER}, #{deviceToken,jdbcType=VARCHAR}, #{lastMobilePhone,jdbcType=VARCHAR},
#{currMobilePhone,jdbcType=VARCHAR}, #{usedShanyan,jdbcType=BIT}, #{keepBack,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=TINYINT}, #{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP},
#{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
insert into log_one_chlick_check
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"deviceToken != null"
>
device_token,
</if>
<if
test=
"lastMobilePhone != null"
>
last_mobile_phone,
</if>
<if
test=
"currMobilePhone != null"
>
curr_mobile_phone,
</if>
<if
test=
"usedShanyan != null"
>
used_shanyan,
</if>
<if
test=
"keepBack != null"
>
keep_back,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createdId != null"
>
created_id,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"modifiedId != null"
>
modified_id,
</if>
<if
test=
"modifiedTime != null"
>
modified_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"deviceToken != null"
>
#{deviceToken,jdbcType=VARCHAR},
</if>
<if
test=
"lastMobilePhone != null"
>
#{lastMobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"currMobilePhone != null"
>
#{currMobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"usedShanyan != null"
>
#{usedShanyan,jdbcType=BIT},
</if>
<if
test=
"keepBack != null"
>
#{keepBack,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=TINYINT},
</if>
<if
test=
"createdId != null"
>
#{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
#{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
update log_one_chlick_check
<set
>
<if
test=
"deviceToken != null"
>
device_token = #{deviceToken,jdbcType=VARCHAR},
</if>
<if
test=
"lastMobilePhone != null"
>
last_mobile_phone = #{lastMobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"currMobilePhone != null"
>
curr_mobile_phone = #{currMobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"usedShanyan != null"
>
used_shanyan = #{usedShanyan,jdbcType=BIT},
</if>
<if
test=
"keepBack != null"
>
keep_back = #{keepBack,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=TINYINT},
</if>
<if
test=
"createdId != null"
>
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
update log_one_chlick_check
set device_token = #{deviceToken,jdbcType=VARCHAR},
last_mobile_phone = #{lastMobilePhone,jdbcType=VARCHAR},
curr_mobile_phone = #{currMobilePhone,jdbcType=VARCHAR},
used_shanyan = #{usedShanyan,jdbcType=BIT},
keep_back = #{keepBack,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=TINYINT},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<insert
id=
"insertOne"
parameterType=
"com.pica.cloud.account.account.server.entity.LogOneChlickCheck"
>
insert into log_one_chlick_check (device_token, last_mobile_phone,
curr_mobile_phone, used_shanyan, keep_back,
delete_flag, created_id, created_time,
modified_id, modified_time)
values (#{deviceToken,jdbcType=VARCHAR}, #{lastMobilePhone,jdbcType=VARCHAR},
#{currMobilePhone,jdbcType=VARCHAR}, #{usedShanyan,jdbcType=BIT}, #{keepBack,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=TINYINT}, #{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP},
#{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP})
</insert>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录