Commit d7416fe9 authored by alex yao's avatar alex yao

fix:【【POE】-【首页】移除插件后更新发布,首页的插件仍可以使用】 --bug=1009895

parent a1e01f79
......@@ -100,7 +100,7 @@ public class BizAgentApplicationPublishConvert {
if (ArrayUtils.isNotEmpty(entity.getUnitIds())) {
model.setUnitIds(JsonUtil.toJson(entity.getUnitIds()));
} else {
model.setUnitIds(JsonUtil.toJson(new ArrayList<>()));
model.setUnitIds(null);
}
if (ObjectUtil.isNotEmpty(entity.getVoiceConfig())) {
model.setVoiceConfig(JsonUtils.serialize(entity.getVoiceConfig()));
......
......@@ -28,6 +28,7 @@ import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.yict.framemax.core.i18n.I18nMessageException;
import cn.com.yict.framemax.data.model.PagingInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
......@@ -165,7 +166,11 @@ public class AgentApplicationRestImpl implements AgentApplicationRest {
searchAgentApplicationDto.setPublishedTime(value.getModifiedTime());
searchAgentApplicationDto.setCreator("官方");
searchAgentApplicationDto.setIsDocumentParsing(value.getIsDocumentParsing());
searchAgentApplicationDto.setUnitIds(value.getUnitIds());
if (!ArrayUtils.isEmpty(value.getUnitIds())) {
searchAgentApplicationDto.setUnitIds(value.getUnitIds());
} else {
searchAgentApplicationDto.setUnitIds(new String[0]);
}
searchAgentApplicationDto.setPoints(new BigDecimal(pointDeductionNum).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP));
return searchAgentApplicationDto;
}).collect(Collectors.toList());
......
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