Commit a49e8672 by 徐高华

任务

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