Commit 73ea5f5d authored by 赵啸非's avatar 赵啸非

添加公司背景图片字段

parent 4f7dbe3d
...@@ -86,7 +86,34 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp ...@@ -86,7 +86,34 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
@Autowired @Autowired
private LabelsService labelsService; private LabelsService labelsService;
@Override
protected void findAfter(CompanyEntity params,PageInfo pageInfo, Context context, List<CompanyEntity> list) throws AppException {
fillSubData(list);
super.findAfter(params,pageInfo, context, list);
}
@Override
protected void findAfter(CompanyEntity params, Context context, List<CompanyEntity> list) throws AppException {
fillSubData(list);
super.findAfter(params, context, list);
}
private void fillSubData(List<CompanyEntity> list) {
List<Long> idList = list.stream().map(i -> i.getId()).collect(Collectors.toList());
if(ObjectUtils.isEmpty(idList))return;
Map<Long, List<CompanyLabelsEntity>> companyLabelsListMap = companyLabelsService
.find(new CompanyLabelsQuery().companyIdList(idList)).parallelStream()
.collect(Collectors.groupingBy(CompanyLabelsEntity::getCompanyId));
List<CompanyPatentEntity> companyPatentEntities = companyPatentService.find(new CompanyPatentQuery().companyIdList(idList));
Map<Long, List<CompanyPatentEntity>> companyPatentListMap = companyPatentEntities.parallelStream().collect((Collectors.groupingBy(CompanyPatentEntity::getCompanyId)));
list.forEach(item -> {
item.setCompanyLabelsList(companyLabelsListMap.get(item.getId()));
item.setCompanyPatentsList(companyPatentListMap.get(item.getId()));
});
}
/*
@Override @Override
protected void findAfter(CompanyEntity params, PageInfo pageInfo, Context context, List<CompanyEntity> list) throws AppException { protected void findAfter(CompanyEntity params, PageInfo pageInfo, Context context, List<CompanyEntity> list) throws AppException {
...@@ -95,6 +122,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp ...@@ -95,6 +122,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
item.setCompanyPatentsList(companyPatentEntities); item.setCompanyPatentsList(companyPatentEntities);
}).count(); }).count();
} }
*/
@Override @Override
protected void saveAfter(CompanyEntity entity, Context context) throws AppException { protected void saveAfter(CompanyEntity entity, Context context) throws AppException {
......
...@@ -14,10 +14,11 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -14,10 +14,11 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###公司列表 ###公司列表
POST {{baseUrl}}/company/list POST {{baseUrl}}/company/interlist
Content-Type: application/json Content-Type: application/json
{ {
"id": 5,
"page":1, "page":1,
"size":10 "size":10
} }
......
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