通用Generator

This commit is contained in:
shuzheng 2017-01-11 13:51:57 +08:00
parent d0d7ce757c
commit a211e8c5e2
46 changed files with 1438 additions and 1443 deletions

View File

@ -2,18 +2,6 @@ package com.zheng.cms.dao;
import com.zheng.common.util.MybatisGeneratorConfigUtil;
import com.zheng.common.util.PropertiesFileUtil;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.exception.InvalidConfigurationException;
import org.mybatis.generator.exception.XMLParserException;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* 代码生成类
@ -30,37 +18,10 @@ public class Generator {
/**
* 自动代码生成
*
* @param args
*/
public static void main(String[] args) {
// 更新generatorConfig.xml文件
MybatisGeneratorConfigUtil.generator(JDBC_DRIVER, JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD, MODULE_PREFIX_NAME);
// 生成代码
try {
System.out.println("start generator ...");
List<String> warnings = new ArrayList<>();
File configFile = new File(Generator.class.getResource("/generatorConfig.xml").getFile());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(true);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
for (String warning : warnings) {
System.out.println(warning);
}
System.out.println("end generator!");
} catch (IOException e) {
e.printStackTrace();
} catch (XMLParserException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} catch (InvalidConfigurationException e) {
e.printStackTrace();
}
}
}

View File

@ -2,7 +2,16 @@ package com.zheng.common.util;
import org.apache.commons.lang.ObjectUtils;
import org.apache.velocity.VelocityContext;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.exception.InvalidConfigurationException;
import org.mybatis.generator.exception.XMLParserException;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -32,7 +41,7 @@ public class MybatisGeneratorConfigUtil {
String jdbc_password,
String module_prefix_name) {
String module_path = PROJECT_NAME + "-" + module_prefix_name.replaceAll("\\.", "-") + "/" + PROJECT_NAME + "-" + module_prefix_name.replaceAll("\\.", "-") + "-dao/src/main/resources/generatorConfig.xml";
String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + DATABASE_NAME + "' AND table_name LIKE '" + module_prefix_name + "_%';";
String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + DATABASE_NAME + "' AND table_name LIKE '" + module_prefix_name.replaceAll("\\.", "_") + "_%';";
System.out.println("========== 开始生成generatorConfig.xml文件 ==========");
try {
VelocityContext context= new VelocityContext();
@ -61,6 +70,31 @@ public class MybatisGeneratorConfigUtil {
e.printStackTrace();
}
System.out.println("========== 结束生成generatorConfig.xml文件 ==========");
System.out.println("========== 开始运行MybatisGenerator ==========");
// 生成代码
try {
List<String> warnings = new ArrayList<>();
File configFile = new File(MybatisGeneratorConfigUtil.class.getResource("/generatorConfig.xml").getFile());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(true);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
for (String warning : warnings) {
System.out.println(warning);
}
} catch (IOException e) {
e.printStackTrace();
} catch (XMLParserException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} catch (InvalidConfigurationException e) {
e.printStackTrace();
}
System.out.println("========== 结束运行MybatisGenerator ==========");
}
}

View File

@ -17,7 +17,7 @@ public class Generator {
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password");
/**
* 根据模板生成generatorConfig.xml文件
* 自动代码生成
* @param args
*/
public static void main(String[] args) {

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayInOrderDetailMapper {
int countByExample(PayInOrderDetailExample example);
long countByExample(PayInOrderDetailExample example);
int deleteByExample(PayInOrderDetailExample example);

View File

@ -1,34 +1,34 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayInOrderDetailMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayInOrderDetail" >
<id column="pay_in_order_detail_id" property="payInOrderDetailId" jdbcType="INTEGER" />
<result column="pay_in_order_id" property="payInOrderId" jdbcType="INTEGER" />
<result column="product_id" property="productId" jdbcType="VARCHAR" />
<result column="product_name" property="productName" jdbcType="VARCHAR" />
<result column="product_price" property="productPrice" jdbcType="DECIMAL" />
<result column="product_count" property="productCount" jdbcType="INTEGER" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayInOrderDetailMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayInOrderDetail">
<id column="pay_in_order_detail_id" jdbcType="INTEGER" property="payInOrderDetailId" />
<result column="pay_in_order_id" jdbcType="INTEGER" property="payInOrderId" />
<result column="product_id" jdbcType="VARCHAR" property="productId" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="product_price" jdbcType="DECIMAL" property="productPrice" />
<result column="product_count" jdbcType="INTEGER" property="productCount" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -39,25 +39,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -68,49 +68,49 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_in_order_detail_id, pay_in_order_id, product_id, product_name, product_price,
product_count, remark
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_in_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_in_order_detail
where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_in_order_detail
where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample">
delete from pay_in_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayInOrderDetail" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayInOrderDetail">
insert into pay_in_order_detail (pay_in_order_detail_id, pay_in_order_id,
product_id, product_name, product_price,
product_count, remark)
@ -118,91 +118,91 @@
#{productId,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productPrice,jdbcType=DECIMAL},
#{productCount,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayInOrderDetail" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayInOrderDetail">
insert into pay_in_order_detail
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payInOrderDetailId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payInOrderDetailId != null">
pay_in_order_detail_id,
</if>
<if test="payInOrderId != null" >
<if test="payInOrderId != null">
pay_in_order_id,
</if>
<if test="productId != null" >
<if test="productId != null">
product_id,
</if>
<if test="productName != null" >
<if test="productName != null">
product_name,
</if>
<if test="productPrice != null" >
<if test="productPrice != null">
product_price,
</if>
<if test="productCount != null" >
<if test="productCount != null">
product_count,
</if>
<if test="remark != null" >
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payInOrderDetailId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payInOrderDetailId != null">
#{payInOrderDetailId,jdbcType=INTEGER},
</if>
<if test="payInOrderId != null" >
<if test="payInOrderId != null">
#{payInOrderId,jdbcType=INTEGER},
</if>
<if test="productId != null" >
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="productName != null" >
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="productPrice != null" >
<if test="productPrice != null">
#{productPrice,jdbcType=DECIMAL},
</if>
<if test="productCount != null" >
<if test="productCount != null">
#{productCount,jdbcType=INTEGER},
</if>
<if test="remark != null" >
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayInOrderDetailExample" resultType="java.lang.Long">
select count(*) from pay_in_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_in_order_detail
<set >
<if test="record.payInOrderDetailId != null" >
<set>
<if test="record.payInOrderDetailId != null">
pay_in_order_detail_id = #{record.payInOrderDetailId,jdbcType=INTEGER},
</if>
<if test="record.payInOrderId != null" >
<if test="record.payInOrderId != null">
pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER},
</if>
<if test="record.productId != null" >
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=VARCHAR},
</if>
<if test="record.productName != null" >
<if test="record.productName != null">
product_name = #{record.productName,jdbcType=VARCHAR},
</if>
<if test="record.productPrice != null" >
<if test="record.productPrice != null">
product_price = #{record.productPrice,jdbcType=DECIMAL},
</if>
<if test="record.productCount != null" >
<if test="record.productCount != null">
product_count = #{record.productCount,jdbcType=INTEGER},
</if>
<if test="record.remark != null" >
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_in_order_detail
set pay_in_order_detail_id = #{record.payInOrderDetailId,jdbcType=INTEGER},
pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER},
@ -211,35 +211,35 @@
product_price = #{record.productPrice,jdbcType=DECIMAL},
product_count = #{record.productCount,jdbcType=INTEGER},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayInOrderDetail" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayInOrderDetail">
update pay_in_order_detail
<set >
<if test="payInOrderId != null" >
<set>
<if test="payInOrderId != null">
pay_in_order_id = #{payInOrderId,jdbcType=INTEGER},
</if>
<if test="productId != null" >
<if test="productId != null">
product_id = #{productId,jdbcType=VARCHAR},
</if>
<if test="productName != null" >
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="productPrice != null" >
<if test="productPrice != null">
product_price = #{productPrice,jdbcType=DECIMAL},
</if>
<if test="productCount != null" >
<if test="productCount != null">
product_count = #{productCount,jdbcType=INTEGER},
</if>
<if test="remark != null" >
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where pay_in_order_detail_id = #{payInOrderDetailId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayInOrderDetail" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayInOrderDetail">
update pay_in_order_detail
set pay_in_order_id = #{payInOrderId,jdbcType=INTEGER},
product_id = #{productId,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayInOrderMapper {
int countByExample(PayInOrderExample example);
long countByExample(PayInOrderExample example);
int deleteByExample(PayInOrderExample example);

