Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to do Mapper multi-table association query

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, Xiaobian will bring you about how to make Mapper multi-table association queries. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

select p.id, p.create_time, p.update_time, p.create_user, p.update_user, p.project_name, p.test_user, p.dev_user, p.simple_desc, p.other_desc, p.project_code, p.belong_env_id, p.status_id,u.status_name,u.description from projectinfo_temp p LEFT JOIN usestatus u on p.status_id = u.id2, offlink pojo@ToStringpublic class ProjectinfoTemp { private Integer id; private Date createTime; private Date updateTime; private String createUser; private String updateUser; private String projectName; private String testUser; private String devUser; private String simpleDesc; private String otherDesc; private String projectCode; private Integer belongEnvId; private Integer statusId; /** * Association Status Table Activation Status */ private Uestatus usestatus; status tables/** * * @author liwen406 * @date 2019-04-21 09:12 */@ToStringpublic class Usestatus { private Integer id; private String statusName; private String description;3 Write an associated sql statement

imitative writing

p.id, p.create_time, p.update_time, p.create_user, p.update_user, p.project_name, p.test_user,p.dev_user, p.simple_desc, p.other_desc, p.project_code, p.belong_env_id, p.status_id,u.status_name,u.description select distinct from projectinfo_temp order by ${orderByClause} select distinct from projectinfo_temp p LEFT JOIN usestatus u on p.status_id = u.id order by ${orderByClause} 4 front-end call writing Application No. application name test leader development lead Module/Interface/Use Case state operation run edit delete , [Home] [Previous] [Next] [Last Page] 5. Visit result display

The above is how to make Mapper multi-table association query shared by Xiaobian for everyone. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report