|
@@ -29,6 +29,11 @@ import com.goafanti.common.dao.UserFollowBusinessMapper;
|
|
|
import com.goafanti.common.dao.UserFollowMapper;
|
|
import com.goafanti.common.dao.UserFollowMapper;
|
|
|
import com.goafanti.common.dao.UserIdentityMapper;
|
|
import com.goafanti.common.dao.UserIdentityMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
|
|
+import com.goafanti.common.enums.DeleteStatus;
|
|
|
|
|
+import com.goafanti.common.enums.IdentityProcess;
|
|
|
|
|
+import com.goafanti.common.enums.MemberStatus;
|
|
|
|
|
+import com.goafanti.common.enums.UserLevel;
|
|
|
|
|
+import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.OrganizationContactBook;
|
|
import com.goafanti.common.model.OrganizationContactBook;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
@@ -51,6 +56,7 @@ import com.goafanti.customer.bo.CustomerPersonalDetailBo;
|
|
|
import com.goafanti.customer.bo.CustomerSimpleBo;
|
|
import com.goafanti.customer.bo.CustomerSimpleBo;
|
|
|
import com.goafanti.customer.bo.FollowBusinessBo;
|
|
import com.goafanti.customer.bo.FollowBusinessBo;
|
|
|
import com.goafanti.customer.bo.FollowListBo;
|
|
import com.goafanti.customer.bo.FollowListBo;
|
|
|
|
|
+import com.goafanti.customer.bo.StatisticBo;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@@ -77,7 +83,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
|
cli.setType(AFTConstants.USER_TYPE_PERSONAL);
|
|
cli.setType(AFTConstants.USER_TYPE_PERSONAL);
|
|
|
cli.setAid(TokenManager.getAdminId());
|
|
cli.setAid(TokenManager.getAdminId());
|
|
|
- cli.setShareType(String.valueOf(AFTConstants.SHARE_TYPE_PRIVATE));
|
|
|
|
|
|
|
+ cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList","selectPersonalCustomerCount",params,pageNo,pageSize);
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList","selectPersonalCustomerCount",params,pageNo,pageSize);
|
|
@@ -88,7 +94,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
public Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
public Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
|
cli.setType(AFTConstants.USER_TYPE_PERSONAL);
|
|
cli.setType(AFTConstants.USER_TYPE_PERSONAL);
|
|
|
cli.setAid(TokenManager.getAdminId());
|
|
cli.setAid(TokenManager.getAdminId());
|
|
|
- cli.setShareType(String.valueOf(AFTConstants.SHARE_TYPE_PUBLIC));
|
|
|
|
|
|
|
+ cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList","selectPersonalCustomerCount",params,pageNo,pageSize);
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList","selectPersonalCustomerCount",params,pageNo,pageSize);
|
|
@@ -108,7 +114,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
|
cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
|
|
cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
|
|
|
cli.setAid(TokenManager.getAdminId());
|
|
cli.setAid(TokenManager.getAdminId());
|
|
|
- cli.setShareType(String.valueOf(AFTConstants.SHARE_TYPE_PRIVATE));
|
|
|
|
|
|
|
+ cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
|
|
@@ -119,7 +125,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
public Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
public Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
|
|
|
cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
|
|
cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
|
|
|
cli.setAid(TokenManager.getAdminId());
|
|
cli.setAid(TokenManager.getAdminId());
|
|
|
- cli.setShareType(String.valueOf(AFTConstants.SHARE_TYPE_PUBLIC));
|
|
|
|
|
|
|
+ cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
|
|
@@ -186,23 +192,23 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
String identifyId = UUID.randomUUID().toString();
|
|
String identifyId = UUID.randomUUID().toString();
|
|
|
user.setId(uid);
|
|
user.setId(uid);
|
|
|
user.setIdentifyName(name);
|
|
user.setIdentifyName(name);
|
|
|
- user.setSource(1);
|
|
|
|
|
|
|
+ user.setSource(AFTConstants.USER_SOURCE_CREATE);
|
|
|
user.setNickname(name);
|
|
user.setNickname(name);
|
|
|
- user.setStatus(0);
|
|
|
|
|
- user.setShareType(0);
|
|
|
|
|
|
|
+ user.setStatus(AFTConstants.USER_STATUS_NORMAL);
|
|
|
|
|
+ user.setShareType(AFTConstants.NO);
|
|
|
user.setAid(TokenManager.getAdminId());
|
|
user.setAid(TokenManager.getAdminId());
|
|
|
user.setType(type);
|
|
user.setType(type);
|
|
|
- user.setCurrentMemberStatus(0);
|
|
|
|
|
- user.setLvl(1);
|
|
|
|
|
|
|
+ user.setCurrentMemberStatus(MemberStatus.NORMAL.getCode());
|
|
|
|
|
+ user.setLvl(UserLevel.CERTIFIED.getCode());
|
|
|
user.setSocietyTag(societyTag);
|
|
user.setSocietyTag(societyTag);
|
|
|
user.setCreateTime(now);
|
|
user.setCreateTime(now);
|
|
|
user.setUpdateTime(now);
|
|
user.setUpdateTime(now);
|
|
|
user.setMobile(contactMobile);
|
|
user.setMobile(contactMobile);
|
|
|
user.setPassword(AFTConstants.INITIALPASSWORD);
|
|
user.setPassword(AFTConstants.INITIALPASSWORD);
|
|
|
- user.setIsMember(0);
|
|
|
|
|
- user.setBusinessAudit(0);
|
|
|
|
|
|
|
+ user.setIsMember(AFTConstants.YES);
|
|
|
|
|
+ user.setBusinessAudit(AFTConstants.NO);
|
|
|
passwordUtil.encryptPassword(user);
|
|
passwordUtil.encryptPassword(user);
|
|
|
- if(type == 0){
|
|
|
|
|
|
|
+ if(type == UserType.PERSONAL.getCode()){
|
|
|
if(userMapper.checkUser("", "", contactMobile, type).size()>0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name,""));
|
|
if(userMapper.checkUser("", "", contactMobile, type).size()>0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name,""));
|
|
|
UserIdentity ui = new UserIdentity();
|
|
UserIdentity ui = new UserIdentity();
|
|
|
ui.setId(identifyId);
|
|
ui.setId(identifyId);
|
|
@@ -210,12 +216,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
ui.setContacts(contacts);
|
|
ui.setContacts(contacts);
|
|
|
ui.setContactMobile(contactMobile);
|
|
ui.setContactMobile(contactMobile);
|
|
|
ui.setUsername(name);
|
|
ui.setUsername(name);
|
|
|
- ui.setExpert(0);
|
|
|
|
|
- ui.setCelebrity(0);
|
|
|
|
|
- ui.setInternational(0);
|
|
|
|
|
- ui.setAuditStatus(5);//认证个人
|
|
|
|
|
|
|
+ ui.setExpert(AFTConstants.NO);
|
|
|
|
|
+ ui.setCelebrity(AFTConstants.NO);
|
|
|
|
|
+ ui.setInternational(AFTConstants.NO);
|
|
|
|
|
+ ui.setAuditStatus(IdentityProcess.SUCCESS.getCode());//认证个人
|
|
|
userIdentityMapper.insert(ui);
|
|
userIdentityMapper.insert(ui);
|
|
|
- }else if(type == 1){
|
|
|
|
|
|
|
+ }else if(type == UserType.ORGANIZATION.getCode()){
|
|
|
if(userMapper.judgeCustomerByName(name)>0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name,""));
|
|
if(userMapper.judgeCustomerByName(name)>0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name,""));
|
|
|
// 创建企业认证信息
|
|
// 创建企业认证信息
|
|
|
OrganizationIdentity oi = new OrganizationIdentity();
|
|
OrganizationIdentity oi = new OrganizationIdentity();
|
|
@@ -224,10 +230,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
oi.setUid(uid);
|
|
oi.setUid(uid);
|
|
|
oi.setContacts(contacts);
|
|
oi.setContacts(contacts);
|
|
|
oi.setContactMobile(contactMobile);
|
|
oi.setContactMobile(contactMobile);
|
|
|
- oi.setHighTechZone(0);
|
|
|
|
|
- oi.setInternational(0);
|
|
|
|
|
- oi.setListed(0);
|
|
|
|
|
- oi.setAuditStatus(5); //实名企业
|
|
|
|
|
|
|
+ oi.setHighTechZone(AFTConstants.NO);
|
|
|
|
|
+ oi.setInternational(AFTConstants.NO);
|
|
|
|
|
+ oi.setListed(AFTConstants.NO);
|
|
|
|
|
+ oi.setAuditStatus(IdentityProcess.SUCCESS.getCode()); //实名企业
|
|
|
organizationIdentityMapper.insert(oi);
|
|
organizationIdentityMapper.insert(oi);
|
|
|
}
|
|
}
|
|
|
userMapper.insert(user);
|
|
userMapper.insert(user);
|
|
@@ -265,6 +271,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
user.setCompanyLogoUrl(bo.getCompanyLogoUrl());
|
|
user.setCompanyLogoUrl(bo.getCompanyLogoUrl());
|
|
|
user.setIntroduction(bo.getIntroduction());
|
|
user.setIntroduction(bo.getIntroduction());
|
|
|
user.setUpdateTime(new Date());
|
|
user.setUpdateTime(new Date());
|
|
|
|
|
+ user.setBusinessAudit(bo.getBusinessAudit());
|
|
|
} catch (IllegalAccessException |InvocationTargetException e) {
|
|
} catch (IllegalAccessException |InvocationTargetException e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -284,6 +291,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
user.setHeadPortraitUrl(bo.getHeadPortraitUrl());
|
|
user.setHeadPortraitUrl(bo.getHeadPortraitUrl());
|
|
|
user.setIntroduction(bo.getIntroduction());
|
|
user.setIntroduction(bo.getIntroduction());
|
|
|
user.setUpdateTime(new Date());
|
|
user.setUpdateTime(new Date());
|
|
|
|
|
+ user.setBusinessAudit(bo.getBusinessAudit());
|
|
|
} catch (InvocationTargetException | IllegalAccessException e) {
|
|
} catch (InvocationTargetException | IllegalAccessException e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -329,7 +337,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
userFollow.setId(followId);
|
|
userFollow.setId(followId);
|
|
|
userFollow.setAid(TokenManager.getAdminId());
|
|
userFollow.setAid(TokenManager.getAdminId());
|
|
|
userFollow.setContactType(Integer.parseInt(fbb.getContactType()));
|
|
userFollow.setContactType(Integer.parseInt(fbb.getContactType()));
|
|
|
- userFollow.setEffective(0);
|
|
|
|
|
|
|
+ userFollow.setEffective(DeleteStatus.UNDELETE.getCode());
|
|
|
try {
|
|
try {
|
|
|
userFollow.setCreateTime(format.parse(fbb.getFollowTime()));
|
|
userFollow.setCreateTime(format.parse(fbb.getFollowTime()));
|
|
|
} catch (ParseException e) {
|
|
} catch (ParseException e) {
|
|
@@ -509,7 +517,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
public int deleteFollow(String followId) {
|
|
public int deleteFollow(String followId) {
|
|
|
UserFollow uf = new UserFollow();
|
|
UserFollow uf = new UserFollow();
|
|
|
uf.setId(followId);
|
|
uf.setId(followId);
|
|
|
- uf.setEffective(1);
|
|
|
|
|
|
|
+ uf.setEffective(DeleteStatus.DELETED.getCode());
|
|
|
return userFollowMapper.updateByPrimaryKeySelective(uf);
|
|
return userFollowMapper.updateByPrimaryKeySelective(uf);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -588,20 +596,20 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
User user = new User();
|
|
User user = new User();
|
|
|
user.setId(uid);
|
|
user.setId(uid);
|
|
|
user.setIdentifyName(bo.getIdentifyName());
|
|
user.setIdentifyName(bo.getIdentifyName());
|
|
|
- user.setSource(1);
|
|
|
|
|
|
|
+ user.setSource(AFTConstants.USER_SOURCE_CREATE);
|
|
|
user.setNickname(bo.getIdentifyName());
|
|
user.setNickname(bo.getIdentifyName());
|
|
|
- user.setStatus(0);
|
|
|
|
|
- user.setShareType(0);
|
|
|
|
|
|
|
+ user.setStatus(AFTConstants.USER_STATUS_CANCEL);
|
|
|
|
|
+ user.setShareType(AFTConstants.USER_SHARE_PRIVATE);
|
|
|
user.setAid(TokenManager.getAdminId());
|
|
user.setAid(TokenManager.getAdminId());
|
|
|
user.setType(Integer.parseInt(bo.getCustomerType()));
|
|
user.setType(Integer.parseInt(bo.getCustomerType()));
|
|
|
- user.setCurrentMemberStatus(0);
|
|
|
|
|
- user.setLvl(1);
|
|
|
|
|
|
|
+ user.setCurrentMemberStatus(MemberStatus.NORMAL.getCode());
|
|
|
|
|
+ user.setLvl(UserLevel.CERTIFIED.getCode());
|
|
|
user.setCreateTime(now);
|
|
user.setCreateTime(now);
|
|
|
user.setUpdateTime(now);
|
|
user.setUpdateTime(now);
|
|
|
user.setMobile(bo.getMobile());
|
|
user.setMobile(bo.getMobile());
|
|
|
user.setPassword(AFTConstants.INITIALPASSWORD);
|
|
user.setPassword(AFTConstants.INITIALPASSWORD);
|
|
|
- user.setIsMember(0);
|
|
|
|
|
- user.setBusinessAudit(0);
|
|
|
|
|
|
|
+ user.setIsMember(AFTConstants.NO);
|
|
|
|
|
+ user.setBusinessAudit(AFTConstants.NO);
|
|
|
passwordUtil.encryptPassword(user);
|
|
passwordUtil.encryptPassword(user);
|
|
|
userMapper.insert(user);
|
|
userMapper.insert(user);
|
|
|
}
|
|
}
|
|
@@ -616,10 +624,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
ui.setContacts(bo.getContacts());
|
|
ui.setContacts(bo.getContacts());
|
|
|
ui.setContactMobile(bo.getMobile());
|
|
ui.setContactMobile(bo.getMobile());
|
|
|
ui.setUsername(bo.getIdentifyName());
|
|
ui.setUsername(bo.getIdentifyName());
|
|
|
- ui.setExpert(0);
|
|
|
|
|
- ui.setCelebrity(0);
|
|
|
|
|
- ui.setInternational(0);
|
|
|
|
|
- ui.setAuditStatus(0);
|
|
|
|
|
|
|
+ ui.setExpert(AFTConstants.NO);
|
|
|
|
|
+ ui.setCelebrity(AFTConstants.NO);
|
|
|
|
|
+ ui.setInternational(AFTConstants.NO);
|
|
|
|
|
+ ui.setAuditStatus(5);
|
|
|
userIdentityMapper.insert(ui);
|
|
userIdentityMapper.insert(ui);
|
|
|
}else if(type.equals(AFTConstants.USER_TYPE_ORGANIZATION)){
|
|
}else if(type.equals(AFTConstants.USER_TYPE_ORGANIZATION)){
|
|
|
// 创建企业认证信息
|
|
// 创建企业认证信息
|
|
@@ -629,9 +637,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
oi.setUid(uid);
|
|
oi.setUid(uid);
|
|
|
oi.setContacts(bo.getContacts());
|
|
oi.setContacts(bo.getContacts());
|
|
|
oi.setContactMobile(bo.getMobile());
|
|
oi.setContactMobile(bo.getMobile());
|
|
|
- oi.setHighTechZone(0);
|
|
|
|
|
- oi.setInternational(0);
|
|
|
|
|
- oi.setListed(0);
|
|
|
|
|
|
|
+ oi.setHighTechZone(AFTConstants.NO);
|
|
|
|
|
+ oi.setInternational(AFTConstants.NO);
|
|
|
|
|
+ oi.setListed(AFTConstants.NO);
|
|
|
oi.setAuditStatus(5); //实名企业
|
|
oi.setAuditStatus(5); //实名企业
|
|
|
organizationIdentityMapper.insert(oi);
|
|
organizationIdentityMapper.insert(oi);
|
|
|
}
|
|
}
|
|
@@ -667,13 +675,59 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements
|
|
|
User user = new User();
|
|
User user = new User();
|
|
|
user.setId(uid);
|
|
user.setId(uid);
|
|
|
if(operatorType.equals(AFTConstants.USER_TRANSFER_TO_PUBLIC)){
|
|
if(operatorType.equals(AFTConstants.USER_TRANSFER_TO_PUBLIC)){
|
|
|
- user.setShareType(AFTConstants.SHARE_TYPE_PUBLIC);
|
|
|
|
|
|
|
+ user.setShareType(AFTConstants.USER_SHARE_PUBLIC);
|
|
|
}else if(operatorType.equals(AFTConstants.USER_RECEIVE)){
|
|
}else if(operatorType.equals(AFTConstants.USER_RECEIVE)){
|
|
|
user.setAid(TokenManager.getAdminId());
|
|
user.setAid(TokenManager.getAdminId());
|
|
|
- user.setShareType(AFTConstants.SHARE_TYPE_PRIVATE);
|
|
|
|
|
|
|
+ user.setShareType(AFTConstants.USER_SHARE_PRIVATE);
|
|
|
}else if(operatorType.equals(AFTConstants.USER_DELETE)){
|
|
}else if(operatorType.equals(AFTConstants.USER_DELETE)){
|
|
|
user.setStatus(AFTConstants.USER_STATUS_CANCEL);
|
|
user.setStatus(AFTConstants.USER_STATUS_CANCEL);
|
|
|
}
|
|
}
|
|
|
return userMapper.updateByPrimaryKeySelective(user);
|
|
return userMapper.updateByPrimaryKeySelective(user);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depId ,Integer pageNo, Integer pageSize) {
|
|
|
|
|
+ Map<String,Object> params = new HashMap<String,Object>();
|
|
|
|
|
+ if(null != sDate) params.put("sDate", sDate);
|
|
|
|
|
+ if(null != eDate) params.put("eDate", eDate);
|
|
|
|
|
+ if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
|
|
|
|
|
+ Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("customerStatisticsList", "customerStatisticsCount", params, pageNo, pageSize);
|
|
|
|
|
+ return page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate, String businessGlossoryId, String depId ,Integer pageNo, Integer pageSize) {
|
|
|
|
|
+ Map<String,Object> params = new HashMap<String,Object>();
|
|
|
|
|
+ if(null != sDate) params.put("sDate", sDate);
|
|
|
|
|
+ if(null != eDate) params.put("eDate", eDate);
|
|
|
|
|
+ if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
|
|
|
|
|
+ if(StringUtils.isNoneBlank(businessGlossoryId)) params.put("businessGlossoryId", businessGlossoryId);
|
|
|
|
|
+ Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("businessStatisticList", "businessStatisticCount", params, pageNo, pageSize);
|
|
|
|
|
+ return page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String businessGlossoryId, String depId ,Integer pageNo, Integer pageSize) {
|
|
|
|
|
+ Map<String,Object> params = new HashMap<String,Object>();
|
|
|
|
|
+ if(null != sDate) params.put("sDate", sDate);
|
|
|
|
|
+ if(null != eDate) params.put("eDate", eDate);
|
|
|
|
|
+ if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
|
|
|
|
|
+ if(StringUtils.isNoneBlank(businessGlossoryId)) params.put("businessGlossoryId", businessGlossoryId);
|
|
|
|
|
+ Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("followStatisticList", "followStatisticCount", params, pageNo, pageSize);
|
|
|
|
|
+ List<StatisticBo> list = (List<StatisticBo>)page.getList();
|
|
|
|
|
+ StatisticBo statisticBo = null;
|
|
|
|
|
+ for(StatisticBo bo:list){
|
|
|
|
|
+ statisticBo = userMapper.selectFollowAndCustomerCount(bo.getAid());
|
|
|
|
|
+ bo.setCustomerNo(statisticBo.getCustomerNo());
|
|
|
|
|
+ bo.setFollowNo(statisticBo.getFollowNo());
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ page.setList(list);
|
|
|
|
|
+ return page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|