|
|
@ -8,12 +8,15 @@ import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.dao.IcComplaintsReplyDao; |
|
|
|
import com.epmet.dto.IcComplaintsReplyDTO; |
|
|
|
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|
|
|
import com.epmet.entity.IcComplaintsReplyEntity; |
|
|
|
import com.epmet.remote.EpmetUserRemoteService; |
|
|
|
import com.epmet.service.IcComplaintsReplyService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@ -27,6 +30,9 @@ import java.util.Map; |
|
|
|
@Service |
|
|
|
public class IcComplaintsReplyServiceImpl extends BaseServiceImpl<IcComplaintsReplyDao, IcComplaintsReplyEntity> implements IcComplaintsReplyService { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private EpmetUserRemoteService remoteService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcComplaintsReplyDTO> page(Map<String, Object> params) { |
|
|
|
IPage<IcComplaintsReplyEntity> page = baseDao.selectPage( |
|
|
@ -62,6 +68,8 @@ public class IcComplaintsReplyServiceImpl extends BaseServiceImpl<IcComplaintsRe |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void save(IcComplaintsReplyDTO dto) { |
|
|
|
IcComplaintsReplyEntity entity = ConvertUtils.sourceToTarget(dto, IcComplaintsReplyEntity.class); |
|
|
|
LoginUserDetailsResultDTO userDetails = remoteService.getLoginUserDetails(); |
|
|
|
entity.setCustomerId(userDetails.getCustomerId()); |
|
|
|
insert(entity); |
|
|
|
} |
|
|
|
|
|
|
|