手机端-搜索中心-知识分享-获取创建人、创建时间。

This commit is contained in:
wangzhijiang
2023-06-08 09:27:43 +08:00
parent 38ffb91ffc
commit 1d2d21ebe6
4 changed files with 7 additions and 3 deletions
@@ -16,7 +16,6 @@ import java.util.Map;
@Api(tags = "手机端-搜索中心")
@RestController
@RequestMapping("/phone/search")
@Slf4j
public class SearchCenterController {
@Autowired
@@ -16,12 +16,12 @@ import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
import com.jero.modules.system.service.ISysUserService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
@Component
@Service
public class SearchCenterServiceImpl implements ISearchCenterService {
@Autowired
@@ -129,6 +129,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
problemKnowledgeBaseEO.setReleaseTime(now);
problemKnowledgeBaseEO.setCreateBy(currentUser.getUsername());
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
save(problemKnowledgeBaseEO);
@@ -428,6 +429,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
convertAfterMap.put("create_time",new Date());
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
}
}
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.es.JeroElasticsearchTemplate;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.collection.entity.OnlCgformCollection;
@@ -1442,6 +1443,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapSource.put("content","");
}*/
}
Long create_time = (Long) mapSource.get("create_time");
mapSource.put("create_time_str",DateUtils.formatTime(create_time));
mapList.add(mapSource);
}