【mybatis】在mybatis分页查询时,主表对关联表 一对多 分页查询怎么实现

2022-12-02,,,

有一个更好的解决方案:https://www.cnblogs.com/sxdcgaq8080/p/10876088.html

实现主从表 left join  1:n   关联查询分页   支持主表从表字段都可查

=========================================================

现在有这样一个需求:

  1.积分商品分页查询

  2.一个积分商品会有多张商品图片在商品图片表  1:n的关系

这样在积分商品分页查询的时候,想要顺便把每个积分商品对应的商品图片信息也带出来

实现如下:

1.controller层

 @Override
@RequestMapping(value = "/page",method = RequestMethod.GET)
public PageResult<IntegralGoods> page(IntegralGoods entity) {
PageResult<IntegralGoods> res = new PageResult<>();
TenementUser tenementUser = RequestData.TENEMENT_USER.get();
entity.setTid(tenementUser.getTenementId()); PageInfo<IntegralGoods> pageResult = service.pageFind(entity);
if (pageResult != null){
res.initTrue(pageResult.getTotal(),pageResult.getList());
}else {
res.initTrue(0,null);
} return res;
}

2.service层

@Override
public PageInfo<IntegralGoods> pageFind(IntegralGoods entity) { int total = mapper.countByTid(entity);//1.首先count 查出符合条件的所有条数,作为页面展示总记录数 PageInfo<IntegralGoods> pageInfo = null;
if (total > 0 ){
PageHelper.startPage(entity.getPageNum() + 1, entity.getPageSize());//2.设置分页信息
List<String> uidList = mapper.findListByTid(entity);  //3.取当前查询页1 的 10条数据 的积分商品表 的10条记录的uidList
List<IntegralGoods> goodsList = mapper.findInUid(uidList);//4.然后查询主表10条记录关联的 10条主表信息 若干条图片信息,封装出来的就是10条记录
pageInfo = new PageInfo<>(goodsList);//5.设置返回结果集
pageInfo.setTotal(total);//6.设置总记录数
}
return pageInfo;
}

3.mapper的sql语句

