From e39318e38d0f26ac5d606f2dbec66275a654ceb6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 5 Nov 2020 10:11:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=BD=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) 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); }