|  |  |  | 
|---|
|  |  |  | package com.doumee.service.business.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Utils; | 
|---|
|  |  |  | import com.doumee.dao.business.YwContractRoomMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.YwContractRoom; | 
|---|
|  |  |  | import com.doumee.dao.business.model.*; | 
|---|
|  |  |  | import com.doumee.service.business.YwContractRoomService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.github.yulichang.wrapper.MPJLambdaWrapper; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.util.CollectionUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 运维合同房源关联信息表Service实现 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void deleteById(Integer id) { | 
|---|
|  |  |  | public void deleteById(Integer id, LoginUserInfo user) { | 
|---|
|  |  |  | ywContractRoomMapper.deleteById(id); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void deleteByIdInBatch(List<Integer> ids) { | 
|---|
|  |  |  | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { | 
|---|
|  |  |  | if (CollectionUtils.isEmpty(ids)) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | QueryWrapper<YwContractRoom> wrapper = new QueryWrapper<>(ywContractRoom); | 
|---|
|  |  |  | return ywContractRoomMapper.selectList(wrapper); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<YwContractRoom> getContractRoom(YwContractRoom ywContractRoom){ | 
|---|
|  |  |  | List<YwContractRoom> ywContractRoomList  = ywContractRoomMapper.selectJoinList(YwContractRoom.class,new MPJLambdaWrapper<YwContractRoom>() | 
|---|
|  |  |  | .selectAll(YwContractRoom.class) | 
|---|
|  |  |  | .selectAs(YwProject::getName, YwRoom::getProjectName) | 
|---|
|  |  |  | .selectAs(YwFloor::getName,YwRoom::getFloorName) | 
|---|
|  |  |  | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) | 
|---|
|  |  |  | .selectAs(YwRoom::getCode,YwContractRoom::getRoomName) | 
|---|
|  |  |  | .leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId) | 
|---|
|  |  |  | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) | 
|---|
|  |  |  | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) | 
|---|
|  |  |  | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) | 
|---|
|  |  |  | .eq(Objects.nonNull(ywContractRoom.getType()),YwContractRoom::getType,ywContractRoom.getType()) | 
|---|
|  |  |  | .eq(Objects.nonNull(ywContractRoom.getContractId()),YwContractRoom::getContractId,ywContractRoom.getContractId())) | 
|---|
|  |  |  | ; | 
|---|
|  |  |  | return ywContractRoomList; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public PageData<YwContractRoom> findPage(PageWrap<YwContractRoom> pageWrap) { | 
|---|
|  |  |  | IPage<YwContractRoom> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); | 
|---|