Commit 12ffc3a0 by duanhq

资源绑定 by duanht 2019/1/24

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17061 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent d2ebb240
package com.glsx.usercenter.pojo.user;
public class SysResourceMatching {
private Integer id;
private Integer merchantId;
private Integer userId;
private Integer serviceKey;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getServiceKey() {
return serviceKey;
}
public void setServiceKey(Integer serviceKey) {
this.serviceKey = serviceKey;
}
}
\ No newline at end of file
<?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.glsx.usercenter.mapper.SysResourceMatchingMapper">
<resultMap id="BaseResultMap" type="com.glsx.usercenter.pojo.user.SysResourceMatching">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="service_key" jdbcType="INTEGER" property="serviceKey" />
</resultMap>
<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">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</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="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, merchant_id, user_id, service_key
</sql>
<select id="selectByExample" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatchingExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_resource_matching
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_resource_matching
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_resource_matching
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatchingExample">
delete from sys_resource_matching
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatching">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_resource_matching (merchant_id, user_id, service_key
)
values (#{merchantId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{serviceKey,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatching">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_resource_matching
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="merchantId != null">
merchant_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="serviceKey != null">
service_key,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="merchantId != null">
#{merchantId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="serviceKey != null">
#{serviceKey,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatchingExample" resultType="java.lang.Long">
select count(*) from sys_resource_matching
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_resource_matching
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.merchantId != null">
merchant_id = #{record.merchantId,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.serviceKey != null">
service_key = #{record.serviceKey,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_resource_matching
set id = #{record.id,jdbcType=INTEGER},
merchant_id = #{record.merchantId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
service_key = #{record.serviceKey,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatching">
update sys_resource_matching
<set>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="serviceKey != null">
service_key = #{serviceKey,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.usercenter.pojo.user.SysResourceMatching">
update sys_resource_matching
set merchant_id = #{merchantId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
service_key = #{serviceKey,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!