MyBatis之动态updata语句
来源:互联网 发布:sem和seo利与弊端 编辑:程序博客网 时间:2024/05/15 13:11
MyBatis之动态updata语句
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "./mybatis-3-mapper.dtd" ><mapper namespace="net.bunnytouch.bs.dao.widget.LoopProgramDAO"> <resultMap type="LoopProgramEntity" id="loopProgramEntity"> <result column="CSTM_ID" property="cstmId"/> <result column="TASK_ID" property="taskId"/> <result column="PRGM_ID" property="prgmId"/> <result column="DESCP" property="descp"/> <result column="NAME" property="name"/> <result column="SEQ" property="seq"/> <result column="WIDTH" property="width"/> <result column="HEIGHT" property="height"/> <result column="MAIN_RECT" property="mainRect"/> <result column="STATE" property="state"/> <result column="CREATE_TIME" property="creatTime"/> <result column="CREATE_USER" property="creatUser"/> </resultMap> <sql id="loopProgramTableName"> tb_loop_program </sql> <update id="updateLoopProgram" parameterMap="loopProgramEntity"> update <include refid="loopProgramTableName"/> <trim prefix="set" suffixOverrides=","> <if test="descp!=null">DESCP=#{descp}</if> <if test="name!=null">NAME=#{name}</if> <if test="seq!=null">SEQ=#{seq}</if> <if test="width!=null">WIDTH=#{width}</if> <if test="height!=null">HEIGHT=#{height}</if> <if test="mainRect!=null">MAIN_RECT=#{mainRect}</if> <if test="state!=null">STATE=#{state}</if> <if test="creatTime!=null">CREATE_TIME=#{creatTime}</if> <if test="creatUser!=null">CREATE_USER=#{creatUser}</if> </trim> where CSTM_ID = #{cstmId} and TASK_ID=#{taskId} and PRGM_ID=#{prgmId} </update></mapper>
阅读全文
0 0
- MyBatis之动态updata语句
- MyBatis之动态SQL语句
- mybatis之动态sql语句
- sql语句updata
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 四、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之四、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习之三--动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- MyBatis学习 之 三、动态SQL语句
- Mybatis使用之动态SQL语句
- PAT(Basic Level)_1035_插入与归并
- SOQL数据查询时对日期的相关处理操作。
- springboot学习-基本配置helloworld
- 冒泡排序
- 深度优先搜索(DFS)
- MyBatis之动态updata语句
- bfs入门练习Catch That Cow
- 字符统计
- k-更新字典
- 暑假集训test11
- TypeScript学习(2)
- codeforces 832D——Misha, Grisha and Underground(LCA)
- POJ
- 修改和校正树莓派时间