Commit 5b631aa2 by 徐高华

群发

parent a0027f13
package com.gic.haoban.manage.web.controller.chat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -22,11 +21,13 @@ import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.manage.api.dto.MaterialDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO;
import com.gic.haoban.manage.api.service.MaterialApiService;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService;
import com.gic.haoban.manage.web.vo.chat.GroupChatPlanVO;
......@@ -48,6 +49,8 @@ public class GroupChatPlanController {
private GroupChatPlanApiService groupChatPlanApiService;
@Autowired
private MaterialApiService materialApiService ;
@Autowired
private StaffApiService staffApiService ;
@RequestMapping("add")
public RestResponse<Object> save(@RequestBody GroupChatPlanDTO dto) {
......@@ -118,8 +121,12 @@ public class GroupChatPlanController {
}
// 查询素材列表
List<MaterialDTO> materials = materialApiService.listMaterialByIds(materialIdList);
String[] jsonArr = plan.getStaffIdList().split(",") ;
List<String> staffIds = Arrays.asList(jsonArr) ;
List<StaffDTO> staffList = this.staffApiService.listByIds(staffIds) ;
GroupChatPlanVO vo = EntityUtil.changeEntityByJSON(GroupChatPlanVO.class,plan) ;
vo.setMaterialIdList(materials);
vo.setOwnerList(staffList);
return RestResponse.successResult(vo);
}
......
......@@ -4,6 +4,8 @@ import java.io.Serializable ;
import java.util.List;
import com.gic.haoban.manage.api.dto.MaterialDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO;
/**
*
......@@ -52,8 +54,17 @@ public class GroupChatPlanVO implements Serializable{
// 1代发送 2已发送
private Integer sendFlag;
private List<MaterialDTO> MaterialIdList ;
private List<StaffDTO> ownerList ;
public List<MaterialDTO> getMaterialIdList() {
public List<StaffDTO> getOwnerList() {
return ownerList;
}
public void setOwnerList(List<StaffDTO> ownerList) {
this.ownerList = ownerList;
}
public List<MaterialDTO> getMaterialIdList() {
return MaterialIdList;
}
......
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