77 lines
3.4 KiB
XML
77 lines
3.4 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">
|
||
|
|
<mapper namespace="com.xhpc.activity.mapper.XhpcActivityFormulaMapper">
|
||
|
|
<resultMap id="BaseResultMap" type="com.xhpc.activity.domain.XhpcActivityFormulaDomain">
|
||
|
|
<id column="activity_formula_id" jdbcType="BIGINT" property="activityFormulaId"/>
|
||
|
|
<result column="activity_id" jdbcType="INTEGER" property="activityId"/>
|
||
|
|
<result column="start_time" property="startTime"/>
|
||
|
|
<result column="end_time" property="endTime"/>
|
||
|
|
<result column="service_price" javaType="DECIMAL" property="servicePrice"/>
|
||
|
|
<result column="compute_formula" jdbcType="VARCHAR" property="computeFormula"/>
|
||
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||
|
|
</resultMap>
|
||
|
|
<sql id="Base_Column_List">
|
||
|
|
activity_formula_id
|
||
|
|
, activity_id, start_time, end_time, service_price, compute_formula, create_time,
|
||
|
|
create_by, update_time, update_by
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="selectByActivityId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||
|
|
select
|
||
|
|
<include refid="Base_Column_List"/>
|
||
|
|
from xhpc_activity_formula
|
||
|
|
where activity_id = #{activityId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<delete id="deleteByActivityId">
|
||
|
|
delete
|
||
|
|
from xhpc_activity_formula
|
||
|
|
where activity_id = #{activityId}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||
|
|
select
|
||
|
|
<include refid="Base_Column_List"/>
|
||
|
|
from xhpc_activity_formula
|
||
|
|
where activity_formula_id = #{activityFormulaId,jdbcType=BIGINT}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||
|
|
delete
|
||
|
|
from xhpc_activity_formula
|
||
|
|
where activity_formula_id = #{activityFormulaId,jdbcType=BIGINT}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
|
||
|
|
<insert id="insert" keyColumn="activity_formula_id" keyProperty="activityFormulaId"
|
||
|
|
parameterType="com.xhpc.activity.domain.XhpcActivityFormulaDomain" useGeneratedKeys="true">
|
||
|
|
insert into xhpc_activity_formula (activity_id, start_time, end_time,
|
||
|
|
service_price, compute_formula, create_time, create_by,
|
||
|
|
update_time, update_by)
|
||
|
|
values (#{activityId,jdbcType=INTEGER}, #{startTime}, #{endTime},
|
||
|
|
#{servicePrice}, #{computeFormula,jdbcType=VARCHAR}, sysdate(), #{createBy,jdbcType=VARCHAR},
|
||
|
|
sysdate(), #{updateBy,jdbcType=VARCHAR})
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
|
||
|
|
<update id="updateByPrimaryKey" parameterType="com.xhpc.activity.domain.XhpcActivityFormulaDomain">
|
||
|
|
update xhpc_activity_formula
|
||
|
|
set activity_id = #{activityId,jdbcType=INTEGER},
|
||
|
|
start_time = #{startTime},
|
||
|
|
end_time = #{endTime},
|
||
|
|
service_price = #{servicePrice},
|
||
|
|
compute_formula = #{computeFormula,jdbcType=VARCHAR},
|
||
|
|
update_time = sysdate(),
|
||
|
|
update_by = #{updateBy,jdbcType=VARCHAR}
|
||
|
|
where activity_formula_id = #{activityComputeId,jdbcType=BIGINT}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
|
||
|
|
</mapper>
|