基础代码生成
This commit is contained in:
1 parent
352d7d023f
commit
1c0544afe0
122 files changed
+21475
No files matched your search
@@ -0,0 +1,96 @@
|
||||
<?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.RentEventMapper">
|
||||
|
||||
<resultMap type="RentEvent" id="RentEventResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="eventNo" column="event_no" />
|
||||
<result property="objectType" column="object_type" />
|
||||
<result property="objectId" column="object_id" />
|
||||
<result property="action" column="action" />
|
||||
<result property="actorUserId" column="actor_user_id" />
|
||||
<result property="nodeId" column="node_id" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="version" column="version" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRentEventVo">
|
||||
select id, event_no, object_type, object_id, action, actor_user_id, node_id, detail, reason, version, created_at, updated_at from rent_event
|
||||
</sql>
|
||||
|
||||
<select id="selectRentEventList" parameterType="RentEvent" resultMap="RentEventResult">
|
||||
<include refid="selectRentEventVo"/>
|
||||
<where>
|
||||
<if test="eventNo != null and eventNo != ''"> and event_no = #{eventNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRentEventById" parameterType="Long" resultMap="RentEventResult">
|
||||
<include refid="selectRentEventVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRentEvent" parameterType="RentEvent" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rent_event
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="eventNo != null and eventNo != ''">event_no,</if>
|
||||
<if test="objectType != null and objectType != ''">object_type,</if>
|
||||
<if test="objectId != null">object_id,</if>
|
||||
<if test="action != null and action != ''">action,</if>
|
||||
<if test="actorUserId != null">actor_user_id,</if>
|
||||
<if test="nodeId != null">node_id,</if>
|
||||
<if test="detail != null">detail,</if>
|
||||
<if test="reason != null and reason != ''">reason,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="eventNo != null and eventNo != ''">#{eventNo},</if>
|
||||
<if test="objectType != null and objectType != ''">#{objectType},</if>
|
||||
<if test="objectId != null">#{objectId},</if>
|
||||
<if test="action != null and action != ''">#{action},</if>
|
||||
<if test="actorUserId != null">#{actorUserId},</if>
|
||||
<if test="nodeId != null">#{nodeId},</if>
|
||||
<if test="detail != null">#{detail},</if>
|
||||
<if test="reason != null and reason != ''">#{reason},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRentEvent" parameterType="RentEvent">
|
||||
update rent_event
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="eventNo != null and eventNo != ''">event_no = #{eventNo},</if>
|
||||
<if test="objectType != null and objectType != ''">object_type = #{objectType},</if>
|
||||
<if test="objectId != null">object_id = #{objectId},</if>
|
||||
<if test="action != null and action != ''">action = #{action},</if>
|
||||
<if test="actorUserId != null">actor_user_id = #{actorUserId},</if>
|
||||
<if test="nodeId != null">node_id = #{nodeId},</if>
|
||||
<if test="detail != null">detail = #{detail},</if>
|
||||
<if test="reason != null and reason != ''">reason = #{reason},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRentEventById" parameterType="Long">
|
||||
delete from rent_event where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRentEventByIds" parameterType="String">
|
||||
delete from rent_event where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user