为什么80%的码农都做不了架构师?>>>
实际生成的SQL文件
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" ><!--
******************************************************************************
* 数据库表:TAB_DEMO
* 表的名称:演示主表
* 对应实体:com.icsm.paybank.entity.TabDemo
* 开发日期:2016-09-26
* 技术服务:www.fwjava.com
******************************************************************************
-->
<mapper namespace="com.icsm.paybank.mapper.TabDemoMapper"><!--*************************************************************************** 1.新增一条数据* 注: 根据Bean实体执行新增操作.**************************************************************************--><insert id="getInsert"parameterType="com.icsm.paybank.entity.TabDemo"useGeneratedKeys="true"keyProperty="id">INSERT /* getInsert+@com.icsm.paybank.sql.TabDemo.xml */ INTO TAB_DEMO /* 演示主表 */ (USER_NAME /* 用户名称 */ ,ORDER_NO /* 订单号 */ ,ORDER_COUNT /* 表数目 */ ,PRICE_DECIMAL /* 品类价格 */ ,PRICE_DOUBLE /* 类目价格 */ ,PRICE_FLOAT /* 商品价格 */ ,CREATED /* 创建时间 */ ,UPDATED /* 变更日期 */ )VALUES (#{userName} /* 用户名称 */ ,#{orderNo} /* 订单号 */ ,#{orderCount} /* 表数目 */ ,#{priceDecimal} /* 品类价格 */ ,#{priceDouble} /* 类目价格 */ ,#{priceFloat} /* 商品价格 */ ,#{created} /* 创建时间 */ ,#{updated} /* 变更日期 */ )</insert><insert id="getInsertPrmMap"parameterType="java.util.HashMap"useGeneratedKeys="true"keyProperty="id">INSERT /* getInsertPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ INTO TAB_DEMO /* 演示主表 */ (USER_NAME /* 用户名称 */ ,ORDER_NO /* 订单号 */ ,ORDER_COUNT /* 表数目 */ ,PRICE_DECIMAL /* 品类价格 */ ,PRICE_DOUBLE /* 类目价格 */ ,PRICE_FLOAT /* 商品价格 */ ,CREATED /* 创建时间 */ ,UPDATED /* 变更日期 */ )VALUES (#{userName} /* 用户名称 */ ,#{orderNo} /* 订单号 */ ,#{orderCount} /* 表数目 */ ,#{priceDecimal} /* 品类价格 */ ,#{priceDouble} /* 类目价格 */ ,#{priceFloat} /* 商品价格 */ ,#{created} /* 创建时间 */ ,#{updated} /* 变更日期 */ )</insert><!--*************************************************************************** 2.删除一条数据* 注: 根据Bean实体的主键ID执行删除操作.**************************************************************************--><delete id="getDelete"parameterType="java.lang.Long">DELETE /* getDelete+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE ID = #{_parameter} /* 主键ID */ </delete><!--*************************************************************************** 3.变更一条数据* 注: 根据Bean实体的主键ID执行变更操作.**************************************************************************--><update id="getUpdate"parameterType="com.icsm.paybank.entity.TabDemo">UPDATE /* getUpdate+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET USER_NAME = #{userName} /* 用户名称 */ ,ORDER_NO = #{orderNo} /* 订单号 */ ,ORDER_COUNT = #{orderCount} /* 表数目 */ ,PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ ,PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ ,PRICE_FLOAT = #{priceFloat} /* 商品价格 */ ,CREATED = #{created} /* 创建时间 */ ,UPDATED = #{updated} /* 变更日期 */ WHERE ID = #{id} /* 主键ID */ </update><update id="getUpdatePrmMap"parameterType="java.util.HashMap">UPDATE /* getUpdatePrmMap+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET USER_NAME = #{userName} /* 用户名称 */ ,ORDER_NO = #{orderNo} /* 订单号 */ ,ORDER_COUNT = #{orderCount} /* 表数目 */ ,PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ ,PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ ,PRICE_FLOAT = #{priceFloat} /* 商品价格 */ ,CREATED = #{created} /* 创建时间 */ ,UPDATED = #{updated} /* 变更日期 */ WHERE ID = #{id} /* 主键ID */ </update><!--*************************************************************************** 4.获取一个Bean实体* 注: 根据Bean实体的主键ID获取一个Bean实体.**************************************************************************--><select id="getBean"parameterType="java.lang.Long"resultType="com.icsm.paybank.entity.TabDemo">SELECT /* getBean+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE td.ID = #{_parameter} /* 主键ID */ </select><select id="getBeanRtnMap"parameterType="java.lang.Long"resultType="java.util.HashMap">SELECT /* getBeanRtnMap+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE td.ID = #{_parameter} /* 主键ID */ </select><!--*************************************************************************** 5.条件查询* 注: 支持多条件查询、模糊查询、日期比较查询等操作.**************************************************************************--><select id="getList"parameterType="com.icsm.paybank.entity.TabDemo"resultType="com.icsm.paybank.entity.TabDemo">SELECT /* getList+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND td.ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND td.USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND td.ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND td.ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND td.PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND td.PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND td.PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(td.CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(td.UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND td.USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND td.ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --><if test='orderBy != null and orderBy != ""'>ORDER BY ${orderBy} /* 排序 */ </if></select><select id="getListPrmMapRtnBean"parameterType="java.util.HashMap"resultType="com.icsm.paybank.entity.TabDemo">SELECT /* getListPrmMapRtnBean+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND td.ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND td.USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND td.ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND td.ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND td.PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND td.PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND td.PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(td.CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(td.UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND td.USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND td.ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --><if test='orderBy != null and orderBy != ""'>ORDER BY ${orderBy} /* 排序 */ </if></select><select id="getListPrmMapRtnMap"parameterType="java.util.HashMap"resultType="java.util.HashMap">SELECT /* getListPrmMapRtnMap+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND td.ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND td.USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND td.ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND td.ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND td.PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND td.PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND td.PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(td.CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(td.UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND td.USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND td.ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --><if test='orderBy != null and orderBy != ""'>ORDER BY ${orderBy} /* 排序 */ </if></select><!--*************************************************************************** 6.分页查询* 注: 支持分页查询、多条件查询、模糊查询、日期比较查询等操作.**************************************************************************--><select id="getPageList"parameterType="java.util.HashMap"resultType="com.icsm.paybank.entity.TabDemo">SELECT /* getPageList+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE 1 = 1<if test='bean != null'><if test='bean.id != null'>AND td.ID = #{bean.id} /* 主键ID */ </if><if test='bean.userName != null and bean.userName != "" and bean.userName != "null" and bean.userName != "undefined"'>AND td.USER_NAME = #{bean.userName} /* 用户名称 */ </if><if test='bean.orderNo != null and bean.orderNo != "" and bean.orderNo != "null" and bean.orderNo != "undefined"'>AND td.ORDER_NO = #{bean.orderNo} /* 订单号 */ </if><if test='bean.orderCount != null'>AND td.ORDER_COUNT = #{bean.orderCount} /* 表数目 */ </if><if test='bean.priceDecimal != null'>AND td.PRICE_DECIMAL = #{bean.priceDecimal} /* 品类价格 */ </if><if test='bean.priceDouble != null'>AND td.PRICE_DOUBLE = #{bean.priceDouble} /* 类目价格 */ </if><if test='bean.priceFloat != null'>AND td.PRICE_FLOAT = #{bean.priceFloat} /* 商品价格 */ </if><if test='bean.created != null'>AND date_format(td.CREATED ,'%Y-%m-%d') = #{bean.createdChar} /* 创建时间 */ </if><if test='bean.updated != null'>AND date_format(td.UPDATED ,'%Y-%m-%d') = #{bean.updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='bean.userNameLike != null and bean.userNameLike != "" and bean.userNameLike != "null" and bean.userNameLike != "undefined"'>AND td.USER_NAME like concat('%',#{bean.userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='bean.orderNoLike != null and bean.orderNoLike != "" and bean.orderNoLike != "null" and bean.orderNoLike != "undefined"'>AND td.ORDER_NO like concat('%',#{bean.orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='bean.createdBegin != null and bean.createdBegin != "" and bean.createdBegin != "null" and bean.createdBegin != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{bean.createdBegin} /* 创建时间(起始日期) */ </if><if test='bean.createdEnd != null and bean.createdEnd != "" and bean.createdEnd != "null" and bean.createdEnd != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{bean.createdEnd} /* 创建时间(结束日期) */ </if><if test='bean.updatedBegin != null and bean.updatedBegin != "" and bean.updatedBegin != "null" and bean.updatedBegin != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{bean.updatedBegin} /* 变更日期(起始日期) */ </if><if test='bean.updatedEnd != null and bean.updatedEnd != "" and bean.updatedEnd != "null" and bean.updatedEnd != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{bean.updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --><if test='bean.orderBy != null and bean.orderBy != ""'>ORDER BY ${bean.orderBy} /* 排序 */ </if></if><!-- 分页条 -->LIMIT #{offset} ,#{rows}<!-- /分页条 --></select><select id="getPageListRtnMap"parameterType="java.util.HashMap"resultType="java.util.HashMap">SELECT /* getPageListRtnMap+@com.icsm.paybank.sql.TabDemo.xml */ td.ID AS "id" /* 主键ID */ ,td.USER_NAME AS "userName" /* 用户名称 */ ,td.ORDER_NO AS "orderNo" /* 订单号 */ ,td.ORDER_COUNT AS "orderCount" /* 表数目 */ ,td.PRICE_DECIMAL AS "priceDecimal" /* 品类价格 */ ,td.PRICE_DOUBLE AS "priceDouble" /* 类目价格 */ ,td.PRICE_FLOAT AS "priceFloat" /* 商品价格 */ ,td.CREATED AS "created" /* 创建时间 */ ,td.UPDATED AS "updated" /* 变更日期 */ FROM TAB_DEMO td /* 演示主表 */ WHERE 1 = 1<if test='bean != null'><if test='bean.id != null'>AND td.ID = #{bean.id} /* 主键ID */ </if><if test='bean.userName != null and bean.userName != "" and bean.userName != "null" and bean.userName != "undefined"'>AND td.USER_NAME = #{bean.userName} /* 用户名称 */ </if><if test='bean.orderNo != null and bean.orderNo != "" and bean.orderNo != "null" and bean.orderNo != "undefined"'>AND td.ORDER_NO = #{bean.orderNo} /* 订单号 */ </if><if test='bean.orderCount != null'>AND td.ORDER_COUNT = #{bean.orderCount} /* 表数目 */ </if><if test='bean.priceDecimal != null'>AND td.PRICE_DECIMAL = #{bean.priceDecimal} /* 品类价格 */ </if><if test='bean.priceDouble != null'>AND td.PRICE_DOUBLE = #{bean.priceDouble} /* 类目价格 */ </if><if test='bean.priceFloat != null'>AND td.PRICE_FLOAT = #{bean.priceFloat} /* 商品价格 */ </if><if test='bean.created != null'>AND date_format(td.CREATED ,'%Y-%m-%d') = #{bean.createdChar} /* 创建时间 */ </if><if test='bean.updated != null'>AND date_format(td.UPDATED ,'%Y-%m-%d') = #{bean.updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='bean.userNameLike != null and bean.userNameLike != "" and bean.userNameLike != "null" and bean.userNameLike != "undefined"'>AND td.USER_NAME like concat('%',#{bean.userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='bean.orderNoLike != null and bean.orderNoLike != "" and bean.orderNoLike != "null" and bean.orderNoLike != "undefined"'>AND td.ORDER_NO like concat('%',#{bean.orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='bean.createdBegin != null and bean.createdBegin != "" and bean.createdBegin != "null" and bean.createdBegin != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{bean.createdBegin} /* 创建时间(起始日期) */ </if><if test='bean.createdEnd != null and bean.createdEnd != "" and bean.createdEnd != "null" and bean.createdEnd != "undefined"'>AND date_format(td.CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{bean.createdEnd} /* 创建时间(结束日期) */ </if><if test='bean.updatedBegin != null and bean.updatedBegin != "" and bean.updatedBegin != "null" and bean.updatedBegin != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{bean.updatedBegin} /* 变更日期(起始日期) */ </if><if test='bean.updatedEnd != null and bean.updatedEnd != "" and bean.updatedEnd != "null" and bean.updatedEnd != "undefined"'>AND date_format(td.UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{bean.updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --><if test='bean.orderBy != null and bean.orderBy != ""'>ORDER BY ${bean.orderBy} /* 排序 */ </if></if><!-- 分页条 -->LIMIT #{offset} ,#{rows}<!-- /分页条 --></select><!--*************************************************************************** 7.删除一条数据* 注: 根据Bean实体的主键ID执行删除操作.**************************************************************************--><delete id="getDeleteBean"parameterType="com.icsm.paybank.entity.TabDemo">DELETE /* getDeleteBean+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE ID = #{id} /* 主键ID */ </delete><delete id="getDeleteMap"parameterType="java.util.HashMap">DELETE /* getDeleteMap+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE ID = #{id} /* 主键ID */ </delete><!--*************************************************************************** 8.删除多条数据* 注: 根据拼接有限个主键ID执行多条数据的删除操作.**************************************************************************--><delete id="getDeleteIn"parameterType="java.lang.Long">DELETE /* getDeleteIn+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE ID in /* 主键ID */ <foreach collection="array" item="item" open="(" separator="," close=")">#{item}</foreach></delete><!--*************************************************************************** 9.条件删除数据* 注: 根据多种条件执行批量删除操作.**************************************************************************--><delete id="getDeleteBy"parameterType="com.icsm.paybank.entity.TabDemo">DELETE /* getDeleteBy+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --></delete><delete id="getDeleteByPrmMap"parameterType="java.util.HashMap">DELETE /* getDeleteByPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ FROM TAB_DEMO /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --></delete><!--*************************************************************************** 10.验证一条数据是否存在* 注: 根据主键ID验证该数据是否存在 ,并返回数据量.**************************************************************************--><select id="getCheck"parameterType="java.lang.Long"resultType="java.lang.Integer">SELECT /* getCheck+@com.icsm.paybank.sql.TabDemo.xml */ count(1)FROM TAB_DEMO /* 演示主表 */ WHERE ID = #{_parameter} /* 主键ID */ </select><!--*************************************************************************** 11.验证多条件数据是否存在* 注: 根据多条件验证该数据是否存在 ,并返回数据量.**************************************************************************--><select id="getCheckBy"parameterType="com.icsm.paybank.entity.TabDemo"resultType="java.lang.Integer">SELECT /* getCheckBy+@com.icsm.paybank.sql.TabDemo.xml */ count(1)FROM TAB_DEMO /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --></select><select id="getCheckByPrmMap"parameterType="java.util.HashMap"resultType="java.lang.Integer">SELECT /* getCheckByPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ count(1)FROM TAB_DEMO /* 演示主表 */ WHERE 1 = 1<if test='id != null'>AND ID = #{id} /* 主键ID */ </if><if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>AND USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>AND ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>AND ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>AND PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>AND PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>AND PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>AND date_format(CREATED ,'%Y-%m-%d') = #{createdChar} /* 创建时间 */ </if><if test='updated != null'>AND date_format(UPDATED ,'%Y-%m-%d') = #{updatedChar} /* 变更日期 */ </if><!-- 常用自定义字段 --> <if test='userNameLike != null and userNameLike != "" and userNameLike != "null" and userNameLike != "undefined"'>AND USER_NAME like concat('%',#{userNameLike},'%') /* 用户名称(全模糊) */ </if><if test='orderNoLike != null and orderNoLike != "" and orderNoLike != "null" and orderNoLike != "undefined"'>AND ORDER_NO like concat('%',#{orderNoLike},'%') /* 订单号(全模糊) */ </if><if test='createdBegin != null and createdBegin != "" and createdBegin != "null" and createdBegin != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[>=]]> #{createdBegin} /* 创建时间(起始日期) */ </if><if test='createdEnd != null and createdEnd != "" and createdEnd != "null" and createdEnd != "undefined"'>AND date_format(CREATED ,'%Y-%m-%d') <![CDATA[<=]]> #{createdEnd} /* 创建时间(结束日期) */ </if><if test='updatedBegin != null and updatedBegin != "" and updatedBegin != "null" and updatedBegin != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[>=]]> #{updatedBegin} /* 变更日期(起始日期) */ </if><if test='updatedEnd != null and updatedEnd != "" and updatedEnd != "null" and updatedEnd != "undefined"'>AND date_format(UPDATED ,'%Y-%m-%d') <![CDATA[<=]]> #{updatedEnd} /* 变更日期(结束日期) */ </if><!-- /常用自定义字段 --></select><!--*************************************************************************** 12.按条件变更一条数据* 注: 根据Bean实体的主键ID,只对部分字段执行变更操作.**************************************************************************--><update id="getUpdateBy"parameterType="com.icsm.paybank.entity.TabDemo">UPDATE /* getUpdateBy+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET ID = #{id} /* 主键ID */ <if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>,USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>,ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>,ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>,PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>,PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>,PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>,CREATED = #{created} /* 创建时间 */ </if><if test='updated != null'>,UPDATED = #{updated} /* 变更日期 */ </if>WHERE ID = #{id} /* 主键ID */ </update><update id="getUpdateByPrmMap"parameterType="java.util.HashMap">UPDATE /* getUpdateByPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET ID = #{id} /* 主键ID */ <if test='userName != null and userName != "" and userName != "null" and userName != "undefined"'>,USER_NAME = #{userName} /* 用户名称 */ </if><if test='orderNo != null and orderNo != "" and orderNo != "null" and orderNo != "undefined"'>,ORDER_NO = #{orderNo} /* 订单号 */ </if><if test='orderCount != null'>,ORDER_COUNT = #{orderCount} /* 表数目 */ </if><if test='priceDecimal != null'>,PRICE_DECIMAL = #{priceDecimal} /* 品类价格 */ </if><if test='priceDouble != null'>,PRICE_DOUBLE = #{priceDouble} /* 类目价格 */ </if><if test='priceFloat != null'>,PRICE_FLOAT = #{priceFloat} /* 商品价格 */ </if><if test='created != null'>,CREATED = #{created} /* 创建时间 */ </if><if test='updated != null'>,UPDATED = #{updated} /* 变更日期 */ </if>WHERE ID = #{id} /* 主键ID */ </update><!--*************************************************************************** 13.InsertBatch - 批量新增数据* 注: 根据演示主表List对象执行批量新增操作.**************************************************************************--><insert id="getInsertBatch"parameterType="java.util.List">INSERT /* getInsertBatch+@com.icsm.paybank.sql.TabDemo.xml */ INTO TAB_DEMO /* 演示主表 */ (USER_NAME /* 用户名称 */ ,ORDER_NO /* 订单号 */ ,ORDER_COUNT /* 表数目 */ ,PRICE_DECIMAL /* 品类价格 */ ,PRICE_DOUBLE /* 类目价格 */ ,PRICE_FLOAT /* 商品价格 */ ,CREATED /* 创建时间 */ ,UPDATED /* 变更日期 */ )VALUES <foreach collection="list" item="item" index="index" separator=",">(#{item.userName} /* 用户名称 */ ,#{item.orderNo} /* 订单号 */ ,#{item.orderCount} /* 表数目 */ ,#{item.priceDecimal} /* 品类价格 */ ,#{item.priceDouble} /* 类目价格 */ ,#{item.priceFloat} /* 商品价格 */ ,#{item.created} /* 创建时间 */ ,#{item.updated} /* 变更日期 */ )</foreach></insert><insert id="getInsertBatchPrmMap"parameterType="java.util.List">INSERT /* getInsertBatchPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ INTO TAB_DEMO /* 演示主表 */ (USER_NAME /* 用户名称 */ ,ORDER_NO /* 订单号 */ ,ORDER_COUNT /* 表数目 */ ,PRICE_DECIMAL /* 品类价格 */ ,PRICE_DOUBLE /* 类目价格 */ ,PRICE_FLOAT /* 商品价格 */ ,CREATED /* 创建时间 */ ,UPDATED /* 变更日期 */ )VALUES <foreach collection="list" item="item" index="index" separator=",">(#{item.userName} /* 用户名称 */ ,#{item.orderNo} /* 订单号 */ ,#{item.orderCount} /* 表数目 */ ,#{item.priceDecimal} /* 品类价格 */ ,#{item.priceDouble} /* 类目价格 */ ,#{item.priceFloat} /* 商品价格 */ ,#{item.created} /* 创建时间 */ ,#{item.updated} /* 变更日期 */ )</foreach></insert><!--*************************************************************************** 14.UpdateBatch - 批量更新数据* 注: 根据演示主表List对象执行批量更新操作.**************************************************************************--><update id="getUpdateBatch"parameterType="java.util.List"><foreach collection="list" item="item" index="index" separator=";">UPDATE /* getUpdateBatch+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET ID = #{item.id} /* 主键ID */ <if test='item.userName != null and item.userName != "" and item.userName != "null" and item.userName != "undefined"'>,USER_NAME = #{item.userName} /* 用户名称 */ </if><if test='item.orderNo != null and item.orderNo != "" and item.orderNo != "null" and item.orderNo != "undefined"'>,ORDER_NO = #{item.orderNo} /* 订单号 */ </if><if test='item.orderCount != null'>,ORDER_COUNT = #{item.orderCount} /* 表数目 */ </if><if test='item.priceDecimal != null'>,PRICE_DECIMAL = #{item.priceDecimal} /* 品类价格 */ </if><if test='item.priceDouble != null'>,PRICE_DOUBLE = #{item.priceDouble} /* 类目价格 */ </if><if test='item.priceFloat != null'>,PRICE_FLOAT = #{item.priceFloat} /* 商品价格 */ </if><if test='item.created != null'>,CREATED = #{item.created} /* 创建时间 */ </if><if test='item.updated != null'>,UPDATED = #{item.updated} /* 变更日期 */ </if>WHERE ID = #{item.id} /* 主键ID */ </foreach></update><update id="getUpdateBatchPrmMap"parameterType="java.util.List"><foreach collection="list" item="item" index="index" separator=";">UPDATE /* getUpdateBatchPrmMap+@com.icsm.paybank.sql.TabDemo.xml */ TAB_DEMO /* 演示主表 */ SET ID = #{item.id} /* 主键ID */ <if test='item.userName != null and item.userName != "" and item.userName != "null" and item.userName != "undefined"'>,USER_NAME = #{item.userName} /* 用户名称 */ </if><if test='item.orderNo != null and item.orderNo != "" and item.orderNo != "null" and item.orderNo != "undefined"'>,ORDER_NO = #{item.orderNo} /* 订单号 */ </if><if test='item.orderCount != null'>,ORDER_COUNT = #{item.orderCount} /* 表数目 */ </if><if test='item.priceDecimal != null'>,PRICE_DECIMAL = #{item.priceDecimal} /* 品类价格 */ </if><if test='item.priceDouble != null'>,PRICE_DOUBLE = #{item.priceDouble} /* 类目价格 */ </if><if test='item.priceFloat != null'>,PRICE_FLOAT = #{item.priceFloat} /* 商品价格 */ </if><if test='item.created != null'>,CREATED = #{item.created} /* 创建时间 */ </if><if test='item.updated != null'>,UPDATED = #{item.updated} /* 变更日期 */ </if>WHERE ID = #{item.id} /* 主键ID */ </foreach></update></mapper>