提交 fe602ac8 编写于 作者: rushui.chen's avatar rushui.chen

20200116 联合登录表信息完善

上级 19a4cce3
流水线 #20884 已失败 于阶段
in 0 second
......@@ -87,6 +87,7 @@ public class AutoCodeController extends AccountBaseController {
long senderId = accountIdByMobilePhone == null ? 0L : accountIdByMobilePhone;
//验证码保存到redis,失效时间10分钟
cacheClient.set(this.getAuthCodeKey(mobilePhone, flag), authCode, 600);
cacheClient.set(RegisterCodeKeyUtils.getRegisterKey(mobilePhone,authCode), 100, 600);
logger.info(this.getAuthCodeKey(mobilePhone, flag));
//发送短信
super.sendMobileMessage(mobilePhone, message, senderId);
......
......@@ -34,5 +34,9 @@ public interface AccountUnionMapper {
int updateByPrimaryKey(AccountUnionEntity record);
/**
* 通过unionid更新记录信息
* @param unionId
*/
void updateUnionStatus(String unionId);
}
\ No newline at end of file
......@@ -307,15 +307,16 @@ public class LoginServiceImpl implements LoginService {
* @param unionId
*/
private void processAccountUnion(Integer acctId, String unionId,Integer productType) {
//先查询当前产品线是否有记录?
//如果有就更新成delete_flag=2;
//然后在插入
//先查询当前产品线是否有记录?如果有就更新成delete_flag=2; 然后在插入
AccountUnionEntity accountUnionResult = accountUnionMapper.selectByUnionId(unionId);
if (accountUnionResult!=null){
accountUnionMapper.updateUnionStatus(unionId);
}
AccountUnionEntity accountUnionEntity = new AccountUnionEntity();
accountUnionEntity.setAcctId(acctId.longValue());
accountUnionEntity.setDeleteFlag(1);
accountUnionEntity.setUnionId(unionId);
accountUnionEntity.setCreatedTime(new Date());
accountUnionEntity.setCreatedTime(new Date())
accountUnionEntity.setModifiedTime(new Date());
accountUnionEntity.setCreatedId(acctId);
accountUnionEntity.setModifiedId(acctId);
......
......@@ -45,6 +45,13 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<!--更新以前的unionId状态-->
<update id="updateUnionStatus" parameterType="java.lang.String">
update account_union
set delete_flag = 2
where union_id = #{unionId} and delete_flag = 1
</update>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AccountUnionEntity">
insert into account_union (id, acct_id, union_type,
union_id, delete_flag, created_id,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册