提交 bbd53501 编写于 作者:  Peijun.zhao's avatar Peijun.zhao

Merge remote-tracking branch 'origin/dev-1223' into dev-1223

流水线 #33459 已失败 于阶段
in 0 second
...@@ -253,6 +253,11 @@ ...@@ -253,6 +253,11 @@
<!-- </exclusions>--> <!-- </exclusions>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-message-client</artifactId>
<version>1.0.6-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
......
...@@ -38,30 +38,11 @@ public class LoginV1Controller extends AccountBaseController { ...@@ -38,30 +38,11 @@ public class LoginV1Controller extends AccountBaseController {
private LoginService loginService; private LoginService loginService;
@ApiOperation(value = "app端手机号码一键登录 v1") @ApiOperation(value = "app端手机号码一键登录 v1")
@PostMapping("one-click") @PostMapping("one_click")
public PicaResponse<LoginResult> oneClickLogin(@RequestBody AesAuthCodeReq aesReq) throws Exception { public PicaResponse<LoginResult> oneClickLogin(@RequestBody AesAuthCodeReq aesReq) throws Exception {
//added by joy begin
EncryptEntity entity = new EncryptEntity(); 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.setKey(aesReq.getKey());
entity.setContent(aesReq.getContent()); entity.setContent(aesReq.getContent());
}
//added by joy end
OneClickLoginReq req = CryptoUtil.decrypt(entity, OneClickLoginReq.class); OneClickLoginReq req = CryptoUtil.decrypt(entity, OneClickLoginReq.class);
req.setProductType(super.getProductType()); req.setProductType(super.getProductType());
...@@ -69,7 +50,7 @@ public class LoginV1Controller extends AccountBaseController { ...@@ -69,7 +50,7 @@ public class LoginV1Controller extends AccountBaseController {
req.setLoginIp(super.getIpAddr()); req.setLoginIp(super.getIpAddr());
req.setUserTokenTourist(super.getUserTokenTourist()); req.setUserTokenTourist(super.getUserTokenTourist());
logger.info("one-click req:{}", JSONObject.toJSONString(req)); logger.info("one-click req:{}", JSONObject.toJSONString(req));
LoginResult oneClickLoginResultVo = loginV1Service.oneClickLogin(req); LoginResult oneClickLoginResultVo = loginV1Service.oneClickLoginV1(req);
return PicaResponse.toResponse(oneClickLoginResultVo); return PicaResponse.toResponse(oneClickLoginResultVo);
} }
......
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
...@@ -30,6 +30,35 @@ public class LoginResult { ...@@ -30,6 +30,35 @@ public class LoginResult {
@ApiModelProperty("accountinfo表主键id") @ApiModelProperty("accountinfo表主键id")
private Integer acctId; 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() { public String getToken() {
return token; return token;
......
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
...@@ -20,6 +20,16 @@ public class OneClickLoginReq { ...@@ -20,6 +20,16 @@ public class OneClickLoginReq {
// 是否需要校验该设备登录的手机号 // 是否需要校验该设备登录的手机号
private Boolean checkFlag = false; private Boolean checkFlag = false;
private String deviceToken;
public String getDeviceToken() {
return deviceToken;
}
public void setDeviceToken(String deviceToken) {
this.deviceToken = deviceToken;
}
public Boolean getCheckFlag() { public Boolean getCheckFlag() {
return checkFlag; return checkFlag;
} }
......
...@@ -7,7 +7,7 @@ import com.pica.cloud.account.account.server.req.BaseRequest; ...@@ -7,7 +7,7 @@ import com.pica.cloud.account.account.server.req.BaseRequest;
public interface LoginV1Service { public interface LoginV1Service {
LoginResult oneClickLogin(OneClickLoginReq req); LoginResult oneClickLoginV1(OneClickLoginReq req);
void mobileValidate(BaseRequest request); void mobileValidate(BaseRequest request);
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<!-- <classPathEntry location="/Users/wangyongbo/Downloads/software/mysql-connector-java-5.1.39.jar"/>--> <!-- <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="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="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"> <context id="tableEntity" targetRuntime="MyBatis3">
<commentGenerator> <commentGenerator>
...@@ -43,6 +44,7 @@ ...@@ -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_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="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> </context>
</generatorConfiguration> </generatorConfiguration>
......
<?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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册