事务优化

This commit is contained in:
linfeng 2024-01-08 09:56:42 +08:00
parent a31f0f3d19
commit bc5f0c32b2
2 changed files with 3 additions and 1 deletions

View File

@ -151,6 +151,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
* @return 用户ID * @return 用户ID
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Integer smsLogin(SmsLoginForm form, HttpServletRequest request) { public Integer smsLogin(SmsLoginForm form, HttpServletRequest request) {
AppUserEntity appUserEntity = this.lambdaQuery().eq(AppUserEntity::getMobile, form.getMobile()).one(); AppUserEntity appUserEntity = this.lambdaQuery().eq(AppUserEntity::getMobile, form.getMobile()).one();
String codeKey = Constant.SMS_PREFIX + form.getMobile(); String codeKey = Constant.SMS_PREFIX + form.getMobile();
@ -317,6 +318,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Integer miniWxLogin(WxLoginForm form) { public Integer miniWxLogin(WxLoginForm form) {
String openId = getOpenId(form.getCode()); String openId = getOpenId(form.getCode());