111 lines
5.4 KiB
XML
111 lines
5.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.ruoyi.system.mapper.UserMemnerConsumptionLogMapper">
|
|
|
|
<resultMap type="UserMemnerConsumptionLog" id="UserMemnerConsumptionLogResult">
|
|
<result property="id" column="id" />
|
|
<result property="uid" column="uid" />
|
|
<result property="consumptiontype" column="consumptiontype" />
|
|
<result property="consumptiontime" column="consumptiontime" />
|
|
<result property="consumptionmoney" column="consumptionmoney" />
|
|
<result property="reamk" column="reamk" />
|
|
<result property="beformoney" column="beformoney" />
|
|
<result property="aftermoney" column="aftermoney" />
|
|
<result property="nowmoney" column="nowmoney" />
|
|
<result property="createdAt" column="created_at" />
|
|
<result property="type" column="type" />
|
|
<result property="orderid" column="orderid" />
|
|
|
|
<result property="updatedAt" column="updated_at" />
|
|
<result property="deletedAt" column="deleted_at" />
|
|
<result property="del" column="del" />
|
|
</resultMap>
|
|
|
|
<sql id="selectUserMemnerConsumptionLogVo">
|
|
select id, uid, consumptiontype, consumptiontime,orderid, consumptionmoney,type, reamk, beformoney, aftermoney, nowmoney, created_at, updated_at, deleted_at, del from user_memner_consumption_log
|
|
</sql>
|
|
|
|
<select id="selectUserMemnerConsumptionLogList" parameterType="UserMemnerConsumptionLog" resultMap="UserMemnerConsumptionLogResult">
|
|
<include refid="selectUserMemnerConsumptionLogVo"/>
|
|
<where>
|
|
<if test="uid != null "> and uid = #{uid}</if>
|
|
<if test="del != null "> and del = #{del}</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
|
|
<select id="selectUserMemnerConsumptionLogById" parameterType="Integer" resultMap="UserMemnerConsumptionLogResult">
|
|
<include refid="selectUserMemnerConsumptionLogVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertUserMemnerConsumptionLog" parameterType="UserMemnerConsumptionLog" useGeneratedKeys="true" keyProperty="id">
|
|
insert into user_memner_consumption_log
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="uid != null">uid,</if>
|
|
<if test="consumptiontype != null">consumptiontype,</if>
|
|
<if test="consumptiontime != null">consumptiontime,</if>
|
|
<if test="consumptionmoney != null">consumptionmoney,</if>
|
|
<if test="reamk != null">reamk,</if>
|
|
<if test="beformoney != null">beformoney,</if>
|
|
<if test="aftermoney != null">aftermoney,</if>
|
|
<if test="nowmoney != null">nowmoney,</if>
|
|
<if test="deletedAt != null">deleted_at,</if>
|
|
<if test="del != null">del,</if>
|
|
<if test="type != null">type,</if>
|
|
<if test="orderid != null">orderid,</if>
|
|
|
|
created_at,
|
|
updated_at
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="uid != null">#{uid},</if>
|
|
<if test="consumptiontype != null">#{consumptiontype},</if>
|
|
<if test="consumptiontime != null">#{consumptiontime},</if>
|
|
<if test="consumptionmoney != null">#{consumptionmoney},</if>
|
|
<if test="reamk != null">#{reamk},</if>
|
|
<if test="beformoney != null">#{beformoney},</if>
|
|
<if test="aftermoney != null">#{aftermoney},</if>
|
|
<if test="nowmoney != null">#{nowmoney},</if>
|
|
<if test="deletedAt != null">#{deletedAt},</if>
|
|
<if test="del != null">#{del},</if>
|
|
<if test="type != null">#{type},</if>
|
|
<if test="orderid != null">#{orderid},</if>
|
|
NOW(),
|
|
NOW()
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateUserMemnerConsumptionLog" parameterType="UserMemnerConsumptionLog">
|
|
update user_memner_consumption_log
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="uid != null">uid = #{uid},</if>
|
|
<if test="consumptiontype != null">consumptiontype = #{consumptiontype},</if>
|
|
<if test="consumptiontime != null">consumptiontime = #{consumptiontime},</if>
|
|
<if test="consumptionmoney != null">consumptionmoney = #{consumptionmoney},</if>
|
|
<if test="reamk != null">reamk = #{reamk},</if>
|
|
<if test="beformoney != null">beformoney = #{beformoney},</if>
|
|
<if test="aftermoney != null">aftermoney = #{aftermoney},</if>
|
|
<if test="nowmoney != null">nowmoney = #{nowmoney},</if>
|
|
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
|
<if test="del != null">del = #{del},</if>
|
|
<if test="type != null">type = #{type},</if>
|
|
updated_at = NOW(),
|
|
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteUserMemnerConsumptionLogById" parameterType="Integer">
|
|
delete from user_memner_consumption_log where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteUserMemnerConsumptionLogByIds" parameterType="String">
|
|
delete from user_memner_consumption_log where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |