|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
@ -92,9 +93,12 @@ public class IcComplaintsServiceImpl extends BaseServiceImpl<IcComplaintsDao, Ic |
|
|
|
public IcComplaintsDTO get(String id) { |
|
|
|
IcComplaintsEntity entity = baseDao.selectById(id); |
|
|
|
IcComplaintsDTO result = ConvertUtils.sourceToTarget(entity, IcComplaintsDTO.class); |
|
|
|
if (StringUtils.isNotEmpty(entity.getImgs())) { |
|
|
|
if (null != entity.getImgs() && StringUtils.isNotEmpty(entity.getImgs())) { |
|
|
|
result.setImgs(entity.getImgs().split(",")); |
|
|
|
} |
|
|
|
if (null != entity.getCreatedTime()) { |
|
|
|
result.setCreatedTime(DateUtil.formatDate(entity.getCreatedTime())); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
@ -178,9 +182,12 @@ public class IcComplaintsServiceImpl extends BaseServiceImpl<IcComplaintsDao, Ic |
|
|
|
entityList.forEach(entity -> { |
|
|
|
result.forEach(dto -> { |
|
|
|
if (entity.getId().equals(dto.getId())) { |
|
|
|
if(StringUtils.isNotEmpty(entity.getImgs())){ |
|
|
|
if (StringUtils.isNotEmpty(entity.getImgs())) { |
|
|
|
dto.setImgs(entity.getImgs().split(",")); |
|
|
|
} |
|
|
|
if (null != entity.getCreatedTime()) { |
|
|
|
dto.setCreatedTime(DateUtil.formatDate(entity.getCreatedTime())); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|