Maven使用注解联合查询
来源:互联网 发布:淘宝店如何退货 编辑:程序博客网 时间:2024/05/16 12:48
Maven使用注解联合查询
一、Maven无条件联合查询
public interface DeptMapper {
@Select("select * from dept where deptno=#{deptno}")
Dept dept(int deptno);
@Select("SELECT * FROM emp")
@Results({
@Result(property = "dept",
column = "deptno",
one = @One(select = "com.java.mapper.DeptMapper.dept"))
})
List<Emp> allemp();
}
二、Maven有条件联合查询
public interface DeptMapper {
@Select("select * from dept where deptno=#{deptno}")
Dept dept(int deptno);
@Select("SELECT * FROM emp where deptno=#{deptno} ")
@Results({
@Result(property = "dept",
column = "deptno",
one = @One(select = "com.java.mapper.DeptMapper.dept"))
})
List<Emp> empByDeptno(@Param("deptno") intdeptno);
}
阅读全文
0 0
- Maven使用注解联合查询
- 联合查询SUM的使用
- Hibernate中使用注解生成联合主键
- 使用注解来定义联合主键
- 使用ssh注解查询
- Oracle中联合查询的实例使用
- mybatis 使用 and和or联合查询
- mybatis 使用 and和or联合查询
- My SQL 联合查询的使用
- Mysql Union 联合查询的使用
- SQL使用(一)-----联合查询
- SQL使用(一)-----联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 顺序表应用2:多余元素删除之建表算法
- 2017/9/12 迪杰特斯拉专栏from yty
- 无限轮播图
- 淘宝的放大镜的实现
- 使js构造函数不会被当做普通函数调用的技巧
- Maven使用注解联合查询
- LintCode-两数之和
- Linux命令
- 51Nod 1003 阶乘后面0的数量
- 表空间管理
- Codeforces 853D 贪心
- MongoDB实战-分片集群的管理
- 第六课 Tensorflow Cifar10 CNN 卷积神经网络
- 次短路(hdu 6181)