RelatedRelationshipLogMapper.xml
2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?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.web.controller.business.mapper.RelatedRelationshipLogMapper">
<resultMap type="RelatedRelationshipLog" id="RelatedRelationshipLogResult">
<result property="id" column="id" />
<result property="searchEnterprise" column="search_enterprise" />
<result property="searchRelationship" column="search_relationship" />
<result property="searchUser" column="search_user" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectRelatedRelationshipLogVo">
select id, search_enterprise, search_relationship, search_user, create_time from related_relationship_log
</sql>
<select id="selectRelatedRelationshipLogList" parameterType="RelatedRelationshipLog" resultMap="RelatedRelationshipLogResult">
<include refid="selectRelatedRelationshipLogVo"/>
<where>
<if test="searchEnterprise != null and searchEnterprise != ''"> and search_enterprise = #{searchEnterprise}</if>
<if test="searchRelationship != null and searchRelationship != ''"> and search_relationship = #{searchRelationship}</if>
<if test="searchUser != null and searchUser != ''"> and search_user = #{searchUser}</if>
</where>
</select>
<insert id="insertRelatedRelationshipLog" parameterType="RelatedRelationshipLog">
insert into related_relationship_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="searchEnterprise != null">search_enterprise,</if>
<if test="searchRelationship != null">search_relationship,</if>
<if test="searchUser != null">search_user,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="searchEnterprise != null">#{searchEnterprise},</if>
<if test="searchRelationship != null">#{searchRelationship},</if>
<if test="searchUser != null">#{searchUser},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
</mapper>