|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.dto.form.IcHouseAddFormDTO; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
@ -37,8 +38,12 @@ public class RentHouseServiceImpl extends BaseServiceImpl<RentHouseDao, RentHous |
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<RentHouseDTO> page(Map<String, Object> params) { |
|
|
|
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); |
|
|
|
IPage<RentHouseEntity> page = baseDao.selectPage( |
|
|
|
getPage(params, FieldConstant.CREATED_TIME, false), |
|
|
|
getWrapper(params) |
|
|
@ -48,6 +53,7 @@ public class RentHouseServiceImpl extends BaseServiceImpl<RentHouseDao, RentHous |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<RentHouseDTO> list(Map<String, Object> params) { |
|
|
|
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); |
|
|
|
List<RentHouseEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(entityList, RentHouseDTO.class); |
|
|
@ -66,6 +72,7 @@ public class RentHouseServiceImpl extends BaseServiceImpl<RentHouseDao, RentHous |
|
|
|
String rentFlag = (String) params.get("rentFlag"); |
|
|
|
String startTime = (String) params.get("startTime"); |
|
|
|
String endTime = (String) params.get("endTime"); |
|
|
|
String customerId = (String) params.get("customerId"); |
|
|
|
|
|
|
|
QueryWrapper<RentHouseEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
|
@ -80,6 +87,7 @@ public class RentHouseServiceImpl extends BaseServiceImpl<RentHouseDao, RentHous |
|
|
|
wrapper.eq(StringUtils.isNotBlank(rentFlag), "RENT_FLAG", rentFlag); |
|
|
|
wrapper.ge(StringUtils.isNotBlank(startTime), "PURCHASE_DATE", startTime); |
|
|
|
wrapper.le(StringUtils.isNotBlank(endTime), "PURCHASE_DATE", endTime); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId); |
|
|
|
|
|
|
|
return wrapper; |
|
|
|
} |
|
|
|