Commit 851049d8 authored by 赵啸非's avatar 赵啸非

修改app克隆

parent f6df6365
package com.mortals.xhx.module.app.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.app.model.AppEntity;
import com.mortals.xhx.module.site.model.SiteEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -9,6 +12,14 @@ import java.util.List;
* @author zxfei
* @date 2022-11-28
*/
@Data
public class AppVo extends BaseEntityLong {
/**
* 适用站点范围数量
*/
private Integer applianceSiteScope;
private List<Long> siteIdList;
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import com.google.common.collect.Maps;
import cn.hutool.core.io.FileUtil;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
......@@ -59,6 +60,18 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private AppVersionService appVersionService;
@Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//统计站点
list.forEach(item->{
List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
// int count = this.count(new AppQuery().appCode(item.getAppCode()), context);
item.setApplianceSiteScope(appEntityList.size());
item.setSiteIdList(appEntityList.stream().map(AppEntity::getSiteId).collect(Collectors.toList()));
});
super.findAfter(params, pageInfo, context, list);
}
@Override
public Rest<String> appDistribute(AppEntity appEntity, Context context) {
SiteEntity siteCache = siteService.getCache(appEntity.getSiteId().toString());
......
......@@ -63,7 +63,7 @@ Accept: application/json
###自助终端应用删除
GET {{baseUrl}}/app/delete?id={{App_id}}
GET {{baseUrl}}/app/delete?id=3
Authorization: {{authToken}}
Accept: application/json
......
......@@ -32,8 +32,8 @@ Content-Type: application/json
{
"appId":1,
"fieldCode":"title2",
"fieldName":"标题2",
"fieldCode":"title1",
"fieldName":"标题1",
"fieldType":"input",
"dataType":"number",
"fieldValue":"zo0",
......
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