// 批量插入
<insert id="addXx" paramType="java.util.List">
insert into ByFlx_Abc
(ID,AA,BB,CC)
select ByFlx_Abc_AUTOID.nextVal,m.* from (
<foreach collection="list" item="item" index="index" separator="UNIONALL">
select
#{item.aa,jdbcType=VARCHAR}
,#{item.bb,jdbcType=VARCHAR}
,#{item.cc,jdbcType=VARCHAR}
from dual
</foreach>
) m
</insert>
// 批量插入uuid
<insert id="addlist" parameterType="java.util.list">
insert all
<foreach collection="list" item="info" index="index">
into crs_xx(
SERIALNO
,DATA
,CUST_ID
)
values(
#{info.serialno,jdbcType=NUMBER},
#{info.date,jdbcType=DATE},
#{info.custId,jdbcType=VARCHAR}
)
</foreach>
select 1 from dual
</insert>
// 存储过程
<select id="taskByFlxXx" statementType="CALLABLE" resultMap="ByFlxXxResultMap">
{ call ByFlx_Xx(#{qc.date,jdbcType=VARCHAR,mode=In})}
</select>
// 获取配置文件中数据原始方法
File file = new File(PropertiesUtil.getValue("report-config.properties","TEMPFILEPATH"));
//1.java 基础知识点
String emailNs = String.join(";",emailNList);
"unhappy".subString(2) // "happy"
"hamburger".suString(4,8) // “urger”
//date转换
java.sql.Date endTime = new java.sql.Date(new Date().getTime());
//BeanCopy
BeanUtils.copyProperties(qc,VoCondition); //(源对象,目标对象)
Copier.copy();
//==前端 Object.assign(params,this.formBean)(es6-浅复制,小心同名覆盖)
// 反射
Class query = input.getClass();
Field[] fd = query.getDeclaredFields();
for(Field field : fd) {
if(field.isAnnotationPresent(QCondition.clss)) {
field.setAccessible(true);
QCondition condition = field.getAnnotation(QCondition.clss);
Object ob = field.get(input);
String value = ob == null ? "" : ob.toString();
}
}