<select id="countByTid" parameterType="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods" resultType="java.lang.Integer">
select
count(uid)
from
integral_goods
where
delete_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@DELETE_FLAG_DISDELETE}
and
tid = #{tid}
<if test="uid != null and uid != '' ">
and uid = #{uid}
</if> <if test="brandUid != null and brandUid != '' ">
and brand_uid = #{brandUid}
</if> <if test="name != null and name != '' ">
and name like CONCAT('%',#{name},'%')
</if> <if test="shelfFlag != null ">
and shelf_flag = #{shelfFlag}
</if> </select> <select id="findListByTid" parameterType="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods" resultType="java.lang.String">
select
uid
from
integral_goods
where
delete_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@DELETE_FLAG_DISDELETE}
and
tid = #{tid}
<if test="uid != null and uid != '' ">
and uid = #{uid}
</if> <if test="brandUid != null and brandUid != '' ">
and brand_uid = #{brandUid}
</if> <if test="name != null and name != '' ">
and name like CONCAT('%',#{name},'%')
</if> <if test="shelfFlag != null ">
and shelf_flag = #{shelfFlag}
</if> </select>
 <select id="findInUid" parameterType="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods" resultMap="baseResBean">

        select
a.id as 'id',
a.uid as 'uid',
a.create_date as 'createDate',
a.update_date as 'updateDate',
a.update_id as 'updateId',
a.create_id as 'createId',
a.brand_uid as 'brandUid',
a.tid as 'tid',
a.stock as 'stock',
a.name as 'name',
a.goods_code as 'goodsCode',
a.market_value as 'marketValue',
a.specification as 'specification',
a.remark as 'remark',
a.integral as 'integral',
a.description as 'description',
a.sale_num as 'saleNum',
a.limit_num as 'limitNum',
a.shelf_flag as 'shelfFlag',
a.home_show_flag as 'homeShowFlag',
sl.shelf_date as 'shelfDate',
sl.obtained_date as 'obtainedDate',
b.id b_id,
b.src b_src,
b.type b_type,
b.sort b_sort
from
integral_goods a
left join
integral_goods_img b
on
a.uid = b.integral_goods_id
left join
shelf_log sl
on
a.uid = sl.integral_goods_uid
<where>
a.uid
IN
<foreach collection="uidList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</where> </select>

页面查看结果:

接口查看结果:

{
"success": true,
"msg": "successful",
"code": 200,
"total": 13,
"rows": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 13,
"createDate": 1534470340000,
"updateDate": 1536048152000,
"updateId": "acf3134506294927a3e1cc180bf01ea0",
"createId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"uid": "d424d0c65cfa4c17b705a3bce23e7fd4",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "fa16b46ff54f423c92ffd7da4eb3c9ae",
"description": "带电青年充电宝......",
"cdKey": null,
"name": "带电青年充电宝",
"marketValue": 120,
"integral": 1200,
"type": null,
"stock": 8982,
"saleNum": 20,
"version": null,
"limitNum": 300,
"goodsCode": "222222",
"specification": "个",
"deleteFlag": null,
"shelfFlag": 1,
"homeShowFlag": 1,
"remark": "1111",
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/8091426162964c8a9d9e4c476a38a650?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": 1534723200000,
"obtainedDate": 1535673600000,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/8091426162964c8a9d9e4c476a38a650?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/62de21b687c84b4e8d8da665d6aa06b4?imageView2/1/w/150/h/150",
"sort": 2,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 16,
"createDate": 1536046277000,
"updateDate": 1536549481000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "007c765ae2b647398919688abd29cb7f",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "test",
"marketValue": 100,
"integral": 10,
"type": null,
"stock": 100,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": "00001",
"specification": "guige",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 0,
"remark": null,
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": null,
"obtainedDate": null,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 15,
"createDate": 1536046265000,
"updateDate": 1536549471000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "7c7dbac9554f4403acbb356e73ddd97e",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "test",
"marketValue": 100,
"integral": 10,
"type": null,
"stock": 100,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": "00001",
"specification": "guige",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 0,
"remark": null,
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": null,
"obtainedDate": null,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 7,
"createDate": 1533865907000,
"updateDate": 1536549571000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "0209119ef2cd40039691d59f9f1de291",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "苹果数据线",
"marketValue": 10,
"integral": 100,
"type": null,
"stock": 8,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": "010101",
"specification": "根",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 1,
"remark": "100积分兑换商品",
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/ab9b4dba66bf494d8bdd66bb36716887?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": 1538092800000,
"obtainedDate": 1538092800000,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/ab9b4dba66bf494d8bdd66bb36716887?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 6,
"createDate": 1533863287000,
"updateDate": 1536549739000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "47ea89667c44423ab5446633f0a27249",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "iPhone数据线",
"marketValue": 20,
"integral": 200,
"type": null,
"stock": 100,
"saleNum": 0,
"version": null,
"limitNum": 5,
"goodsCode": "010101",
"specification": "根",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 1,
"remark": "100积分兑换商品",
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/e9ae94ff797e4724ad90c3fed074f26b?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": 1538092800000,
"obtainedDate": 1538179200000,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/e9ae94ff797e4724ad90c3fed074f26b?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/b229461bf1554d259d69afecbf8e0e93?imageView2/1/w/150/h/150",
"sort": 2,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 18,
"createDate": 1536550327000,
"updateDate": 1536550327000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"uid": "e7b84797cf304feeaea7e849b7694b5a",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "test商品",
"marketValue": 100,
"integral": 20,
"type": null,
"stock": 10,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": null,
"specification": "个",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 1,
"remark": null,
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/8f3676015a804179bfef08cc22cf854c",
"imgUrlList": null,
"shelfDate": 1536537600000,
"obtainedDate": 1536537600000,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/8f3676015a804179bfef08cc22cf854c",
"sort": 1,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/3d2bf0bcde354603abd21d49b8debed0",
"sort": 2,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/ab9b4dba66bf494d8bdd66bb36716887",
"sort": 3,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/a95153729f954facb95934c0537c5b2f",
"sort": 4,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/85cde1bbed064c58901543574c24fd8f",
"sort": 5,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 19,
"createDate": 1536550523000,
"updateDate": 1536550523000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"uid": "4a4fff41908e4639971c9382dc1b1773",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "test商品",
"marketValue": 100,
"integral": 20,
"type": null,
"stock": 10,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": null,
"specification": "个",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 1,
"remark": null,
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/8f3676015a804179bfef08cc22cf854c",
"imgUrlList": null,
"shelfDate": 1536537600000,
"obtainedDate": 1536537600000,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/8f3676015a804179bfef08cc22cf854c",
"sort": 1,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/3d2bf0bcde354603abd21d49b8debed0",
"sort": 2,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/ab9b4dba66bf494d8bdd66bb36716887",
"sort": 3,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/a95153729f954facb95934c0537c5b2f",
"sort": 4,
"imgKey": null,
"imgName": null
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 2,
"src": "http://ozwm3lwui.bkt.clouddn.com/85cde1bbed064c58901543574c24fd8f",
"sort": 5,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 14,
"createDate": 1536046265000,
"updateDate": 1536549476000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "3857800271f94c3b82edf5fb5e80932f",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "test",
"marketValue": 100,
"integral": 10,
"type": null,
"stock": 100,
"saleNum": 0,
"version": null,
"limitNum": 2,
"goodsCode": "00001",
"specification": "guige",
"deleteFlag": null,
"shelfFlag": 0,
"homeShowFlag": 0,
"remark": null,
"order": null,
"orderType": null,
"headImg": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"imgUrlList": null,
"shelfDate": null,
"obtainedDate": null,
"shelfRemark": null,
"imgList": [
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": null,
"createDate": null,
"updateDate": null,
"updateId": null,
"createId": null,
"uid": null,
"tid": null,
"brandUid": null,
"integralGoodsId": null,
"type": 1,
"src": "http://ozwm3lwui.bkt.clouddn.com/d27d771035c947a8836e55349020a103?imageView2/1/w/150/h/150",
"sort": 1,
"imgKey": null,
"imgName": null
}
]
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 9,
"createDate": 1534141587000,
"updateDate": 1535700608000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "c9201b8a437d468e95150b319f6e0002",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "三星数据线",
"marketValue": 10,
"integral": 10,
"type": null,
"stock": 18,
"saleNum": 2,
"version": null,
"limitNum": 2,
"goodsCode": "010101",
"specification": "根",
"deleteFlag": null,
"shelfFlag": 1,
"homeShowFlag": 1,
"remark": "20积分兑换商品",
"order": null,
"orderType": null,
"headImg": null,
"imgUrlList": null,
"shelfDate": 1534118400000,
"obtainedDate": 1534291200000,
"shelfRemark": null,
"imgList": []
},
{
"fields": null,
"orders": null,
"pageSize": 10,
"pageNum": 0,
"id": 10,
"createDate": 1534143568000,
"updateDate": 1535700616000,
"updateId": "4d5b0c47-682a-4a20-9e50-8dc7eea85539",
"createId": "74c9a9d1-54b6-4b93-959d-e372939d5c69",
"uid": "4d0cbbccae2d4b78813a240150ca1602",
"tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba",
"brandUid": "974fcd3a139f4b19a632bc40b6eec7b9",
"description": null,
"cdKey": null,
"name": "Android数据线",
"marketValue": 10,
"integral": 10,
"type": null,
"stock": 98,
"saleNum": 2,
"version": null,
"limitNum": 2,
"goodsCode": "010101",
"specification": "根",
"deleteFlag": null,
"shelfFlag": 1,
"homeShowFlag": 1,
"remark": "100积分兑换商品",
"order": null,
"orderType": null,
"headImg": null,
"imgUrlList": null,
"shelfDate": 1534118400000,
"obtainedDate": 1534723200000,
"shelfRemark": null,
"imgList": []
}
]
}

mybatis】在mybatis分页查询时,主表对关联表 一对多 分页查询怎么实现的相关教程结束。

《【mybatis】在mybatis分页查询时,主表对关联表 一对多 分页查询怎么实现.doc》

下载本文的Word格式文档,以方便收藏与打印。