当前位置: 首页 > news >正文

建立免费网站 优帮云seo服务建议

建立免费网站 优帮云,seo服务建议,专做立体化的网站,中搜seo三个表:房间 玩家 玩家信息 知识点:Mybatis中级联有关联(association)、集合(collection)、鉴别器(discriminator)三种。其中,association对应一对一关系、collectio…

三个表:房间 + 玩家 + 玩家信息 

知识点:Mybatis中级联有关联(association)、集合(collection)、鉴别器(discriminator)三种。其中,association对应一对一关系、collection对应一对多关系、discriminator可以根据情况选择采用哪个类作为实例,关联不同的结果集。

参考文章:Mybatis级联:关联、集合和鉴别器的使用 - aaron_shu - 博客园

# room.javaprivate List<Player> player;public List<Player> getPlayer(){return player;}public void setPlayer(List<Player> player){this.player = player;}
<resultMap type="Room" id="RoomResult"><id     property="roomId"       column="room_id"      /><result property="roomTitle"     column="room_title"    /><result property="roomOwnerId"     column="room_owner_id"    /><result property="roomTags" column="room_tags" /><result property="scoreMode"  column="score_mode" /><result property="qrCode" column="qr_code" /><result property="appId" column="app_id" /><result property="isPlaten" column="is_platen" /><result property="userId" column="user_id" /><result property="shopId" column="shop_id" /><result property="status"       column="status"       /><result property="delFlag" 		column="del_flag" /><result property="remark"       column="remark"       /><result property="createBy"     column="create_by"    /><result property="createTime"   column="create_time"  /><result property="updateBy"     column="update_by"    /><result property="updateTime"   column="update_time"  /><collection property="player"    javaType="ArrayList"  ofType="Player" resultMap="playerResult" /></resultMap><resultMap id="playerResult" type="Player"><result property="roomId"    column="room_id"       /><result property="playerScore"     	column="player_score"    /><result property="isOnlooker"     	column="is_onlooker"    /><result property="userId"     		column="user_id"    /><association property="customerUser" javaType="CustomerUser"  resultMap="customerUserResult" /></resultMap><resultMap id="customerUserResult" type="CustomerUser"><result property="userId"    	column="user_id"       /><result property="nickName"     column="nick_name"    /><result property="avatar"       column="avatar"       /></resultMap><sql id="selectRoomVo">select d.room_id, d.room_title, d.room_owner_id, d.score_mode, d.room_tags, d.qr_code,d.app_id, d.is_platen, d.del_flag, d.user_id, d.shop_id,p.player_score, p.is_onlooker, p.user_id,c.nick_name, c.avatar,d.remark, d.status, d.create_by, d.update_by, d.create_time, d.update_timefrom tb_room dleft join tb_player p on p.room_id = d.room_idleft join tb_customer_user c on c.user_id = p.user_id</sql>

前端得到的json结构

{"msg": "操作成功","code": 200,"data": {"createBy": "","createTime": "2025-03-06 12:15:09","updateBy": "",,"delFlag": "1","player": [{"createBy": null,"customerUser": {"createBy": null,"createTime": null, "avatar": "https://img1.baidu.com/it/u=2587875867,850432697&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",}}]}
}

http://www.skylitedrivein.com/news/617.html

相关文章:

  • 山东住房和城乡建设厅网站免费开店的电商平台
  • 网页开发需求定制上海seo网站优化软件
  • 原阳网站建设长沙网站优化seo
  • 建网站的地址关于校园推广的软文
  • 郑州网站优化哪家专业电商网站策划
  • 购物网站功能友情链接2598
  • 大连开发区网站开发公司电话百度关键词挖掘
  • 做除尘环保的如何推广自己的网站微博seo营销
  • 台州做网站是什么公司网站推广运营
  • nodejs可以做网站么武汉本地seo
  • 怎么给公司做微网站杭州百度seo优化
  • 无锡万度网站建设品牌营销策划方案怎么做才好
  • 网络推广培训机构seo优化内容
  • 广州番禺服装网站建设站长工具seo综合查询访问
  • wordpress无法登录长沙网站seo报价
  • 建设校园标准信息服务网站论文品牌整合营销案例
  • 怎么用2013做网站图片外链在线生成
  • 购买网站模板怎么用河源市企业网站seo价格
  • 商丘手机网站制作谷歌排名查询
  • php动态网站开发优势想要网站导航推广页
  • 网站建设报价模块百度网页版官网
  • 厦门做网站价格专业关键词排名软件
  • wordpress 子主题目录seo外链自动群发工具
  • 深圳发布稳增长措施长春关键词优化平台
  • 山东淄博网站建设公司惠州seo按天计费
  • 音乐外链生成网站怎么做如何优化关键词搜索排名
  • 公司年前做网站好处永久免费制作网页
  • 网站建设logo图片成都seo优化
  • 高端品牌网站建设方案百度热榜
  • 无法创建网站 未能找到web服务器太原seo关键词排名优化