Commit a49e8672 by 徐高华

任务

parent 832d0b42
......@@ -42,8 +42,8 @@ public class GroupChatPlanController {
@Autowired
private GroupChatPlanApiService groupChatPlanApiService;
@Autowired
private MaterialApiService materialApiService ;
private MaterialApiService materialApiService;
@RequestMapping("total-list")
public RestResponse<Object> totalList(String clerkId, String wxEnterpriseId, String enterpriseId,
BasePageInfo basePageInfo) {
......@@ -57,13 +57,7 @@ public class GroupChatPlanController {
}
@RequestMapping("owner-list")
public RestResponse<Object> ownerList(Long planId, String clerkId, String wxEnterpriseId, String enterpriseId,
BasePageInfo basePageInfo) {
GroupChatPlanSearchQDTO qdto = new GroupChatPlanSearchQDTO();
qdto.setWxEnterpriseId(wxEnterpriseId);
qdto.setEnterpriseId(enterpriseId);
qdto.setClerkId(clerkId);
qdto.setPlanId(planId);
public RestResponse<Object> ownerList(GroupChatPlanSearchQDTO qdto, BasePageInfo basePageInfo) {
ServiceResponse<Page<GroupChatPlanOwnerLogDTO>> page = this.groupChatPlanApiService.listOwnerLogPageForWxa(qdto,
basePageInfo);
return RestResponse.successResult(page.getResult());
......@@ -74,7 +68,7 @@ public class GroupChatPlanController {
this.groupChatPlanApiService.reflushSendInfo(ownLogId);
return RestResponse.successResult();
}
@RequestMapping("detail")
public RestResponse<Object> detail(Long planId) {
ServiceResponse<GroupChatPlanDTO> linkResp = this.groupChatPlanApiService.detail(planId);
......@@ -82,24 +76,24 @@ public class GroupChatPlanController {
return RestResponse.failure("1", "计划不存在");
}
GroupChatPlanDTO plan = linkResp.getResult();
String content = plan.getChatContent() ;
JSONArray array = JSONArray.parseArray(content) ;
String content = plan.getChatContent();
JSONArray array = JSONArray.parseArray(content);
List<String> materialIdList = new ArrayList<>();
for(int i=0;i<array.size();i++) {
JSONObject json = array.getJSONObject(i) ;
materialIdList.add(json.getString("relation_id")) ;
for (int i = 0; i < array.size(); i++) {
JSONObject json = array.getJSONObject(i);
materialIdList.add(json.getString("relation_id"));
}
//查询素材列表
// 查询素材列表
List<MaterialDTO> materials = materialApiService.listMaterialByIds(materialIdList);
Map<String,Object> retMap = new HashMap<>();
retMap.put("plan", plan) ;
retMap.put("materialList", materials) ;
Map<String, Object> retMap = new HashMap<>();
retMap.put("plan", plan);
retMap.put("materialList", materials);
return RestResponse.successResult(retMap);
}
@RequestMapping("owner-do-list")
public RestResponse<Object> ownerDoList(Long planId, String clerkId, String wxEnterpriseId, String enterpriseId,Long ownLogId ,
BasePageInfo basePageInfo) {
public RestResponse<Object> ownerDoList(Long planId, String clerkId, String wxEnterpriseId, String enterpriseId,
Long ownLogId, BasePageInfo basePageInfo) {
GroupChatPlanSearchQDTO qdto = new GroupChatPlanSearchQDTO();
qdto.setWxEnterpriseId(wxEnterpriseId);
qdto.setEnterpriseId(enterpriseId);
......
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