Commit 01d42593 authored by 赵啸非's avatar 赵啸非

添加服务检测拉起脚本

parent d42a7031
......@@ -24,6 +24,7 @@ import com.mortals.xhx.module.site.service.SiteThemeMatterService;
import com.mortals.xhx.module.site.service.SiteThemeService;
import com.mortals.xhx.utils.SpringUtils;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.util.ObjectUtils;
import java.util.List;
import java.util.stream.Collectors;
......@@ -76,14 +77,17 @@ public class SyncGovMatterDetailThread implements Runnable {
if (rest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream().filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false")).collect(Collectors.toList());
log.info("同步站点事项到站点.....");
//查询站点事项相关
List<SiteEntity> siteEntities = siteService.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
//删除站点与政务事项相关项
for (SiteEntity site : siteEntities) {
/* for (SiteEntity site : siteEntities) {
siteMatterService.deleteBysiteIdAndSource(site.getId(), SourceEnum.政务网.getValue(), context);
}
}*/
//重新添加
if (ObjectUtils.isEmpty(siteEntities)) {
log.info("同步站点事项到站点.....");
for (SiteEntity site : siteEntities) {
List<SiteMatterEntity> siteMatterList = matterEntityList.stream().map(item -> {
return matterService.switchMatterToSiteMatter(item, site, context).getData();
......@@ -95,7 +99,7 @@ public class SyncGovMatterDetailThread implements Runnable {
}
}
log.info("同步站点事项到站点完成.....");
}
log.info("同步站点事项详细条数....." + unSyncDetailMatterList.size());
unSyncDetailMatterList.parallelStream().forEach(matterEntity -> {
matterService.buildMatterDetail(matterEntity, context);
......
......@@ -112,7 +112,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//todo
//更新关联站点名称
updateAssociateSiteName(oldSite, entity, context);
refresh = true;
}
......@@ -174,14 +173,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
protected void saveBefore(SiteEntity entity, Context context) throws AppException {
List<SiteEntity> siteEntities = this.find(new SiteQuery().areaCode(entity.getAreaCode()));
entity.setSiteCode(entity.getAreaCode() + Constant.SITE_SPLIT_MARK + StringUtils.lpad(siteEntities.size() + 1, Constant.SITE_CODE_NUM));
super.saveBefore(entity, context);
}
@Override
protected void saveAfter(SiteEntity entity, Context context) throws AppException {
//刷新站点树
......@@ -216,7 +210,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
}
}
//查詢指定的站點ids
log.info(String.format("siteQuery==>%s", JSON.toJSONString(siteQuery)));
List<SiteEntity> siteList = this.find(siteQuery);
......@@ -314,6 +307,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
protected void updateAfter(SiteEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
//刷新站点树
Rest<String> rest = userFeign.synchSiteAuth();
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
......@@ -332,7 +326,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
refresh = false;
}
super.updateAfter(entity, context);
}
......@@ -561,11 +554,11 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
log.info("需要添加事项数量====" + subList.size());
//差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) {
/* for (MatterEntity matterEntity : subList) {
for (MatterEntity matterEntity : subList) {
DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterService.save(matterEntity, context);
}*/
}
List<List<MatterEntity>> partition = ListUtil.partition(subList, 100);
for (List<MatterEntity> matterEntityList : partition) {
......
......@@ -18,6 +18,10 @@ POST {{baseUrl}}/app/list
Content-Type: application/json
{
"siteId":1,
"idList": [1,2,3,4],
"type": 1,
"shelves": 1,
"page":1,
"size":-1
}
......
......@@ -18,9 +18,8 @@ POST {{baseUrl}}/app/dataset/list
Content-Type: application/json
{
"appId": 20,
"fieldName": "标题",
"fieldValue": "管理办法",
"siteId": 1,
"appId": 2,
"page": 1,
"size": 10
}
......
......@@ -13,5 +13,9 @@
},
"base-yibintest": {
"baseUrl": "http://192.168.2.169:11078/base"
},
"base-yibin": {
"baseUrl": "http://10.12.185.213:11078/base"
}
}
\ No newline at end of file
......@@ -126,7 +126,7 @@ client.global.set("Matter_id", JSON.parse(response.body).data.id);
%}
###基础事项查看
GET {{baseUrl}}/matter/info?id=5809
GET {{baseUrl}}/matter/info?id=34000
Accept: application/json
###基础事项编辑
......
......@@ -4,8 +4,8 @@ POST {{baseUrl}}/skin/base/list
Content-Type: application/json
{
"page":1,
"size":10
"page": 1,
"size": 10
}
......@@ -15,20 +15,19 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"categoryId":1,
"productId":1,
"name": "321311",
"productName":"22",
"categoryId": 1,
"productId": 5,
"name": "导视机",
"imageResolution": "1",
"productName": "22",
"skinFieldList": [
{
"fieldCode":"2psfz0",
"fieldName":"wp1zqc",
"fieldType":"1",
"fieldValue":"srpx1u"
}
"fieldCode": "2psfz0",
"fieldName": "wp1zqc",
"fieldType": "1",
"fieldValue": "srpx1u"
}
]
}
> {%
......
......@@ -5,7 +5,7 @@ Content-Type: application/json
{
"loginName":"admin",
"password":"adsmile",
"password":"admin",
"securityCode":"8888"
}
......
......@@ -7,5 +7,9 @@
},
"portal-test": {
"baseUrl": "http://192.168.0.98:11078/zwfw"
},
"portal-yibin": {
"baseUrl": "http://10.12.185.213:11078/zwfw"
}
}
\ No newline at end of file
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