|
|
@@ -1,6 +1,10 @@
|
|
|
package com.jpsoft.enterprise.modules.base.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
+import com.jpsoft.enterprise.modules.base.entity.CompanyInfo;
|
|
|
+import com.jpsoft.enterprise.modules.base.entity.PersonInfo;
|
|
|
+import com.jpsoft.enterprise.modules.base.service.CompanyInfoService;
|
|
|
+import com.jpsoft.enterprise.modules.base.service.PersonInfoService;
|
|
|
import com.jpsoft.enterprise.modules.common.utils.PojoUtils;
|
|
|
import com.jpsoft.enterprise.modules.common.dto.Sort;
|
|
|
import com.jpsoft.enterprise.modules.common.dto.MessageResult;
|
|
|
@@ -30,6 +34,10 @@ public class WhisperingWallController {
|
|
|
private WhisperingWallService whisperingWallService;
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
+ @Autowired
|
|
|
+ private PersonInfoService personInfoService;
|
|
|
+ @Autowired
|
|
|
+ private CompanyInfoService companyInfoService;
|
|
|
|
|
|
@ApiOperation(value="创建空记录")
|
|
|
@GetMapping("create")
|
|
|
@@ -224,6 +232,21 @@ public class WhisperingWallController {
|
|
|
}
|
|
|
|
|
|
Page<WhisperingWall> page = whisperingWallService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+ for(WhisperingWall whisperingWall : page.getResult()){
|
|
|
+ PersonInfo personInfoQuestion = personInfoService.get(whisperingWall.getQuestionBy());
|
|
|
+ if(personInfoQuestion != null) {
|
|
|
+// CompanyInfo companyInfoQuestion = companyInfoService.get(personInfoQuestion.getCompanyId());
|
|
|
+ whisperingWall.setQuestionByN(personInfoQuestion.getPersonName());
|
|
|
+// whisperingWall.setQuestionByCompany(companyInfoQuestion.getCompanyName());
|
|
|
+ }
|
|
|
+
|
|
|
+ PersonInfo personInfoAnswer = personInfoService.get(whisperingWall.getAnswerBy());
|
|
|
+ if(personInfoAnswer != null) {
|
|
|
+// CompanyInfo companyInfoAnswer = companyInfoService.get(personInfoAnswer.getCompanyId());
|
|
|
+ whisperingWall.setAnswerByN(personInfoAnswer.getPersonName());
|
|
|
+// whisperingWall.setAnswerByCompany(companyInfoAnswer.getCompanyName());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|