| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor=Exception.class) |
| | | public void review(ApplyReviewDTO applyReviewDTO) { |
| | | ApplyForAdmission apply = userApplyForAdmissionMapper.selectById(applyReviewDTO.getId()); |
| | | if (apply == null) { |
| | |
| | | //审核通过 |
| | | 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()); |
| | |
| | | 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("添加店铺客服电话失败"); |