View File

@ -1,33 +1,33 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayInOrderMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayInOrder" >
<id column="pay_in_order_id" property="payInOrderId" jdbcType="INTEGER" />
<result column="pay_mch_id" property="payMchId" jdbcType="INTEGER" />
<result column="pay_vendor_id" property="payVendorId" jdbcType="INTEGER" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="ctime" property="ctime" jdbcType="BIGINT" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayInOrderMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayInOrder">
<id column="pay_in_order_id" jdbcType="INTEGER" property="payInOrderId" />
<result column="pay_mch_id" jdbcType="INTEGER" property="payMchId" />
<result column="pay_vendor_id" jdbcType="INTEGER" property="payVendorId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -38,25 +38,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -67,48 +67,48 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_in_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayInOrderExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayInOrderExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_in_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_in_order
where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_in_order
where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayInOrderExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayInOrderExample">
delete from pay_in_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayInOrder" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayInOrder">
insert into pay_in_order (pay_in_order_id, pay_mch_id, pay_vendor_id,
amount, status, ctime
)
@ -116,82 +116,82 @@
#{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayInOrder" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayInOrder">
insert into pay_in_order
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payInOrderId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payInOrderId != null">
pay_in_order_id,
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
pay_mch_id,
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id,
</if>
<if test="amount != null" >
<if test="amount != null">
amount,
</if>
<if test="status != null" >
<if test="status != null">
status,
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payInOrderId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payInOrderId != null">
#{payInOrderId,jdbcType=INTEGER},
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
#{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
#{payVendorId,jdbcType=INTEGER},
</if>
<if test="amount != null" >
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="status != null" >
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayInOrderExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayInOrderExample" resultType="java.lang.Long">
select count(*) from pay_in_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_in_order
<set >
<if test="record.payInOrderId != null" >
<set>
<if test="record.payInOrderId != null">
pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER},
</if>
<if test="record.payMchId != null" >
<if test="record.payMchId != null">
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
</if>
<if test="record.payVendorId != null" >
<if test="record.payVendorId != null">
pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER},
</if>
<if test="record.amount != null" >
<if test="record.amount != null">
amount = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.status != null" >
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.ctime != null" >
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_in_order
set pay_in_order_id = #{record.payInOrderId,jdbcType=INTEGER},
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
@ -199,32 +199,32 @@
amount = #{record.amount,jdbcType=DECIMAL},
status = #{record.status,jdbcType=TINYINT},
ctime = #{record.ctime,jdbcType=BIGINT}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayInOrder" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayInOrder">
update pay_in_order
<set >
<if test="payMchId != null" >
<set>
<if test="payMchId != null">
pay_mch_id = #{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id = #{payVendorId,jdbcType=INTEGER},
</if>
<if test="amount != null" >
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="status != null" >
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
</set>
where pay_in_order_id = #{payInOrderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayInOrder" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayInOrder">
update pay_in_order
set pay_mch_id = #{payMchId,jdbcType=INTEGER},
pay_vendor_id = #{payVendorId,jdbcType=INTEGER},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayMchMapper {
int countByExample(PayMchExample example);
long countByExample(PayMchExample example);
int deleteByExample(PayMchExample example);

View File

