Commit 18a4cd41 by fudahua

会员关联提示

parent cc21615d
......@@ -21,7 +21,8 @@ public interface WxEnterpriseRelatedMapper {
int updateByPrimaryKey(TabHaobanWxEnterpriseRelated record);
List<TabHaobanWxEnterpriseRelated> listByWxenterpriseId(String wxEnterpriseId);
@Deprecated
TabHaobanWxEnterpriseRelated findOneByEnterpriseId(String enterpriseId);
List<TabHaobanWxEnterpriseRelated> queryAllHasGicEnterpriseId();
......
......@@ -166,7 +166,15 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
@Override
public EnterpriseDetailDTO getByEnterpriseId(String enterpriseId) {
TabHaobanWxEnterpriseRelated tab = wxEnterpriseRelatedMapper.findOneByEnterpriseId(enterpriseId);
List<TabHaobanWxEnterprise> wxEnterprises = wxEnterpriseRelatedService.listByEnterpriseId(enterpriseId);
if (CollectionUtils.isEmpty(wxEnterprises)) {
return null;
}
if (wxEnterprises.size() > 1) {
logger.info("改企业关联多个企业,需要带上wxEnterpriseId");
return null;
}
TabHaobanWxEnterprise tab = wxEnterprises.get(0);
EnterpriseDetailDTO detail = EntityUtil.changeEntityByJSON(EnterpriseDetailDTO.class, tab);
return detail;
}
......
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