|
|
@ -1,58 +1,95 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.flyingbook.mapper.LarkLoginLogMapper">
|
|
|
|
<mapper namespace="com.ruoyi.flyingbook.mapper.LarkLoginLogMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.flyingbook.domain.LarkLoginLog" id="LarkLoginLogResult">
|
|
|
|
<resultMap type="com.ruoyi.flyingbook.domain.LarkLoginLog" id="LarkLoginLogResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="openId" column="open_id" />
|
|
|
|
<result property="openId" column="open_id"/>
|
|
|
|
<result property="companyName" column="company_name" />
|
|
|
|
<result property="companyName" column="company_name"/>
|
|
|
|
<result property="userName" column="user_name" />
|
|
|
|
<result property="userName" column="user_name"/>
|
|
|
|
<result property="imageUrl" column="image_url" />
|
|
|
|
<result property="imageUrl" column="image_url"/>
|
|
|
|
<result property="type" column="type" />
|
|
|
|
<result property="type" column="type"/>
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
<result property="flag" column="flag" />
|
|
|
|
<result property="flag" column="flag"/>
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectLarkLoginLogVo">
|
|
|
|
<sql id="selectLarkLoginLogVo">
|
|
|
|
select id, open_id, company_name, user_name, image_url, type, create_by, create_time, update_by, update_time, flag, remark from lark_login_log
|
|
|
|
select id,
|
|
|
|
|
|
|
|
open_id,
|
|
|
|
|
|
|
|
company_name,
|
|
|
|
|
|
|
|
user_name,
|
|
|
|
|
|
|
|
image_url,
|
|
|
|
|
|
|
|
type,
|
|
|
|
|
|
|
|
create_by,
|
|
|
|
|
|
|
|
create_time,
|
|
|
|
|
|
|
|
update_by,
|
|
|
|
|
|
|
|
update_time,
|
|
|
|
|
|
|
|
flag,
|
|
|
|
|
|
|
|
remark
|
|
|
|
|
|
|
|
from lark_login_log
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLarkLoginLogList" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultMap="LarkLoginLogResult">
|
|
|
|
<select id="selectLarkLoginLogList" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog"
|
|
|
|
|
|
|
|
resultMap="LarkLoginLogResult">
|
|
|
|
<include refid="selectLarkLoginLogVo"/>
|
|
|
|
<include refid="selectLarkLoginLogVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="openId != null "> and open_id = #{openId}</if>
|
|
|
|
<if test="openId != null ">and open_id = #{openId}</if>
|
|
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
|
<if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName},
|
|
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
'%')
|
|
|
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
|
|
|
</if>
|
|
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
|
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
<if test="flag != null "> and flag = #{flag}</if>
|
|
|
|
<if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
|
|
|
|
|
|
|
|
<if test="type != null and type != ''">and type = #{type}</if>
|
|
|
|
|
|
|
|
<if test="flag != null ">and flag = #{flag}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="count" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
|
|
|
|
<select id="count" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
|
|
|
|
select count(id) from lark_login_log
|
|
|
|
select count(id) from lark_login_log
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="openId != null "> and open_id = #{openId}</if>
|
|
|
|
<if test="openId != null ">and open_id = #{openId}</if>
|
|
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
|
<if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName},
|
|
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
'%')
|
|
|
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
|
|
|
</if>
|
|
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
|
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
<if test="flag != null "> and flag = #{flag}</if>
|
|
|
|
<if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
|
|
|
|
|
|
|
|
<if test="type != null and type != ''">and type = #{type}</if>
|
|
|
|
|
|
|
|
<if test="flag != null ">and flag = #{flag}</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="distinctCount" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
|
|
|
|
|
|
|
|
SELECT COUNT(temp.id) AS total_count
|
|
|
|
|
|
|
|
FROM(
|
|
|
|
|
|
|
|
select DISTINCT log.id from lark_login_log log
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="openId != null ">
|
|
|
|
|
|
|
|
and log.open_id = #{openId}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="companyName != null and companyName != ''">and log.company_name likeconcat('%', #{companyName},
|
|
|
|
|
|
|
|
'%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if
|
|
|
|
|
|
|
|
test="userName != null and userName != ''">and log.user_name likeconcat('%', #{userName}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="type != null and type != ''">and log.type = #{type}</if>
|
|
|
|
|
|
|
|
<if test="flag != null ">and log.flag = #{flag}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
) as temp
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLarkLoginLogById" parameterType="Long" resultMap="LarkLoginLogResult">
|
|
|
|
<select id="selectLarkLoginLogById" parameterType="Long" resultMap="LarkLoginLogResult">
|
|
|
|
<include refid="selectLarkLoginLogVo"/>
|
|
|
|
<include refid="selectLarkLoginLogVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
<insert id="insertLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" useGeneratedKeys="true"
|
|
|
|
|
|
|
|
keyProperty="id">
|
|
|
|
insert into lark_login_log
|
|
|
|
insert into lark_login_log
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="openId != null">open_id,</if>
|
|
|
|
<if test="openId != null">open_id,</if>
|
|
|
@ -66,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="flag != null">flag,</if>
|
|
|
|
<if test="flag != null">flag,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="openId != null">#{openId},</if>
|
|
|
|
<if test="openId != null">#{openId},</if>
|
|
|
|
<if test="companyName != null">#{companyName},</if>
|
|
|
|
<if test="companyName != null">#{companyName},</if>
|
|
|
@ -79,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="flag != null">#{flag},</if>
|
|
|
|
<if test="flag != null">#{flag},</if>
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog">
|
|
|
|
<update id="updateLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog">
|
|
|
@ -101,11 +138,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteLarkLoginLogById" parameterType="Long">
|
|
|
|
<delete id="deleteLarkLoginLogById" parameterType="Long">
|
|
|
|
delete from lark_login_log where id = #{id}
|
|
|
|
delete
|
|
|
|
|
|
|
|
from lark_login_log
|
|
|
|
|
|
|
|
where id = #{id}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteLarkLoginLogByIds" parameterType="String">
|
|
|
|
<delete id="deleteLarkLoginLogByIds" parameterType="String">
|
|
|
|
delete from lark_login_log where id in
|
|
|
|
delete from lark_login_log where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|