@ -1,32 +1,32 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayMchMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayMch" >
<id column="pay_mch_id" property="payMchId" jdbcType="INTEGER" />
<result column="mch_id" property="mchId" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="reqKey" property="reqkey" jdbcType="VARCHAR" />
<result column="resKey" property="reskey" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayMchMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayMch">
<id column="pay_mch_id" jdbcType="INTEGER" property="payMchId" />
<result column="mch_id" jdbcType="VARCHAR" property="mchId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="reqKey" jdbcType="VARCHAR" property="reqkey" />
<result column="resKey" jdbcType="VARCHAR" property="reskey" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -37,25 +37,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -66,149 +66,149 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_mch_id, mch_id, name, reqKey, resKey
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayMchExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayMchExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_mch
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_mch
where pay_mch_id = #{payMchId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_mch
where pay_mch_id = #{payMchId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayMchExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayMchExample">
delete from pay_mch
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayMch" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayMch">
insert into pay_mch (pay_mch_id, mch_id, name,
reqKey, resKey)
values (#{payMchId,jdbcType=INTEGER}, #{mchId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{reqkey,jdbcType=VARCHAR}, #{reskey,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayMch" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayMch">
insert into pay_mch
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payMchId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payMchId != null">
pay_mch_id,
</if>
<if test="mchId != null" >
<if test="mchId != null">
mch_id,
</if>
<if test="name != null" >
<if test="name != null">
name,
</if>
<if test="reqkey != null" >
<if test="reqkey != null">
reqKey,
</if>
<if test="reskey != null" >
<if test="reskey != null">
resKey,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payMchId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payMchId != null">
#{payMchId,jdbcType=INTEGER},
</if>
<if test="mchId != null" >
<if test="mchId != null">
#{mchId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="reqkey != null" >
<if test="reqkey != null">
#{reqkey,jdbcType=VARCHAR},
</if>
<if test="reskey != null" >
<if test="reskey != null">
#{reskey,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayMchExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayMchExample" resultType="java.lang.Long">
select count(*) from pay_mch
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_mch
<set >
<if test="record.payMchId != null" >
<set>
<if test="record.payMchId != null">
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
</if>
<if test="record.mchId != null" >
<if test="record.mchId != null">
mch_id = #{record.mchId,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.reqkey != null" >
<if test="record.reqkey != null">
reqKey = #{record.reqkey,jdbcType=VARCHAR},
</if>
<if test="record.reskey != null" >
<if test="record.reskey != null">
resKey = #{record.reskey,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_mch
set pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
mch_id = #{record.mchId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
reqKey = #{record.reqkey,jdbcType=VARCHAR},
resKey = #{record.reskey,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayMch" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayMch">
update pay_mch
<set >
<if test="mchId != null" >
<set>
<if test="mchId != null">
mch_id = #{mchId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="reqkey != null" >
<if test="reqkey != null">
reqKey = #{reqkey,jdbcType=VARCHAR},
</if>
<if test="reskey != null" >
<if test="reskey != null">
resKey = #{reskey,jdbcType=VARCHAR},
</if>
</set>
where pay_mch_id = #{payMchId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayMch" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayMch">
update pay_mch
set mch_id = #{mchId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayOutOrderDetailMapper {
int countByExample(PayOutOrderDetailExample example);
long countByExample(PayOutOrderDetailExample example);
int deleteByExample(PayOutOrderDetailExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayOutOrderDetailMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayOutOrderDetail" >
<id column="pay_out_order_detail_id" property="payOutOrderDetailId" jdbcType="INTEGER" />
<result column="pay_out_order_id" property="payOutOrderId" jdbcType="INTEGER" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayOutOrderDetailMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayOutOrderDetail">
<id column="pay_out_order_detail_id" jdbcType="INTEGER" property="payOutOrderDetailId" />
<result column="pay_out_order_id" jdbcType="INTEGER" property="payOutOrderId" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_out_order_detail_id, pay_out_order_id, remark
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_out_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_out_order_detail
where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_out_order_detail
where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample">
delete from pay_out_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail">
insert into pay_out_order_detail (pay_out_order_detail_id, pay_out_order_id,
remark)
values (#{payOutOrderDetailId,jdbcType=INTEGER}, #{payOutOrderId,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail">
insert into pay_out_order_detail
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payOutOrderDetailId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payOutOrderDetailId != null">
pay_out_order_detail_id,
</if>
<if test="payOutOrderId != null" >
<if test="payOutOrderId != null">
pay_out_order_id,
</if>
<if test="remark != null" >
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payOutOrderDetailId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payOutOrderDetailId != null">
#{payOutOrderDetailId,jdbcType=INTEGER},
</if>
<if test="payOutOrderId != null" >
<if test="payOutOrderId != null">
#{payOutOrderId,jdbcType=INTEGER},
</if>
<if test="remark != null" >
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderDetailExample" resultType="java.lang.Long">
select count(*) from pay_out_order_detail
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_out_order_detail
<set >
<if test="record.payOutOrderDetailId != null" >
<set>
<if test="record.payOutOrderDetailId != null">
pay_out_order_detail_id = #{record.payOutOrderDetailId,jdbcType=INTEGER},
</if>
<if test="record.payOutOrderId != null" >
<if test="record.payOutOrderId != null">
pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER},
</if>
<if test="record.remark != null" >
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_out_order_detail
set pay_out_order_detail_id = #{record.payOutOrderDetailId,jdbcType=INTEGER},
pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail">
update pay_out_order_detail
<set >
<if test="payOutOrderId != null" >
<set>
<if test="payOutOrderId != null">
pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER},
</if>
<if test="remark != null" >
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where pay_out_order_detail_id = #{payOutOrderDetailId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayOutOrderDetail">
update pay_out_order_detail
set pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayOutOrderMapper {
int countByExample(PayOutOrderExample example);
long countByExample(PayOutOrderExample example);
int deleteByExample(PayOutOrderExample example);

View File

@ -1,33 +1,33 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayOutOrderMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayOutOrder" >
<id column="pay_out_order_id" property="payOutOrderId" jdbcType="INTEGER" />
<result column="pay_mch_id" property="payMchId" jdbcType="INTEGER" />
<result column="pay_vendor_id" property="payVendorId" jdbcType="INTEGER" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="ctime" property="ctime" jdbcType="BIGINT" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayOutOrderMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayOutOrder">
<id column="pay_out_order_id" jdbcType="INTEGER" property="payOutOrderId" />
<result column="pay_mch_id" jdbcType="INTEGER" property="payMchId" />
<result column="pay_vendor_id" jdbcType="INTEGER" property="payVendorId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -38,25 +38,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -67,48 +67,48 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_out_order_id, pay_mch_id, pay_vendor_id, amount, status, ctime
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayOutOrderExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_out_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_out_order
where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_out_order
where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderExample">
delete from pay_out_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayOutOrder" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayOutOrder">
insert into pay_out_order (pay_out_order_id, pay_mch_id, pay_vendor_id,
amount, status, ctime
)
@ -116,82 +116,82 @@
#{amount,jdbcType=DECIMAL}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayOutOrder" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayOutOrder">
insert into pay_out_order
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payOutOrderId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payOutOrderId != null">
pay_out_order_id,
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
pay_mch_id,
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id,
</if>
<if test="amount != null" >
<if test="amount != null">
amount,
</if>
<if test="status != null" >
<if test="status != null">
status,
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payOutOrderId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payOutOrderId != null">
#{payOutOrderId,jdbcType=INTEGER},
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
#{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
#{payVendorId,jdbcType=INTEGER},
</if>
<if test="amount != null" >
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="status != null" >
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayOutOrderExample" resultType="java.lang.Long">
select count(*) from pay_out_order
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_out_order
<set >
<if test="record.payOutOrderId != null" >
<set>
<if test="record.payOutOrderId != null">
pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER},
</if>
<if test="record.payMchId != null" >
<if test="record.payMchId != null">
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
</if>
<if test="record.payVendorId != null" >
<if test="record.payVendorId != null">
pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER},
</if>
<if test="record.amount != null" >
<if test="record.amount != null">
amount = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.status != null" >
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.ctime != null" >
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_out_order
set pay_out_order_id = #{record.payOutOrderId,jdbcType=INTEGER},
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
@ -199,32 +199,32 @@
amount = #{record.amount,jdbcType=DECIMAL},
status = #{record.status,jdbcType=TINYINT},
ctime = #{record.ctime,jdbcType=BIGINT}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayOutOrder" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayOutOrder">
update pay_out_order
<set >
<if test="payMchId != null" >
<set>
<if test="payMchId != null">
pay_mch_id = #{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id = #{payVendorId,jdbcType=INTEGER},
</if>
<if test="amount != null" >
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="status != null" >
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
</set>
where pay_out_order_id = #{payOutOrderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayOutOrder" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayOutOrder">
update pay_out_order
set pay_mch_id = #{payMchId,jdbcType=INTEGER},
pay_vendor_id = #{payVendorId,jdbcType=INTEGER},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayPayMapper {
int countByExample(PayPayExample example);
long countByExample(PayPayExample example);
int deleteByExample(PayPayExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayPayMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayPay" >
<id column="pay_pay_id" property="payPayId" jdbcType="INTEGER" />
<result column="pay_type_id" property="payTypeId" jdbcType="INTEGER" />
<result column="param" property="param" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayPayMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayPay">
<id column="pay_pay_id" jdbcType="INTEGER" property="payPayId" />
<result column="pay_type_id" jdbcType="INTEGER" property="payTypeId" />
<result column="param" jdbcType="VARCHAR" property="param" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_pay_id, pay_type_id, param
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayPayExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayPayExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_pay
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_pay
where pay_pay_id = #{payPayId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_pay
where pay_pay_id = #{payPayId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayPayExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayPayExample">
delete from pay_pay
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayPay" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayPay">
insert into pay_pay (pay_pay_id, pay_type_id, param
)
values (#{payPayId,jdbcType=INTEGER}, #{payTypeId,jdbcType=INTEGER}, #{param,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayPay" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayPay">
insert into pay_pay
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payPayId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payPayId != null">
pay_pay_id,
</if>
<if test="payTypeId != null" >
<if test="payTypeId != null">
pay_type_id,
</if>
<if test="param != null" >
<if test="param != null">
param,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payPayId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payPayId != null">
#{payPayId,jdbcType=INTEGER},
</if>
<if test="payTypeId != null" >
<if test="payTypeId != null">
#{payTypeId,jdbcType=INTEGER},
</if>
<if test="param != null" >
<if test="param != null">
#{param,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayPayExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayPayExample" resultType="java.lang.Long">
select count(*) from pay_pay
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_pay
<set >
<if test="record.payPayId != null" >
<set>
<if test="record.payPayId != null">
pay_pay_id = #{record.payPayId,jdbcType=INTEGER},
</if>
<if test="record.payTypeId != null" >
<if test="record.payTypeId != null">
pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
</if>
<if test="record.param != null" >
<if test="record.param != null">
param = #{record.param,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_pay
set pay_pay_id = #{record.payPayId,jdbcType=INTEGER},
pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
param = #{record.param,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayPay" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayPay">
update pay_pay
<set >
<if test="payTypeId != null" >
<set>
<if test="payTypeId != null">
pay_type_id = #{payTypeId,jdbcType=INTEGER},
</if>
<if test="param != null" >
<if test="param != null">
param = #{param,jdbcType=VARCHAR},
</if>
</set>
where pay_pay_id = #{payPayId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayPay" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayPay">
update pay_pay
set pay_type_id = #{payTypeId,jdbcType=INTEGER},
param = #{param,jdbcType=VARCHAR}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayTypeMapper {
int countByExample(PayTypeExample example);
long countByExample(PayTypeExample example);
int deleteByExample(PayTypeExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayTypeMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayType" >
<id column="pay_type_id" property="payTypeId" jdbcType="INTEGER" />
<result column="pay_mch_id" property="payMchId" jdbcType="INTEGER" />
<result column="pay_vendor_id" property="payVendorId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayTypeMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayType">
<id column="pay_type_id" jdbcType="INTEGER" property="payTypeId" />
<result column="pay_mch_id" jdbcType="INTEGER" property="payMchId" />
<result column="pay_vendor_id" jdbcType="INTEGER" property="payVendorId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_type_id, pay_mch_id, pay_vendor_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayTypeExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayTypeExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_type
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_type
where pay_type_id = #{payTypeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_type
where pay_type_id = #{payTypeId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayTypeExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayTypeExample">
delete from pay_type
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayType" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayType">
insert into pay_type (pay_type_id, pay_mch_id, pay_vendor_id
)
values (#{payTypeId,jdbcType=INTEGER}, #{payMchId,jdbcType=INTEGER}, #{payVendorId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayType" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayType">
insert into pay_type
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payTypeId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payTypeId != null">
pay_type_id,
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
pay_mch_id,
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payTypeId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payTypeId != null">
#{payTypeId,jdbcType=INTEGER},
</if>
<if test="payMchId != null" >
<if test="payMchId != null">
#{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
#{payVendorId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayTypeExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayTypeExample" resultType="java.lang.Long">
select count(*) from pay_type
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_type
<set >
<if test="record.payTypeId != null" >
<set>
<if test="record.payTypeId != null">
pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
</if>
<if test="record.payMchId != null" >
<if test="record.payMchId != null">
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
</if>
<if test="record.payVendorId != null" >
<if test="record.payVendorId != null">
pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_type
set pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
pay_mch_id = #{record.payMchId,jdbcType=INTEGER},
pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayType" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayType">
update pay_type
<set >
<if test="payMchId != null" >
<set>
<if test="payMchId != null">
pay_mch_id = #{payMchId,jdbcType=INTEGER},
</if>
<if test="payVendorId != null" >
<if test="payVendorId != null">
pay_vendor_id = #{payVendorId,jdbcType=INTEGER},
</if>
</set>
where pay_type_id = #{payTypeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayType" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayType">
update pay_type
set pay_mch_id = #{payMchId,jdbcType=INTEGER},
pay_vendor_id = #{payVendorId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayVendorMapper {
int countByExample(PayVendorExample example);
long countByExample(PayVendorExample example);
int deleteByExample(PayVendorExample example);

View File

@ -1,32 +1,32 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayVendorMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayVendor" >
<id column="pay_vendor_id" property="payVendorId" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="appid" property="appid" jdbcType="VARCHAR" />
<result column="appsecret" property="appsecret" jdbcType="VARCHAR" />
<result column="config" property="config" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayVendorMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayVendor">
<id column="pay_vendor_id" jdbcType="INTEGER" property="payVendorId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
<result column="appsecret" jdbcType="VARCHAR" property="appsecret" />
<result column="config" jdbcType="VARCHAR" property="config" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -37,25 +37,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -66,149 +66,149 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_vendor_id, name, appid, appsecret, config
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayVendorExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayVendorExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_vendor
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_vendor
where pay_vendor_id = #{payVendorId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_vendor
where pay_vendor_id = #{payVendorId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayVendorExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayVendorExample">
delete from pay_vendor
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayVendor" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayVendor">
insert into pay_vendor (pay_vendor_id, name, appid,
appsecret, config)
values (#{payVendorId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR},
#{appsecret,jdbcType=VARCHAR}, #{config,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayVendor" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayVendor">
insert into pay_vendor
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payVendorId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payVendorId != null">
pay_vendor_id,
</if>
<if test="name != null" >
<if test="name != null">
name,
</if>
<if test="appid != null" >
<if test="appid != null">
appid,
</if>
<if test="appsecret != null" >
<if test="appsecret != null">
appsecret,
</if>
<if test="config != null" >
<if test="config != null">
config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payVendorId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payVendorId != null">
#{payVendorId,jdbcType=INTEGER},
</if>
<if test="name != null" >
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="appid != null" >
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="appsecret != null" >
<if test="appsecret != null">
#{appsecret,jdbcType=VARCHAR},
</if>
<if test="config != null" >
<if test="config != null">
#{config,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayVendorExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayVendorExample" resultType="java.lang.Long">
select count(*) from pay_vendor
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_vendor
<set >
<if test="record.payVendorId != null" >
<set>
<if test="record.payVendorId != null">
pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER},
</if>
<if test="record.name != null" >
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.appid != null" >
<if test="record.appid != null">
appid = #{record.appid,jdbcType=VARCHAR},
</if>
<if test="record.appsecret != null" >
<if test="record.appsecret != null">
appsecret = #{record.appsecret,jdbcType=VARCHAR},
</if>
<if test="record.config != null" >
<if test="record.config != null">
config = #{record.config,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_vendor
set pay_vendor_id = #{record.payVendorId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
appid = #{record.appid,jdbcType=VARCHAR},
appsecret = #{record.appsecret,jdbcType=VARCHAR},
config = #{record.config,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayVendor" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayVendor">
update pay_vendor
<set >
<if test="name != null" >
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="appid != null" >
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
<if test="appsecret != null" >
<if test="appsecret != null">
appsecret = #{appsecret,jdbcType=VARCHAR},
</if>
<if test="config != null" >
<if test="config != null">
config = #{config,jdbcType=VARCHAR},
</if>
</set>
where pay_vendor_id = #{payVendorId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayVendor" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayVendor">
update pay_vendor
set name = #{name,jdbcType=VARCHAR},
appid = #{appid,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PayVestMapper {
int countByExample(PayVestExample example);
long countByExample(PayVestExample example);
int deleteByExample(PayVestExample example);

View File

@ -1,31 +1,31 @@
<?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" >
<mapper namespace="com.zheng.pay.dao.mapper.PayVestMapper" >
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayVest" >
<id column="pay_vest_id" property="payVestId" jdbcType="INTEGER" />
<result column="pay_type_id" property="payTypeId" jdbcType="INTEGER" />
<result column="prefix" property="prefix" jdbcType="VARCHAR" />
<result column="param" property="param" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.pay.dao.mapper.PayVestMapper">
<resultMap id="BaseResultMap" type="com.zheng.pay.dao.model.PayVest">
<id column="pay_vest_id" jdbcType="INTEGER" property="payVestId" />
<result column="pay_type_id" jdbcType="INTEGER" property="payTypeId" />
<result column="prefix" jdbcType="VARCHAR" property="prefix" />
<result column="param" jdbcType="VARCHAR" property="param" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -36,25 +36,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -65,136 +65,136 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
pay_vest_id, pay_type_id, prefix, param
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.pay.dao.model.PayVestExample" >
<select id="selectByExample" parameterType="com.zheng.pay.dao.model.PayVestExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pay_vest
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pay_vest
where pay_vest_id = #{payVestId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from pay_vest
where pay_vest_id = #{payVestId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayVestExample" >
<delete id="deleteByExample" parameterType="com.zheng.pay.dao.model.PayVestExample">
delete from pay_vest
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayVest" >
<insert id="insert" parameterType="com.zheng.pay.dao.model.PayVest">
insert into pay_vest (pay_vest_id, pay_type_id, prefix,
param)
values (#{payVestId,jdbcType=INTEGER}, #{payTypeId,jdbcType=INTEGER}, #{prefix,jdbcType=VARCHAR},
#{param,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayVest" >
<insert id="insertSelective" parameterType="com.zheng.pay.dao.model.PayVest">
insert into pay_vest
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="payVestId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payVestId != null">
pay_vest_id,
</if>
<if test="payTypeId != null" >
<if test="payTypeId != null">
pay_type_id,
</if>
<if test="prefix != null" >
<if test="prefix != null">
prefix,
</if>
<if test="param != null" >
<if test="param != null">
param,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="payVestId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payVestId != null">
#{payVestId,jdbcType=INTEGER},
</if>
<if test="payTypeId != null" >
<if test="payTypeId != null">
#{payTypeId,jdbcType=INTEGER},
</if>
<if test="prefix != null" >
<if test="prefix != null">
#{prefix,jdbcType=VARCHAR},
</if>
<if test="param != null" >
<if test="param != null">
#{param,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayVestExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.pay.dao.model.PayVestExample" resultType="java.lang.Long">
select count(*) from pay_vest
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update pay_vest
<set >
<if test="record.payVestId != null" >
<set>
<if test="record.payVestId != null">
pay_vest_id = #{record.payVestId,jdbcType=INTEGER},
</if>
<if test="record.payTypeId != null" >
<if test="record.payTypeId != null">
pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
</if>
<if test="record.prefix != null" >
<if test="record.prefix != null">
prefix = #{record.prefix,jdbcType=VARCHAR},
</if>
<if test="record.param != null" >
<if test="record.param != null">
param = #{record.param,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update pay_vest
set pay_vest_id = #{record.payVestId,jdbcType=INTEGER},
pay_type_id = #{record.payTypeId,jdbcType=INTEGER},
prefix = #{record.prefix,jdbcType=VARCHAR},
param = #{record.param,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayVest" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.pay.dao.model.PayVest">
update pay_vest
<set >
<if test="payTypeId != null" >
<set>
<if test="payTypeId != null">
pay_type_id = #{payTypeId,jdbcType=INTEGER},
</if>
<if test="prefix != null" >
<if test="prefix != null">
prefix = #{prefix,jdbcType=VARCHAR},
</if>
<if test="param != null" >
<if test="param != null">
param = #{param,jdbcType=VARCHAR},
</if>
</set>
where pay_vest_id = #{payVestId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayVest" >
<update id="updateByPrimaryKey" parameterType="com.zheng.pay.dao.model.PayVest">
update pay_vest
set pay_type_id = #{payTypeId,jdbcType=INTEGER},
prefix = #{prefix,jdbcType=VARCHAR},

View File

@ -8,13 +8,12 @@
<!-- mysql驱动包 -->
<classPathEntry location="${classPathEntry}" />
<context id="context" targetRuntime="MyBatis3">
<context id="MysqlContext" targetRuntime="MyBatis3" defaultModelType="flat">
<property name="javaFileEncoding" value="UTF-8"/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为**反单引号(`)**,配置如下: -->
<property name="beginningDelimiter" value=""/>
<property name="endingDelimiter" value=""/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为` -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
@ -24,7 +23,7 @@
<property name="suppressJavaInterface" value="false"/>
</plugin>
<!-- 生成一个新的selectByExample方法这个方法可以接受一个RowBounds参数,主要用来实现分页 -->
<!-- 生成一个新的selectByExample方法这个方法可以接收offset和limit参数,主要用来实现分页 -->
<plugin type="com.zheng.common.plugin.PaginationPlugin"></plugin>
<!-- 生成在XML中的<cache>元素 -->
@ -44,8 +43,9 @@
<plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"></plugin>
<!-- 生成的代码去掉注释 -->
<commentGenerator>
<commentGenerator type="com.zheng.common.plugin.CommentGenerator">
<property name="suppressAllComments" value="true" />
<property name="suppressDate" value="true"/>
</commentGenerator>
<!-- 数据库连接 -->
@ -55,13 +55,13 @@
password="${jdbc.password}" />
<!-- model生成 -->
<javaModelGenerator targetPackage="com.zheng.pay.dao.model" targetProject="src/main/java" />
<javaModelGenerator targetPackage="com.zheng.pay.dao.model" targetProject="zheng-pay/zheng-pay-dao/src/main/java" />
<!-- MapperXML生成 -->
<sqlMapGenerator targetPackage="com.zheng.pay.dao.mapper" targetProject="src/main/java" />
<sqlMapGenerator targetPackage="com.zheng.pay.dao.mapper" targetProject="zheng-pay/zheng-pay-dao/src/main/java" />
<!-- Mapper接口生成 -->
<javaClientGenerator targetPackage="com.zheng.pay.dao.mapper" targetProject="src/main/java" type="XMLMAPPER" />
<javaClientGenerator targetPackage="com.zheng.pay.dao.mapper" targetProject="zheng-pay/zheng-pay-dao/src/main/java" type="XMLMAPPER" />
<!-- 需要映射的表 -->
<table tableName="pay_in_order" domainObjectName="PayInOrder"></table>

View File

@ -1,4 +1,4 @@
package com.zheng.ucenter.dao;
package com.zheng.cms.dao;
import com.zheng.common.util.MybatisGeneratorConfigUtil;
import com.zheng.common.util.PropertiesFileUtil;
@ -17,7 +17,7 @@ public class Generator {
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password");
/**
* 根据模板生成generatorConfig.xml文件
* 自动代码生成
* @param args
*/
public static void main(String[] args) {

View File

@ -8,13 +8,12 @@
<!-- mysql驱动包 -->
<classPathEntry location="${classPathEntry}" />
<context id="context" targetRuntime="MyBatis3">
<context id="MysqlContext" targetRuntime="MyBatis3" defaultModelType="flat">
<property name="javaFileEncoding" value="UTF-8"/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为**反单引号(`)**,配置如下: -->
<property name="beginningDelimiter" value=""/>
<property name="endingDelimiter" value=""/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为` -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
@ -24,7 +23,7 @@
<property name="suppressJavaInterface" value="false"/>
</plugin>
<!-- 生成一个新的selectByExample方法这个方法可以接受一个RowBounds参数,主要用来实现分页 -->
<!-- 生成一个新的selectByExample方法这个方法可以接收offset和limit参数,主要用来实现分页 -->
<plugin type="com.zheng.common.plugin.PaginationPlugin"></plugin>
<!-- 生成在XML中的<cache>元素 -->
@ -44,8 +43,9 @@
<plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"></plugin>
<!-- 生成的代码去掉注释 -->
<commentGenerator>
<commentGenerator type="com.zheng.common.plugin.CommentGenerator">
<property name="suppressAllComments" value="true" />
<property name="suppressDate" value="true"/>
</commentGenerator>
<!-- 数据库连接 -->
@ -55,13 +55,13 @@
password="${jdbc.password}" />
<!-- model生成 -->
<javaModelGenerator targetPackage="com.zheng.ucenter.dao.model" targetProject="src/main/java" />
<javaModelGenerator targetPackage="com.zheng.ucenter.dao.model" targetProject="zheng-ucenter/zheng-ucenter-dao/src/main/java" />
<!-- MapperXML生成 -->
<sqlMapGenerator targetPackage="com.zheng.ucenter.dao.mapper" targetProject="src/main/java" />
<sqlMapGenerator targetPackage="com.zheng.ucenter.dao.mapper" targetProject="zheng-ucenter/zheng-ucenter-dao/src/main/java" />
<!-- Mapper接口生成 -->
<javaClientGenerator targetPackage="com.zheng.ucenter.dao.mapper" targetProject="src/main/java" type="XMLMAPPER" />
<javaClientGenerator targetPackage="com.zheng.ucenter.dao.mapper" targetProject="zheng-ucenter/zheng-ucenter-dao/src/main/java" type="XMLMAPPER" />
<!-- 需要映射的表 -->
</context>

View File

@ -17,7 +17,7 @@ public class Generator {
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password");
/**
* 根据模板生成generatorConfig.xml文件
* 自动代码生成
* @param args
*/
public static void main(String[] args) {

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsOrganizationMapper {
int countByExample(UpmsOrganizationExample example);
long countByExample(UpmsOrganizationExample example);
int deleteByExample(UpmsOrganizationExample example);

View File

@ -1,31 +1,31 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsOrganizationMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsOrganization" >
<id column="organization_id" property="organizationId" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsOrganizationMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsOrganization">
<id column="organization_id" jdbcType="INTEGER" property="organizationId" />
<result column="system_id" jdbcType="INTEGER" property="systemId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -36,25 +36,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -65,136 +65,136 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
organization_id, system_id, name, description
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_organization
where organization_id = #{organizationId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_organization
where organization_id = #{organizationId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample">
delete from upms_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsOrganization" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
insert into upms_organization (organization_id, system_id, name,
description)
values (#{organizationId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
insert into upms_organization
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="organizationId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="organizationId != null">
organization_id,
</if>
<if test="systemId != null" >
<if test="systemId != null">
system_id,
</if>
<if test="name != null" >
<if test="name != null">
name,
</if>
<if test="description != null" >
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="organizationId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="organizationId != null">
#{organizationId,jdbcType=INTEGER},
</if>
<if test="systemId != null" >
<if test="systemId != null">
#{systemId,jdbcType=INTEGER},
</if>
<if test="name != null" >
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" resultType="java.lang.Long">
select count(*) from upms_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_organization
<set >
<if test="record.organizationId != null" >
<set>
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=INTEGER},
</if>
<if test="record.systemId != null" >
<if test="record.systemId != null">
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
<if test="record.name != null" >
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null" >
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_organization
set organization_id = #{record.organizationId,jdbcType=INTEGER},
system_id = #{record.systemId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
update upms_organization
<set >
<if test="systemId != null" >
<set>
<if test="systemId != null">
system_id = #{systemId,jdbcType=INTEGER},
</if>
<if test="name != null" >
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where organization_id = #{organizationId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsOrganization" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
update upms_organization
set system_id = #{systemId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsPermissionMapper {
int countByExample(UpmsPermissionExample example);
long countByExample(UpmsPermissionExample example);
int deleteByExample(UpmsPermissionExample example);

View File

@ -1,29 +1,29 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsPermissionMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsPermission" >
<id column="permission_id" property="permissionId" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsPermissionMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsPermission">
<id column="permission_id" jdbcType="INTEGER" property="permissionId" />
<result column="system_id" jdbcType="INTEGER" property="systemId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -34,25 +34,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -63,108 +63,108 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
permission_id, system_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample">
delete from upms_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsPermission">
insert into upms_permission (permission_id, system_id)
values (#{permissionId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
insert into upms_permission
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="permissionId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="permissionId != null">
permission_id,
</if>
<if test="systemId != null" >
<if test="systemId != null">
system_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="permissionId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="permissionId != null">
#{permissionId,jdbcType=INTEGER},
</if>
<if test="systemId != null" >
<if test="systemId != null">
#{systemId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultType="java.lang.Long">
select count(*) from upms_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_permission
<set >
<if test="record.permissionId != null" >
<set>
<if test="record.permissionId != null">
permission_id = #{record.permissionId,jdbcType=INTEGER},
</if>
<if test="record.systemId != null" >
<if test="record.systemId != null">
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_permission
set permission_id = #{record.permissionId,jdbcType=INTEGER},
system_id = #{record.systemId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
update upms_permission
<set >
<if test="systemId != null" >
<set>
<if test="systemId != null">
system_id = #{systemId,jdbcType=INTEGER},
</if>
</set>
where permission_id = #{permissionId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsPermission">
update upms_permission
set system_id = #{systemId,jdbcType=INTEGER}
where permission_id = #{permissionId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsRoleMapper {
int countByExample(UpmsRoleExample example);
long countByExample(UpmsRoleExample example);
int deleteByExample(UpmsRoleExample example);

View File

@ -1,34 +1,34 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsRoleMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsRole" >
<id column="role_id" property="roleId" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="ctime" property="ctime" jdbcType="BIGINT" />
<result column="orders" property="orders" jdbcType="BIGINT" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsRoleMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsRole">
<id column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="system_id" jdbcType="INTEGER" property="systemId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -39,25 +39,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -68,48 +68,48 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
role_id, system_id, name, description, status, ctime, orders
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsRoleExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsRoleExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_role
where role_id = #{roleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_role
where role_id = #{roleId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsRoleExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsRoleExample">
delete from upms_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsRole" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsRole">
insert into upms_role (role_id, system_id, name,
description, status, ctime,
orders)
@ -117,91 +117,91 @@
#{description,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{ctime,jdbcType=BIGINT},
#{orders,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsRole" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsRole">
insert into upms_role
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="roleId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">
role_id,
</if>
<if test="systemId != null" >
<if test="systemId != null">
system_id,
</if>
<if test="name != null" >
<if test="name != null">
name,
</if>
<if test="description != null" >
<if test="description != null">
description,
</if>
<if test="status != null" >
<if test="status != null">
status,
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime,
</if>
<if test="orders != null" >
<if test="orders != null">
orders,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="roleId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="roleId != null">
#{roleId,jdbcType=INTEGER},
</if>
<if test="systemId != null" >
<if test="systemId != null">
#{systemId,jdbcType=INTEGER},
</if>
<if test="name != null" >
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="status != null" >
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null" >
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsRoleExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsRoleExample" resultType="java.lang.Long">
select count(*) from upms_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_role
<set >
<if test="record.roleId != null" >
<set>
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.systemId != null" >
<if test="record.systemId != null">
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
<if test="record.name != null" >
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null" >
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.ctime != null" >
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null" >
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_role
set role_id = #{record.roleId,jdbcType=INTEGER},
system_id = #{record.systemId,jdbcType=INTEGER},
@ -210,35 +210,35 @@
status = #{record.status,jdbcType=TINYINT},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsRole" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsRole">
update upms_role
<set >
<if test="systemId != null" >
<set>
<if test="systemId != null">
system_id = #{systemId,jdbcType=INTEGER},
</if>
<if test="name != null" >
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="status != null" >
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null" >
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
</set>
where role_id = #{roleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsRole" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsRole">
update upms_role
set system_id = #{systemId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsRolePermissionMapper {
int countByExample(UpmsRolePermissionExample example);
long countByExample(UpmsRolePermissionExample example);
int deleteByExample(UpmsRolePermissionExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsRolePermissionMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsRolePermission" >
<id column="role_permission_id" property="rolePermissionId" jdbcType="INTEGER" />
<result column="role_id" property="roleId" jdbcType="INTEGER" />
<result column="permission_id" property="permissionId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsRolePermissionMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsRolePermission">
<id column="role_permission_id" jdbcType="INTEGER" property="rolePermissionId" />
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="permission_id" jdbcType="INTEGER" property="permissionId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
role_permission_id, role_id, permission_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_role_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_role_permission
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_role_permission
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample">
delete from upms_role_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsRolePermission" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsRolePermission">
insert into upms_role_permission (role_permission_id, role_id, permission_id
)
values (#{rolePermissionId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsRolePermission" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsRolePermission">
insert into upms_role_permission
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="rolePermissionId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="rolePermissionId != null">
role_permission_id,
</if>
<if test="roleId != null" >
<if test="roleId != null">
role_id,
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
permission_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="rolePermissionId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rolePermissionId != null">
#{rolePermissionId,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
<if test="roleId != null">
#{roleId,jdbcType=INTEGER},
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
#{permissionId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsRolePermissionExample" resultType="java.lang.Long">
select count(*) from upms_role_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_role_permission
<set >
<if test="record.rolePermissionId != null" >
<set>
<if test="record.rolePermissionId != null">
role_permission_id = #{record.rolePermissionId,jdbcType=INTEGER},
</if>
<if test="record.roleId != null" >
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.permissionId != null" >
<if test="record.permissionId != null">
permission_id = #{record.permissionId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_role_permission
set role_permission_id = #{record.rolePermissionId,jdbcType=INTEGER},
role_id = #{record.roleId,jdbcType=INTEGER},
permission_id = #{record.permissionId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsRolePermission" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsRolePermission">
update upms_role_permission
<set >
<if test="roleId != null" >
<set>
<if test="roleId != null">
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
permission_id = #{permissionId,jdbcType=INTEGER},
</if>
</set>
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsRolePermission" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsRolePermission">
update upms_role_permission
set role_id = #{roleId,jdbcType=INTEGER},
permission_id = #{permissionId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsSystemMapper {
int countByExample(UpmsSystemExample example);
long countByExample(UpmsSystemExample example);
int deleteByExample(UpmsSystemExample example);

View File

@ -1,34 +1,34 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsSystemMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsSystem" >
<id column="system_id" property="systemId" jdbcType="INTEGER" />
<result column="icon" property="icon" jdbcType="VARCHAR" />
<result column="basepath" property="basepath" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="SMALLINT" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="ctime" property="ctime" jdbcType="BIGINT" />
<result column="orders" property="orders" jdbcType="BIGINT" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsSystemMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsSystem">
<id column="system_id" jdbcType="INTEGER" property="systemId" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="basepath" jdbcType="VARCHAR" property="basepath" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="ctime" jdbcType="BIGINT" property="ctime" />
<result column="orders" jdbcType="BIGINT" property="orders" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -39,25 +39,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -68,48 +68,48 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
system_id, icon, basepath, status, name, ctime, orders
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsSystemExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsSystemExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_system
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_system
where system_id = #{systemId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_system
where system_id = #{systemId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsSystemExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsSystemExample">
delete from upms_system
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsSystem" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsSystem">
insert into upms_system (system_id, icon, basepath,
status, name, ctime,
orders)
@ -117,91 +117,91 @@
#{status,jdbcType=SMALLINT}, #{name,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT},
#{orders,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsSystem" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsSystem">
insert into upms_system
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="systemId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="systemId != null">
system_id,
</if>
<if test="icon != null" >
<if test="icon != null">
icon,
</if>
<if test="basepath != null" >
<if test="basepath != null">
basepath,
</if>
<if test="status != null" >
<if test="status != null">
status,
</if>
<if test="name != null" >
<if test="name != null">
name,
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime,
</if>
<if test="orders != null" >
<if test="orders != null">
orders,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="systemId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="systemId != null">
#{systemId,jdbcType=INTEGER},
</if>
<if test="icon != null" >
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="basepath != null" >
<if test="basepath != null">
#{basepath,jdbcType=VARCHAR},
</if>
<if test="status != null" >
<if test="status != null">
#{status,jdbcType=SMALLINT},
</if>
<if test="name != null" >
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="ctime != null" >
<if test="ctime != null">
#{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null" >
<if test="orders != null">
#{orders,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsSystemExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsSystemExample" resultType="java.lang.Long">
select count(*) from upms_system
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_system
<set >
<if test="record.systemId != null" >
<set>
<if test="record.systemId != null">
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
<if test="record.icon != null" >
<if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.basepath != null" >
<if test="record.basepath != null">
basepath = #{record.basepath,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
<if test="record.status != null">
status = #{record.status,jdbcType=SMALLINT},
</if>
<if test="record.name != null" >
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.ctime != null" >
<if test="record.ctime != null">
ctime = #{record.ctime,jdbcType=BIGINT},
</if>
<if test="record.orders != null" >
<if test="record.orders != null">
orders = #{record.orders,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_system
set system_id = #{record.systemId,jdbcType=INTEGER},
icon = #{record.icon,jdbcType=VARCHAR},
@ -210,35 +210,35 @@
name = #{record.name,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsSystem" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsSystem">
update upms_system
<set >
<if test="icon != null" >
<set>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="basepath != null" >
<if test="basepath != null">
basepath = #{basepath,jdbcType=VARCHAR},
</if>
<if test="status != null" >
<if test="status != null">
status = #{status,jdbcType=SMALLINT},
</if>
<if test="name != null" >
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="ctime != null" >
<if test="ctime != null">
ctime = #{ctime,jdbcType=BIGINT},
</if>
<if test="orders != null" >
<if test="orders != null">
orders = #{orders,jdbcType=BIGINT},
</if>
</set>
where system_id = #{systemId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsSystem" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsSystem">
update upms_system
set icon = #{icon,jdbcType=VARCHAR},
basepath = #{basepath,jdbcType=VARCHAR},

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsUserMapper {
int countByExample(UpmsUserExample example);
long countByExample(UpmsUserExample example);
int deleteByExample(UpmsUserExample example);

View File

@ -1,29 +1,29 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUser" >
<id column="user_id" property="userId" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUser">
<id column="user_id" jdbcType="INTEGER" property="userId" />
<result column="system_id" jdbcType="INTEGER" property="systemId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -34,25 +34,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -63,108 +63,108 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
user_id, system_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsUserExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_user
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_user
where user_id = #{userId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_user
where user_id = #{userId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserExample">
delete from upms_user
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUser" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUser">
insert into upms_user (user_id, system_id)
values (#{userId,jdbcType=INTEGER}, #{systemId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUser" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUser">
insert into upms_user
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="systemId != null" >
<if test="systemId != null">
system_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="systemId != null" >
<if test="systemId != null">
#{systemId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserExample" resultType="java.lang.Long">
select count(*) from upms_user
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_user
<set >
<if test="record.userId != null" >
<set>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.systemId != null" >
<if test="record.systemId != null">
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_user
set user_id = #{record.userId,jdbcType=INTEGER},
system_id = #{record.systemId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUser" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUser">
update upms_user
<set >
<if test="systemId != null" >
<set>
<if test="systemId != null">
system_id = #{systemId,jdbcType=INTEGER},
</if>
</set>
where user_id = #{userId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUser" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUser">
update upms_user
set system_id = #{systemId,jdbcType=INTEGER}
where user_id = #{userId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsUserOrganizationMapper {
int countByExample(UpmsUserOrganizationExample example);
long countByExample(UpmsUserOrganizationExample example);
int deleteByExample(UpmsUserOrganizationExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserOrganizationMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserOrganization" >
<id column="user_organization_id" property="userOrganizationId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="organization_id" property="organizationId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserOrganizationMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserOrganization">
<id column="user_organization_id" jdbcType="INTEGER" property="userOrganizationId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="organization_id" jdbcType="INTEGER" property="organizationId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
user_organization_id, user_id, organization_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_user_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample">
delete from upms_user_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization">
insert into upms_user_organization (user_organization_id, user_id, organization_id
)
values (#{userOrganizationId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{organizationId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization">
insert into upms_user_organization
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userOrganizationId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userOrganizationId != null">
user_organization_id,
</if>
<if test="userId != null" >
<if test="userId != null">
user_id,
</if>
<if test="organizationId != null" >
<if test="organizationId != null">
organization_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userOrganizationId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userOrganizationId != null">
#{userOrganizationId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null" >
<if test="organizationId != null">
#{organizationId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" resultType="java.lang.Long">
select count(*) from upms_user_organization
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_user_organization
<set >
<if test="record.userOrganizationId != null" >
<set>
<if test="record.userOrganizationId != null">
user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
</if>
<if test="record.userId != null" >
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.organizationId != null" >
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_user_organization
set user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
organization_id = #{record.organizationId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization">
update upms_user_organization
<set >
<if test="userId != null" >
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null" >
<if test="organizationId != null">
organization_id = #{organizationId,jdbcType=INTEGER},
</if>
</set>
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization">
update upms_user_organization
set user_id = #{userId,jdbcType=INTEGER},
organization_id = #{organizationId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsUserPermissionMapper {
int countByExample(UpmsUserPermissionExample example);
long countByExample(UpmsUserPermissionExample example);
int deleteByExample(UpmsUserPermissionExample example);

View File

@ -1,30 +1,30 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserPermissionMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserPermission" >
<id column="user_permission_id" property="userPermissionId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="permission_id" property="permissionId" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserPermissionMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserPermission">
<id column="user_permission_id" jdbcType="INTEGER" property="userPermissionId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="permission_id" jdbcType="INTEGER" property="permissionId" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -35,25 +35,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -64,123 +64,123 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
user_permission_id, user_id, permission_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_user_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_user_permission
where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_user_permission
where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample">
delete from upms_user_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserPermission" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
insert into upms_user_permission (user_permission_id, user_id, permission_id
)
values (#{userPermissionId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
insert into upms_user_permission
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userPermissionId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userPermissionId != null">
user_permission_id,
</if>
<if test="userId != null" >
<if test="userId != null">
user_id,
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
permission_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userPermissionId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userPermissionId != null">
#{userPermissionId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
#{permissionId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultType="java.lang.Long">
select count(*) from upms_user_permission
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_user_permission
<set >
<if test="record.userPermissionId != null" >
<set>
<if test="record.userPermissionId != null">
user_permission_id = #{record.userPermissionId,jdbcType=INTEGER},
</if>
<if test="record.userId != null" >
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.permissionId != null" >
<if test="record.permissionId != null">
permission_id = #{record.permissionId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_user_permission
set user_permission_id = #{record.userPermissionId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
permission_id = #{record.permissionId,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
update upms_user_permission
<set >
<if test="userId != null" >
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="permissionId != null" >
<if test="permissionId != null">
permission_id = #{permissionId,jdbcType=INTEGER},
</if>
</set>
where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserPermission" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
update upms_user_permission
set user_id = #{userId,jdbcType=INTEGER},
permission_id = #{permissionId,jdbcType=INTEGER}

View File

@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsUserRoleMapper {
int countByExample(UpmsUserRoleExample example);
long countByExample(UpmsUserRoleExample example);
int deleteByExample(UpmsUserRoleExample example);

View File

@ -1,31 +1,31 @@
<?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" >
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserRoleMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserRole" >
<id column="user_role_id" property="userRoleId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="role_id" property="roleId" jdbcType="INTEGER" />
<result column="role" property="role" jdbcType="INTEGER" />
<?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">
<mapper namespace="com.zheng.upms.dao.mapper.UpmsUserRoleMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserRole">
<id column="user_role_id" jdbcType="INTEGER" property="userRoleId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="role" jdbcType="INTEGER" property="role" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -36,25 +36,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
<when test="criterion.listValue">
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
@ -65,136 +65,136 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
user_role_id, user_id, role_id, role
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample" >
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample" resultMap="BaseResultMap">
select
<if test="distinct" >
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_user_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_user_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_user_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample" >
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample">
delete from upms_user_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserRole" >
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserRole">
insert into upms_user_role (user_role_id, user_id, role_id,
role)
values (#{userRoleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER},
#{role,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserRole" >
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserRole">
insert into upms_user_role
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userRoleId != null" >
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userRoleId != null">
user_role_id,
</if>
<if test="userId != null" >
<if test="userId != null">
user_id,
</if>
<if test="roleId != null" >
<if test="roleId != null">
role_id,
</if>
<if test="role != null" >
<if test="role != null">
role,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userRoleId != null" >
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userRoleId != null">
#{userRoleId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
<if test="roleId != null">
#{roleId,jdbcType=INTEGER},
</if>
<if test="role != null" >
<if test="role != null">
#{role,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample" resultType="java.lang.Integer" >
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserRoleExample" resultType="java.lang.Long">
select count(*) from upms_user_role
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<update id="updateByExampleSelective" parameterType="map">
update upms_user_role
<set >
<if test="record.userRoleId != null" >
<set>
<if test="record.userRoleId != null">
user_role_id = #{record.userRoleId,jdbcType=INTEGER},
</if>
<if test="record.userId != null" >
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.roleId != null" >
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.role != null" >
<if test="record.role != null">
role = #{record.role,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<update id="updateByExample" parameterType="map">
update upms_user_role
set user_role_id = #{record.userRoleId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
role_id = #{record.roleId,jdbcType=INTEGER},
role = #{record.role,jdbcType=INTEGER}
<if test="_parameter != null" >
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserRole" >
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserRole">
update upms_user_role
<set >
<if test="userId != null" >
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
<if test="roleId != null">
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="role != null" >
<if test="role != null">
role = #{role,jdbcType=INTEGER},
</if>
</set>
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserRole" >
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserRole">
update upms_user_role
set user_id = #{userId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},

View File

@ -8,13 +8,12 @@
<!-- mysql驱动包 -->
<classPathEntry location="${classPathEntry}" />
<context id="context" targetRuntime="MyBatis3">
<context id="MysqlContext" targetRuntime="MyBatis3" defaultModelType="flat">
<property name="javaFileEncoding" value="UTF-8"/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为**反单引号(`)**,配置如下: -->
<property name="beginningDelimiter" value=""/>
<property name="endingDelimiter" value=""/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为` -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
@ -24,7 +23,7 @@
<property name="suppressJavaInterface" value="false"/>
</plugin>
<!-- 生成一个新的selectByExample方法这个方法可以接受一个RowBounds参数,主要用来实现分页 -->
<!-- 生成一个新的selectByExample方法这个方法可以接收offset和limit参数,主要用来实现分页 -->
<plugin type="com.zheng.common.plugin.PaginationPlugin"></plugin>
<!-- 生成在XML中的<cache>元素 -->
@ -44,8 +43,9 @@
<plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"></plugin>
<!-- 生成的代码去掉注释 -->
<commentGenerator>
<commentGenerator type="com.zheng.common.plugin.CommentGenerator">
<property name="suppressAllComments" value="true" />
<property name="suppressDate" value="true"/>
</commentGenerator>
<!-- 数据库连接 -->
@ -55,13 +55,13 @@
password="${jdbc.password}" />
<!-- model生成 -->
<javaModelGenerator targetPackage="com.zheng.upms.dao.model" targetProject="src/main/java" />
<javaModelGenerator targetPackage="com.zheng.upms.dao.model" targetProject="zheng-upms/zheng-upms-dao/src/main/java" />
<!-- MapperXML生成 -->
<sqlMapGenerator targetPackage="com.zheng.upms.dao.mapper" targetProject="src/main/java" />
<sqlMapGenerator targetPackage="com.zheng.upms.dao.mapper" targetProject="zheng-upms/zheng-upms-dao/src/main/java" />
<!-- Mapper接口生成 -->
<javaClientGenerator targetPackage="com.zheng.upms.dao.mapper" targetProject="src/main/java" type="XMLMAPPER" />
<javaClientGenerator targetPackage="com.zheng.upms.dao.mapper" targetProject="zheng-upms/zheng-upms-dao/src/main/java" type="XMLMAPPER" />
<!-- 需要映射的表 -->
<table tableName="upms_organization" domainObjectName="UpmsOrganization"></table>

View File

@ -1,4 +1,4 @@
package com.zheng.wechat.mp.dao;
package com.zheng.upms.dao;
import com.zheng.common.util.MybatisGeneratorConfigUtil;
import com.zheng.common.util.PropertiesFileUtil;
@ -17,7 +17,7 @@ public class Generator {
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("jdbc.password");
/**
* 根据模板生成generatorConfig.xml文件
* 自动代码生成
* @param args
*/
public static void main(String[] args) {

View File

@ -8,13 +8,12 @@
<!-- mysql驱动包 -->
<classPathEntry location="${classPathEntry}" />
<context id="context" targetRuntime="MyBatis3">
<context id="MysqlContext" targetRuntime="MyBatis3" defaultModelType="flat">
<property name="javaFileEncoding" value="UTF-8"/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为**反单引号(`)**,配置如下: -->
<property name="beginningDelimiter" value=""/>
<property name="endingDelimiter" value=""/>
<!-- 由于beginningDelimiter和endingDelimiter的默认值为双引号(")在Mysql中不能这么写所以还要将这两个默认值改为` -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
@ -24,7 +23,7 @@
<property name="suppressJavaInterface" value="false"/>
</plugin>
<!-- 生成一个新的selectByExample方法这个方法可以接受一个RowBounds参数,主要用来实现分页 -->
<!-- 生成一个新的selectByExample方法这个方法可以接收offset和limit参数,主要用来实现分页 -->
<plugin type="com.zheng.common.plugin.PaginationPlugin"></plugin>
<!-- 生成在XML中的<cache>元素 -->
@ -44,8 +43,9 @@
<plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"></plugin>
<!-- 生成的代码去掉注释 -->
<commentGenerator>
<commentGenerator type="com.zheng.common.plugin.CommentGenerator">
<property name="suppressAllComments" value="true" />
<property name="suppressDate" value="true"/>
</commentGenerator>
<!-- 数据库连接 -->
@ -55,13 +55,13 @@
password="${jdbc.password}" />
<!-- model生成 -->
<javaModelGenerator targetPackage="com.zheng.wechat.mp.dao.model" targetProject="src/main/java" />
<javaModelGenerator targetPackage="com.zheng.wechat.mp.dao.model" targetProject="zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java" />
<!-- MapperXML生成 -->
<sqlMapGenerator targetPackage="com.zheng.wechat.mp.dao.mapper" targetProject="src/main/java" />
<sqlMapGenerator targetPackage="com.zheng.wechat.mp.dao.mapper" targetProject="zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java" />
<!-- Mapper接口生成 -->
<javaClientGenerator targetPackage="com.zheng.wechat.mp.dao.mapper" targetProject="src/main/java" type="XMLMAPPER" />
<javaClientGenerator targetPackage="com.zheng.wechat.mp.dao.mapper" targetProject="zheng-wechat-mp/zheng-wechat-mp-dao/src/main/java" type="XMLMAPPER" />
<!-- 需要映射的表 -->
</context>