Commit 0467d433 by huang

新接口

parent 161c7fec
package com.gic.haoban.manage.api.dto;
/**
* Created by tgs on 2020/2/9.
*/
public class EnterpriseDetailDTO {
private String wxEnterpriseRelatedId;
private String enterpriseName;
private String wxEnterpriseId;
private String enterpriseId;
private String version;
private int nodeCount;
private String enterpriseLogo;
public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId;
}
public void setWxEnterpriseRelatedId(String wxEnterpriseRelatedId) {
this.wxEnterpriseRelatedId = wxEnterpriseRelatedId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public int getNodeCount() {
return nodeCount;
}
public void setNodeCount(int nodeCount) {
this.nodeCount = nodeCount;
}
public String getEnterpriseLogo() {
return enterpriseLogo;
}
public void setEnterpriseLogo(String enterpriseLogo) {
this.enterpriseLogo = enterpriseLogo;
}
}
package com.gic.haoban.manage.api.service; package com.gic.haoban.manage.api.service;
public interface WxEnterpriseRelatedApiService { import java.util.List;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
public interface WxEnterpriseRelatedApiService {
List<EnterpriseDetailDTO> listEnterpriseByWxEnterpriseId(String wxEnterpriseId);
} }
package com.gic.haoban.manage.service.dao.mapper; package com.gic.haoban.manage.service.dao.mapper;
import java.util.List;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated; import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
public interface WxEnterpriseRelatedMapper { public interface WxEnterpriseRelatedMapper {
...@@ -14,4 +16,6 @@ public interface WxEnterpriseRelatedMapper { ...@@ -14,4 +16,6 @@ public interface WxEnterpriseRelatedMapper {
int updateByPrimaryKeySelective(TabHaobanWxEnterpriseRelated record); int updateByPrimaryKeySelective(TabHaobanWxEnterpriseRelated record);
int updateByPrimaryKey(TabHaobanWxEnterpriseRelated record); int updateByPrimaryKey(TabHaobanWxEnterpriseRelated record);
List<TabHaobanWxEnterpriseRelated> listByWxenterpriseId(String wxEnterpriseId);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.service.impl; package com.gic.haoban.manage.service.service.impl;
import java.util.List;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService; import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
@Service @Service
public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApiService { public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApiService {
private WxEnterpriseRelatedMapper wxEnterpriseRelatedMapper;
@Override
public List<EnterpriseDetailDTO> listEnterpriseByWxEnterpriseId(
String wxEnterpriseId) {
List<TabHaobanWxEnterpriseRelated> relatedList = wxEnterpriseRelatedMapper.listByWxenterpriseId(wxEnterpriseId);
List<EnterpriseDetailDTO> result = EntityUtil.changeEntityListByJSON(EnterpriseDetailDTO.class, relatedList);
//TODO 调熊大接口,获取nodeCount
return result;
}
} }
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