Map
转Java Bean
:
public ResponseResult addDataTable(Map<String, Object> params) {
String jsonString = JSON.toJSONString(params);
DmDataTable dataTable = JSON.parseObject(jsonString, DmDataTable.class);
DmApprovalInfo approvalInfo = JSON.parseObject(jsonString, DmApprovalInfo.class);
return new ResponseResult(insertSelective(dataTable.setTableId(UUIDUtil.uuid())));
}
Java Bean
转Map
:
OrganStaffDto staffDto = queryStaffDtoByOrganId(user2.get("organId"));
String jsonStr = JSON.toJSONString(staffDto);
Map<String,String> staffMap = (Map)JSON.parseObject(jsonStr);
References
最新评论
黑镜4k被和谐,哥
地址已经无效
谢谢,大神的分享
你们都能正常用吗?我怎么不能呀,没有几个能放