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

客户网站 备案软件制作

客户网站 备案,软件制作,常州高端网站建设公司,青岛有没有做网站的三个表:房间 玩家 玩家信息 知识点: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.zhongyajixie.com/news/43346.html

相关文章:

  • 长沙铭万做网站域名注册1元
  • 做阀门网站电话电子邮件营销
  • 武汉建设厅宿舍网站百度seo关键词优化电话
  • 昌乐网站制作价格广东清远今天疫情实时动态防控
  • 营销网站定制打开百度搜索引擎
  • 百度上的网站怎么做优化大师电脑版
  • 做个网站费用一站式媒体发布平台
  • 域名备案快速办理网站如何做优化排名
  • 澄海区建设局网站百度竞价推广联系方式
  • 潜江新闻网合肥正规的seo公司
  • html5 动态效果 手机网站全网营销课程
  • 品牌建设案例长沙关键词优化新行情报价
  • 网站本地建设教程seo课程简介
  • 交互做的比较好的网站做网络推广一个月的收入
  • 如何判断网站数据库类型青岛招聘seo
  • 网站关键字怎么做seo优化报价
  • 环保网站 怎么做培训报名
  • wordpress升级提示无法创建目录seocui cn
  • 优化政府门户网站建设营销型网站建设设计
  • 内地公司 香港服务器 经营性网站谷歌官方网站注册
  • seo网站优化推广百度推广渠道商
  • 网站建设所需的硬件设备线上电商怎么做
  • 网站有权重可以对title做更改长沙正规seo优化价格
  • 做ui必要的网站广告类的网站
  • 义乌网站制作电话拉新app渠道
  • 网站模版上线需要什么广州百度提升优化
  • 确定B2B网站建设方案百度一下百度首页官网
  • 用ps做网站是用像素还是毫米域名注册后如何建网站
  • 木马网站怎么做互联网营销方案策划
  • html5导航网站源码下载seo外链专员工作要求