Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9f704ea01d
|
@ -1,6 +1,7 @@
|
|||
package io.renren.common.aspect;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.notice.dto.SysNoticeDTO;
|
||||
import io.renren.modules.notice.enums.NoticeStatusEnum;
|
||||
|
@ -200,7 +201,7 @@ public class ActivitiNoticeAspect {
|
|||
*/
|
||||
private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||
Map<String, Object> kv = execution.getVariables();
|
||||
logger.error("表单:" + kv.toString());
|
||||
logger.error("表单:" + JSON.toJSONString(kv));
|
||||
if (work_.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) {
|
||||
logger.error("------------出现重放------------");
|
||||
return;
|
||||
|
@ -229,9 +230,9 @@ public class ActivitiNoticeAspect {
|
|||
String finalCreator = creator;
|
||||
String finalResult = result;
|
||||
Long resourceId = null;
|
||||
if (kv.containsKey("resourceId")) {
|
||||
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
|
||||
resourceId = Long.valueOf(kv.get("resourceId").toString());
|
||||
} else if (kv.containsKey("id")) {
|
||||
} else if (kv.containsKey("id") && kv.get("id") != null) {
|
||||
resourceId = Long.valueOf(kv.get("id").toString());
|
||||
}
|
||||
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
|
||||
|
|
|
@ -78,6 +78,10 @@ public class AbilityCenterController {
|
|||
return new Result().error("联系管理员添加流程");
|
||||
}
|
||||
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
||||
if (index.get("resourceId") == null) {
|
||||
logger.error("未携带资源id");
|
||||
return null;
|
||||
}
|
||||
if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
|
||||
logger.error("重复发起申请");
|
||||
return null;
|
||||
|
|
|
@ -413,7 +413,7 @@ public class CensusControllerV2 {
|
|||
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", dataResource.get("rows"));
|
||||
put("amount", (dataResource != null && dataResource.containsKey("rows") && dataResource.get("rows") != null) ? dataResource.get("rows") : 0);
|
||||
put("type", "总数据数");
|
||||
}
|
||||
});
|
||||
|
@ -431,7 +431,7 @@ public class CensusControllerV2 {
|
|||
});
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
List<Map> lists = (List<Map>) dataResource.get("data");
|
||||
List<Map> lists = (dataResource != null && dataResource.containsKey("data") && dataResource.get("data") != null) ? (List<Map>) dataResource.get("data") : new ArrayList<>();
|
||||
ArrayList<Map> list = new ArrayList<>();
|
||||
lists.forEach(item -> {
|
||||
list.add(new HashMap<String, Object>() {{
|
||||
|
@ -462,10 +462,22 @@ public class CensusControllerV2 {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0L);
|
||||
put("type", "总数据数");
|
||||
}
|
||||
});
|
||||
logger.error("青岛西海岸获取失败");
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("青岛西海岸失败", exception);
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0L);
|
||||
put("type", "总数据数");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
OkHttpClient client1 = new OkHttpClient();
|
||||
|
@ -496,13 +508,46 @@ public class CensusControllerV2 {
|
|||
}).collect(Collectors.toList()));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
logger.error("青岛西海岸获取失败");
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0L);
|
||||
put("type", "总申请次数");
|
||||
}
|
||||
});
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0);
|
||||
put("type", "满足率");
|
||||
}
|
||||
});
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("resourceTop5", new ArrayList<>());
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("青岛西海岸失败", exception);
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0L);
|
||||
put("type", "总申请次数");
|
||||
}
|
||||
});
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0);
|
||||
put("type", "满足率");
|
||||
}
|
||||
});
|
||||
result.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("resourceTop5", new ArrayList<>());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -158,7 +158,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
||||
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||
public void insertWithAttrs(ResourceDTO dto) {
|
||||
ResourceEntity resourceEntity = new ResourceEntity();
|
||||
BeanUtils.copyProperties(dto, resourceEntity);
|
||||
|
@ -171,18 +171,22 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
resourceDao.insert(resourceEntity);
|
||||
BeanUtils.copyProperties(resourceEntity, dto);
|
||||
List<AttrEntity> attrEntities = dto.getInfoList();
|
||||
List<AttrEntity> attrEntities_ = new ArrayList<>();
|
||||
if (attrEntities != null) {
|
||||
attrEntities.forEach(item -> {
|
||||
item.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag());
|
||||
item.setDataResourceId(resourceID);
|
||||
attrDao.insert(item);
|
||||
attrEntities_.add(item);
|
||||
});
|
||||
}
|
||||
resourceEntity.setInfoList(attrEntities_);
|
||||
resourceDao.updateById(resourceEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
||||
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||
public void deleteWithAttrs(JSONObject jsonObject) {
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
||||
List<Long> idList = jsonArray.toJavaList(Long.class);
|
||||
|
@ -196,7 +200,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
||||
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||
public void updateWithAttrs(ResourceDTO dto) {
|
||||
ResourceEntity resourceEntity = new ResourceEntity();
|
||||
BeanUtils.copyProperties(dto, resourceEntity);
|
||||
|
@ -764,7 +768,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
* 同步知识库
|
||||
*/
|
||||
@Override
|
||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
||||
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||
public void KnowledgeBase() {
|
||||
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
||||
final int pageSize = 100;
|
||||
|
|
Loading…
Reference in New Issue