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

“20200116 去掉使用行锁的操作

上级 4f5e631d
流水线 #20900 已失败 于阶段
in 0 second
......@@ -26,7 +26,8 @@ public enum AccountExceptionEnum {
PICA_SYSCODE_RETRY("216518", "请X秒后重试"),
PICA_NOT_EXIST("216519", "该用户不存在"),
PICA_REGISTER_FAIL("216520", "注册失败"),
PICA_WECHAT_CODE_ERROR("216521", "微信登录授权code不正确");
PICA_WECHAT_CODE_ERROR("216521", "微信登录授权code不正确"),
PICA_WECHAT_UNBIND("216522", "该微信号已绑定其他云鹊医账户,你可以使用微信登录云鹊医,在「设置」页解除绑定");
private String code;
......
......@@ -193,7 +193,9 @@ public class LoginServiceImpl implements LoginService {
return result;
}
@Override
@Transactional
public LoginResult loginByWeChat(BaseRequest request) {
WeChatEntity weChatEntity = WeChatUtils.getAuthorizationInfo(appId, appSecret, request.getWeChatCode());
if (weChatEntity == null || StringUtils.isEmpty(weChatEntity.getOpenid()) || StringUtils.isEmpty(weChatEntity.getAccess_token())) {
......@@ -310,7 +312,7 @@ public class LoginServiceImpl implements LoginService {
//先查询当前产品线是否有记录?如果有就更新成delete_flag=2; 然后在插入新的绑定记录
AccountUnionEntity accountUnionResult = accountUnionMapper.selectByUnionId(unionId);
if (accountUnionResult!=null){
accountUnionMapper.updateUnionStatus(unionId);
throw new PicaException(AccountExceptionEnum.PICA_WECHAT_UNBIND.getCode(), AccountExceptionEnum.PICA_WECHAT_UNBIND.getMessage());
}
AccountUnionEntity accountUnionEntity = new AccountUnionEntity();
accountUnionEntity.setAcctId(acctId.longValue());
......
......@@ -30,7 +30,7 @@
<include refid="Base_Column_List"/>
from account_union
where union_id = #{unionId} and delete_flag = 1
limit 1
limit 1
</select>
<!--解除绑定关系-->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册