|
|
@@ -1,14 +1,19 @@
|
|
|
package com.goafanti.customer.service.impl;
|
|
|
|
|
|
import com.goafanti.common.dao.UserArchivesMapper;
|
|
|
+import com.goafanti.common.model.OrganizationContactBook;
|
|
|
import com.goafanti.common.model.UserArchives;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
+import com.goafanti.customer.bo.UserArchivesDetails;
|
|
|
+import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.customer.service.UserArchivesService;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -21,6 +26,8 @@ import java.util.Map;
|
|
|
public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper> implements UserArchivesService {
|
|
|
@Resource
|
|
|
private UserArchivesMapper userArchivesMapper;
|
|
|
+ @Resource
|
|
|
+ private CustomerService customerService;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -33,12 +40,22 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public UserArchives queryByUid(Integer id) {
|
|
|
+ public UserArchives queryByUid(String id) {
|
|
|
UserArchives userArchives =userArchivesMapper.queryByUid(id);
|
|
|
if (userArchives==null)userArchives =new UserArchives();
|
|
|
return userArchives;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object queryByUidAll(String id) {
|
|
|
+ UserArchivesDetails user = customerService.selectUserByUid(id);
|
|
|
+ UserArchives userArchives = queryByUid(id);
|
|
|
+ List<OrganizationContactBook> customerContacts = customerService.findCustomerContacts(id);
|
|
|
+ if (!customerContacts.isEmpty())user.setContactList(customerContacts);
|
|
|
+ BeanUtils.copyProperties(userArchives, user);
|
|
|
+ return user;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 通过ID查询单条数据
|
|
|
*
|