Y2L
首页
归档
分类
标签
关于
传递简单参数
开始1. 在接口中增加一个方法public List<t1Item> getT1ById(@Param("id") int id);2. 在mapper配置文件中编写对应的标签 <select id="getT1ById" resultType="com.example.mybatis.t1Item"> select * from t1 where id=#
2020-07-19
mybatis
mybatis基础
传递Map类型参数
开始1. 在接口中增加一个方法public List<t1Item> getT1ByMap(Map<String,Object> map);2. 在mapper配置文件中编写对应的标签<select id="getT1ByMap" resultType="com.example.mybatis.t1Item"> select * from t1
2020-07-19
mybatis
mybatis基础
基本用法
前提在数据库中有一个表create table t1 ( id int(16) not null, name varchar(32) not null, password char(32) not null, constraint id unique (id) ); alter table t1 add p
2020-07-19
mybatis
mybatis基础
传递自定义对象类型参数
开始1. 在接口中增加一个方法public int addT1Item(t1Item item);2. 在mapper配置文件中编写对应的标签<insert id="addT1Item" parameterType="com.example.mybatis.t1Item"> insert into t1 (id, name, password) value (#
2020-07-19
mybatis
mybatis基础
序对应用
cons car cdr 的一个小实现> (define (car x) (x 0)) > (define (cdr x) (x 1)) > (define (cons x y) (define (tem z) (cond ((= 0 z) x) ((= 1 z) y))) tem ) > (car (c
2020-07-19
Lisp
scheme练习
接受复杂对象
开始1. 在接口中加入方法public Home getByHomeId(@Param("id") int id);2.在mapper配置文件中编写对应的标签 <resultMap id="home" type="com.example.mybatis.Home"> <id property="id" column="h_id"/> <id pro
2020-07-19
mybatis
mybatis基础
换零钱的方式
练习换零钱方式统计例:将1美元换成 半美元,四分之一美元,十美分,五美分,一美分> (define (cc amount kinds-of-coins) (cond ((= amount 0) 1) ((or (< amount 0) (= kinds-of-coins 0)) 0) (else (+ (cc amount
2020-07-19
Lisp
scheme练习
接受数组类型
开始1. 在接口中加入方法public Proper getByProperId(@Param("id") int id);2.在mapper配置文件中编写对应的标签 <resultMap id="proper" type="com.example.mybatis.Proper"> <id property="id" column="p_id"/>
2020-07-19
mybatis
mybatis基础
lambda与let
lambda例:> ((lambda (x) (- x 1)) 3) 2创建局部变量例:> (define (fun x) ((lambda (a) (+ x a)) (+ x 1))) > (fun 1) 3 > (fun 2) 5也可以用let简化> (define (fun x) (let ((a (+ x 1)) )
2020-07-19
Lisp
scheme基础
基本语法define与cond
开始Lisp基本加减乘除加>(+ 1 2)3减>(- 2 1)1乘>(* 1 2 3)6除>(/ 4 2)2define定义一个事物>(define size 2)>size2>(* size 3)6定义成无参>(define fun (+ size 1)>fun3定义成有参> (define (fun1 x y) (* x y)>
2020-07-19
Lisp
scheme基础
1
2
3
4
5
搜索
×
关键词