|
|
@@ -6,6 +6,7 @@ import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.base.entity.MessageNotice;
|
|
|
import com.jpsoft.employment.modules.base.service.MessageNoticeService;
|
|
|
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -26,6 +27,8 @@ public class MessageNoticeController {
|
|
|
|
|
|
@Autowired
|
|
|
private MessageNoticeService messageNoticeService;
|
|
|
+ @Autowired
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
|
|
|
@ApiOperation(value="创建空记录")
|
|
|
@GetMapping("create")
|
|
|
@@ -206,6 +209,7 @@ public class MessageNoticeController {
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ searchParams.put("classify","3");
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("id_","asc"));
|
|
|
@@ -217,13 +221,28 @@ public class MessageNoticeController {
|
|
|
searchParams.put("status",status);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(classify)) {
|
|
|
- searchParams.put("classify",classify);
|
|
|
+// searchParams.put("classify",classify);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(type)) {
|
|
|
searchParams.put("type",type);
|
|
|
}
|
|
|
|
|
|
Page<MessageNotice> page = messageNoticeService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+ for(MessageNotice messageNotice : page.getResult()){
|
|
|
+ if(messageNotice.getStatus()){
|
|
|
+ messageNotice.setStatusName("已审核");
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ messageNotice.setStatusName("未审核");
|
|
|
+ }
|
|
|
+ if(messageNotice.getType().equals("1")){
|
|
|
+ messageNotice.setTypeName("站内通告");
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ messageNotice.setTypeName("微信");
|
|
|
+ }
|
|
|
+ messageNotice.setClassifyName(dataDictionaryService.findNameByCatalogNameAndValue("消息分类",messageNotice.getClassify()));
|
|
|
+ }
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|