Commit 7f003d14 by fudahua

门店信息包含总部还是代理信息

parent 53bc5050
......@@ -5,6 +5,7 @@ import java.util.List;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.AuditDTO;
import com.gic.haoban.manage.api.dto.BatchAuditLogDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
......@@ -46,6 +47,14 @@ public interface ExternalClerkRelatedApiService {
*/
boolean pushExternalByRelationKey(String relationKey);
/**
* 推送外部联系人 更新次数以及状态
*
* @param relationKey
* @return
*/
ServiceResponse<ExternalClerkRelatedDTO> bindMemberIdExternalByRelationKey(String relationKey, String enterpriseId, String memberId, String unionid);
/**
* 获取企业下的关联关系列表
*
......
......@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.*;
......@@ -74,6 +75,28 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
}
@Override
public ServiceResponse<ExternalClerkRelatedDTO> bindMemberIdExternalByRelationKey(String relationKey, String enterpriseId, String memberId, String unionid) {
ServiceResponse<ExternalClerkRelatedDTO> resp = new ServiceResponse<>();
TabHaobanExternalClerkRelated externalClerkRelated = tabHaobanExternalClerkRelatedMapper.getByRelationKey(relationKey);
if (null == externalClerkRelated) {
resp.setCode(2);
resp.setMessage("relationKey对应的关联关系不存在或删除");
return resp;
}
if (!externalClerkRelated.getEnterpriseId().equals(enterpriseId)) {
resp.setCode(3);
resp.setMessage("relationKey对应的企业与所传会员企业不对应");
return resp;
}
externalClerkRelated.setMemberId(memberId);
externalClerkRelated.setUnionid(unionid);
externalClerkRelated.setUpdateTime(new Date());
tabHaobanExternalClerkRelatedMapper.updateByPrimaryKeySelective(externalClerkRelated);
resp.setResult(EntityUtil.changeEntityNew(ExternalClerkRelatedDTO.class, externalClerkRelated));
return resp;
}
@Override
public List<ExternalClerkRelatedDTO> listExternalClerkByWxUserIdAncExternalUserId(String wxEnterpriseId, String wxUserId, String enterpriseId, String externalUserId) {
List<TabHaobanExternalClerkRelated> list = tabHaobanExternalClerkRelatedMapper.listExternalClerkByWxUserIdAncExternalUserId(wxEnterpriseId, wxUserId, enterpriseId, externalUserId);
return EntityUtil.changeEntityListNew(ExternalClerkRelatedDTO.class, list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment