diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 24af3d436b..4ecb78f7a9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; @@ -143,6 +144,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { * @date 2020/11/4 1:36 下午 */ @Override + @Transactional(rollbackFor = Exception.class) public Result authBadgeRecord(CertificationAddFormDTO certificationAddFormDTO) { if (StringUtils.isNotBlank(certificationAddFormDTO.getMobile())){ String smsCode = userBadgeRedis.getBadgeSmsCode(certificationAddFormDTO.getMobile()); @@ -229,6 +231,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { * @date 2020/11/4 5:47 下午 */ @Override + @Transactional(rollbackFor = Exception.class) public void openedOrClosed(OpenedOrClosedFormDTO openedOrClosedFormDTO) { userBadgeDao.updateIsOpen(openedOrClosedFormDTO); }