240 lines
9.6 KiB
XML
240 lines
9.6 KiB
XML
<?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">
|
|
<!--suppress SqlDialectInspection -->
|
|
<mapper namespace="com.lk.phr.dao.UserQuotaDao">
|
|
<resultMap id="BaseResultMap" type="com.lk.phr.model.UserQuotaModel">
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
<result column="medical" jdbcType="BIT" property="medical"/>
|
|
<result column="user_history_seq_no" jdbcType="BIGINT" property="userHistorySeqNo"/>
|
|
<result column="user_id" jdbcType="BIGINT" property="userId"/>
|
|
<result column="quota_code" jdbcType="VARCHAR" property="quotaCode"/>
|
|
<result column="quota_value" jdbcType="VARCHAR" property="quotaValue"/>
|
|
<result column="min_value" jdbcType="DOUBLE" property="minValue"/>
|
|
<result column="max_value" jdbcType="DOUBLE" property="maxValue"/>
|
|
<result column="flag" jdbcType="INTEGER" property="flag"/>
|
|
<result column="updated" jdbcType="TIMESTAMP" property="updated"/>
|
|
<result column="created" jdbcType="TIMESTAMP" property="created"/>
|
|
<result column="check_date" jdbcType="TIMESTAMP" property="checkDate"/>
|
|
<result column="device_sn" jdbcType="VARCHAR" property="deviceSn"/>
|
|
<result column="device_no" jdbcType="VARCHAR" property="deviceNo"/>
|
|
<result column="phr_uid" jdbcType="BIGINT" property="phrUid"/>
|
|
<result column="device_brand" jdbcType="VARCHAR" property="deviceBrand"/>
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, medical, user_history_seq_no, user_id, quota_code, quota_value, min_value, max_value,
|
|
flag, updated, created, check_date, device_sn, device_no, phr_uid, device_brand
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
from user_quota
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
delete from user_quota
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
insert into user_quota (id, medical, user_history_seq_no,
|
|
user_id, quota_code, quota_value,
|
|
min_value, max_value, flag,
|
|
updated, created, check_date,
|
|
device_sn, device_no, phr_uid,
|
|
device_brand)
|
|
values (#{id,jdbcType=BIGINT}, #{medical,jdbcType=BIT}, #{userHistorySeqNo,jdbcType=BIGINT},
|
|
#{userId,jdbcType=BIGINT}, #{quotaCode,jdbcType=VARCHAR}, #{quotaValue,jdbcType=VARCHAR},
|
|
#{minValue,jdbcType=DOUBLE}, #{maxValue,jdbcType=DOUBLE}, #{flag,jdbcType=INTEGER},
|
|
#{updated,jdbcType=TIMESTAMP}, #{created,jdbcType=TIMESTAMP}, #{checkDate,jdbcType=TIMESTAMP},
|
|
#{deviceSn,jdbcType=VARCHAR}, #{deviceNo,jdbcType=VARCHAR}, #{phrUid,jdbcType=BIGINT},
|
|
#{deviceBrand,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
insert into user_quota
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="medical != null">
|
|
medical,
|
|
</if>
|
|
<if test="userHistorySeqNo != null">
|
|
user_history_seq_no,
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id,
|
|
</if>
|
|
<if test="quotaCode != null">
|
|
quota_code,
|
|
</if>
|
|
<if test="quotaValue != null">
|
|
quota_value,
|
|
</if>
|
|
<if test="minValue != null">
|
|
min_value,
|
|
</if>
|
|
<if test="maxValue != null">
|
|
max_value,
|
|
</if>
|
|
<if test="flag != null">
|
|
flag,
|
|
</if>
|
|
<if test="updated != null">
|
|
updated,
|
|
</if>
|
|
<if test="created != null">
|
|
created,
|
|
</if>
|
|
<if test="checkDate != null">
|
|
check_date,
|
|
</if>
|
|
<if test="deviceSn != null">
|
|
device_sn,
|
|
</if>
|
|
<if test="deviceNo != null">
|
|
device_no,
|
|
</if>
|
|
<if test="phrUid != null">
|
|
phr_uid,
|
|
</if>
|
|
<if test="deviceBrand != null">
|
|
device_brand,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="medical != null">
|
|
#{medical,jdbcType=BIT},
|
|
</if>
|
|
<if test="userHistorySeqNo != null">
|
|
#{userHistorySeqNo,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="userId != null">
|
|
#{userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="quotaCode != null">
|
|
#{quotaCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="quotaValue != null">
|
|
#{quotaValue,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="minValue != null">
|
|
#{minValue,jdbcType=DOUBLE},
|
|
</if>
|
|
<if test="maxValue != null">
|
|
#{maxValue,jdbcType=DOUBLE},
|
|
</if>
|
|
<if test="flag != null">
|
|
#{flag,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="updated != null">
|
|
#{updated,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="created != null">
|
|
#{created,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="checkDate != null">
|
|
#{checkDate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="deviceSn != null">
|
|
#{deviceSn,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="deviceNo != null">
|
|
#{deviceNo,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phrUid != null">
|
|
#{phrUid,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="deviceBrand != null">
|
|
#{deviceBrand,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update user_quota
|
|
<set>
|
|
<if test="medical != null">
|
|
medical = #{medical,jdbcType=BIT},
|
|
</if>
|
|
<if test="userHistorySeqNo != null">
|
|
user_history_seq_no = #{userHistorySeqNo,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id = #{userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="quotaCode != null">
|
|
quota_code = #{quotaCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="quotaValue != null">
|
|
quota_value = #{quotaValue,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="minValue != null">
|
|
min_value = #{minValue,jdbcType=DOUBLE},
|
|
</if>
|
|
<if test="maxValue != null">
|
|
max_value = #{maxValue,jdbcType=DOUBLE},
|
|
</if>
|
|
<if test="flag != null">
|
|
flag = #{flag,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="updated != null">
|
|
updated = #{updated,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="created != null">
|
|
created = #{created,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="checkDate != null">
|
|
check_date = #{checkDate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="deviceSn != null">
|
|
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="deviceNo != null">
|
|
device_no = #{deviceNo,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phrUid != null">
|
|
phr_uid = #{phrUid,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="deviceBrand != null">
|
|
device_brand = #{deviceBrand,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.lk.phr.model.UserQuotaModel">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update user_quota
|
|
set medical = #{medical,jdbcType=BIT},
|
|
user_history_seq_no = #{userHistorySeqNo,jdbcType=BIGINT},
|
|
user_id = #{userId,jdbcType=BIGINT},
|
|
quota_code = #{quotaCode,jdbcType=VARCHAR},
|
|
quota_value = #{quotaValue,jdbcType=VARCHAR},
|
|
min_value = #{minValue,jdbcType=DOUBLE},
|
|
max_value = #{maxValue,jdbcType=DOUBLE},
|
|
flag = #{flag,jdbcType=INTEGER},
|
|
updated = #{updated,jdbcType=TIMESTAMP},
|
|
created = #{created,jdbcType=TIMESTAMP},
|
|
check_date = #{checkDate,jdbcType=TIMESTAMP},
|
|
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
device_no = #{deviceNo,jdbcType=VARCHAR},
|
|
phr_uid = #{phrUid,jdbcType=BIGINT},
|
|
device_brand = #{deviceBrand,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |