作者 钟来

初始提交

@@ -28,6 +28,13 @@ public class AllPostTopic implements BusinessAgreement<AllPostDto> { @@ -28,6 +28,13 @@ public class AllPostTopic implements BusinessAgreement<AllPostDto> {
28 @Override 28 @Override
29 public AllPostDto toData(BusinessDto data) { 29 public AllPostDto toData(BusinessDto data) {
30 AllPostDto serverDto = new AllPostDto(); 30 AllPostDto serverDto = new AllPostDto();
  31 + if(data.getContentData() instanceof JSONObject)
  32 + {
31 return serverDto.setData((JSONObject) data.getContentData()); 33 return serverDto.setData((JSONObject) data.getContentData());
  34 + }else if(data.getContentData() instanceof byte[])
  35 + {
  36 + return serverDto.setData(JSONObject.parseObject(new String((byte[]) data.getContentData())));
  37 + }
  38 + return null;
32 } 39 }
33 } 40 }