Commit cf8ab579 authored by 赵啸非's avatar 赵啸非

添加动态列表查询接口

parent 81fe3dd6
......@@ -64,6 +64,23 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
@Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//排序
if(!ObjectUtils.isEmpty(params.getIdList())){
//根据idList进行排序
List<AppEntity> appEntities = new ArrayList<>();
for (Long appId : params.getIdList()) {
for (AppEntity app : list) {
if(appId.equals(app.getId())){
appEntities.add(app);
continue;
}
}
}
if(!ObjectUtils.isEmpty(appEntities)){
list=appEntities;
}
}
//统计站点
list.forEach(item -> {
List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
......
......@@ -56,6 +56,9 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
super.init(model, context);
}
@Override
protected int infoAfter(Long id, Map<String, Object> model, AppEntity entity, Context context) throws AppException {
List<AppEntity> appEntityList = this.service.find(new AppQuery().appCode(entity.getAppCode()), context);
......
......@@ -19,10 +19,9 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":3,
"type":1,
"idList":[22,19,20],
"page":1,
"size":10
"size":-1
}
......
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