huliguo
4 天以前 6acf6357094588946b5528f1ef1ed84a0f1037fd
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("添加店铺客服电话失败");