From 7fd053651ac11db87fe4f6c57e65eed3b9a59452 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 23 七月 2025 10:47:24 +0800 Subject: [PATCH] yml活动管理代码 --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java index eb83a31..c576dfe 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java @@ -30,6 +30,7 @@ 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.StringUtils; import javax.annotation.Resource; @@ -110,6 +111,7 @@ } @Override + @Transactional(rollbackFor=Exception.class) public void review(ApplyReviewDTO applyReviewDTO) { ApplyForAdmission apply = userApplyForAdmissionMapper.selectById(applyReviewDTO.getId()); if (apply == null) { @@ -129,11 +131,13 @@ //审核通过 apply.setStatus(1); apply.setUpdateTime(LocalDateTime.now()); + apply.setRemark(applyReviewDTO.getRemark()); this.updateById(apply); //先加入商店 Shop shop = new Shop(); BeanUtils.copyProperties(apply, shop); + shop.setId(null); shop.setName(apply.getShopName()); shop.setBusinessTime(apply.getBusinessTime()); shop.setAppUserId(apply.getApplyUserId()); @@ -152,7 +156,7 @@ Phone phone = new Phone(); phone.setType(2);//门店 phone.setPhoneOne(apply.getServiceTel()); - phone.setShopId(shop.getId()); + phone.setShopId(shopId); R phoneR = phoneClient.insert(phone); if (phoneR.getCode()!=200){ throw new RuntimeException("添加店铺客服电话失败"); -- Gitblit v1.7.1