mybatis查询的时候一对多查询结果显示


		
		
			
			
			
			
			
		
	
@Data
public class MContractVo {
    private Integer	id;		 /* 自增id */
    private String  companyName;     /* 公司名称 */
    private String title;        /* 需求名称 */
    private List   contractProductList;
}
{
    "rows": [],
    "total": 0,
    "data": [
        {
            "id": 124,
            "companyName": "ceshi",
            "title": null
            "contractProductList": [
                {
                    "id": 124,
                    "productName": "ceshi",
                    "productSku": "ceshi1",
                    "productQuantity": 123,
                    "productUnit": "dun",
                    "createTime": "2020-08-27 23:23:34",
                    "modifyTime": "2020-08-28 17:30:50"
                },
                {
                    "id": 124,
                    "productName": "ceshi2",
                    "productSku": "ceshi2",
                    "productQuantity": 321,
                    "productUnit": "dun",
                    "createTime": "2020-08-27 23:23:34",
                    "modifyTime": "2020-08-28 17:30:50"
                }
            ]
        }
    ],
    "message": "",
    "success": true
}

 

你可能感兴趣的:(java,java)