Commit 752a2b56 by 周海峰

no message

parent bc68f0b9
package com.metro.auth.platform.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.Set;
@Data
@ApiModel(value="NoticeGroupAccountSubscriberForm", description="公共账号订阅所需Form")
@NoArgsConstructor
@AllArgsConstructor
public class NoticeGroupAccountSubscriberDTO {
@ApiModelProperty(dataType="Integer", example="1",name="id", value="公共账号订阅id")
private Integer id;
@ApiModelProperty(dataType="Integer", example="1",name="accountId", value="公共账号id")
private Integer accountId;
@ApiModelProperty(dataType="String", example="1",name="userId", value="人员id")
private String userId;
@ApiModelProperty(dataType="Date", example="1",name="createTime", value="创建时间")
private Date createTime;
@ApiModelProperty(dataType="String", example="1",name="departments", value="所属部门")
private String departments;
private Set<String> AccountIds;
private String accountName;
private String avatar;
private String status;
}
......@@ -693,50 +693,11 @@ public class ExternalController {
result = this.doPost(url, noticeManageActivitiDTO, token);
JSONObject json = JSONUtil.getJSONFromString(result);
int resultCode = json.getIntValue("resultCode");
String resultMsg = json.getString("resultMs");
int dataCount = json.getIntValue("dataCount");
List<FileDownDTO> list = new ArrayList<FileDownDTO>();
List<NoticeGroupAccountSubscriberDTO> list = new ArrayList<NoticeGroupAccountSubscriberDTO>();
if (resultCode==1){
JSONArray jsonArray =json.getJSONArray("obj");
if (jsonArray!=null&&jsonArray.size()>0){
jsonArray.stream().forEach(jsons->{
List<FileDownFileDTO> filelist = new ArrayList<FileDownFileDTO>();
JSONObject jsonObject = (JSONObject) jsons;
FileDownDTO fileDownDTO = new FileDownDTO();
fileDownDTO.setId(jsonObject.getString("id"));
fileDownDTO.setAuthor(jsonObject.getString("accountName"));
fileDownDTO.setCanUpdatePublishTime(jsonObject.getString("canUpdatePublishTime"));
fileDownDTO.setCreateTime(jsonObject.getString("createTime"));
fileDownDTO.setCreateByCom(jsonObject.getString("createByCom"));
JSONArray coverFilejsonArray =json.getJSONArray("coverFile");
JSONObject coverFilejson =(JSONObject)( jsonObject.get("coverFile")) ;
if (coverFilejson!=null){
String filepath=coverFilejson.getString("filePath");
if(filepath==null) {
fileDownDTO.setFilepath("");
} else if (filepath.contains("http")) {
fileDownDTO.setFilepath(coverFilejson.getString("filePath"));
}else {
// fileDownDTO.setFilepath(PlatformUrlManager.API_IMGURL + filepath);
fileDownDTO.setFilepath(filepath);
}
}else{
fileDownDTO.setFilepath("");
}
fileDownDTO.setFilelist(filelist);
fileDownDTO.setImgpath(jsonObject.getString("avatar"));
fileDownDTO.setListNoticeScope(jsonObject.getString("listNoticeScope"));
fileDownDTO.setMemo(jsonObject.getString("memo"));
fileDownDTO.setPublishTime(jsonObject.getString("createtime"));
fileDownDTO.setTitle(jsonObject.getString("title"));
fileDownDTO.setContent(jsonObject.getString("conten"));
list.add(fileDownDTO);
});
}
list = JSONObject.parseArray(jsonArray.toString(), NoticeGroupAccountSubscriberDTO.class);
}
Pagination pagination = new Pagination(list,new Long(dataCount),pageSize,pageIndex);
return ResultJson.ok(pagination);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论