事务优化

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

@ -44,7 +44,7 @@ public class Constant {
*/
public static final String H5 = "H5";
public static final String WXAPP = "WXAPP";
/**
* 用户是否禁用

View File

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