13693261870
2025-07-02 7c7cb1855b7f18802f55a70fa14ed70cbdb11bab
se-system/src/main/resources/mapper/sys/LoginMapper.xml
@@ -1,6 +1,6 @@
<?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.lf.server.mapper.sys.LoginMapper">
<mapper namespace="com.terra.system.mapper.sys.LoginMapper">
    <select id="selectCount" resultType="java.lang.Integer">
        select count(*) from lf.sys_login a inner join lf.sys_user b on a.userid = b.id
        <where>
@@ -20,7 +20,7 @@
        </where>
    </select>
    <select id="selectByPage" resultType="com.lf.server.entity.sys.LoginEntity">
    <select id="selectByPage" resultType="com.terra.system.entity.sys.LoginEntity">
        select a.*,b.uname from lf.sys_login a inner join lf.sys_user b on a.userid = b.id
        <where>
            1 = 1
@@ -41,15 +41,15 @@
        limit #{limit} offset #{offset}
    </select>
    <select id="selectLoginAll" resultType="com.lf.server.entity.sys.LoginEntity">
    <select id="selectLoginAll" resultType="com.terra.system.entity.sys.LoginEntity">
        select * from lf.sys_login order by id desc
    </select>
    <select id="selectLogin" resultType="com.lf.server.entity.sys.LoginEntity">
    <select id="selectLogin" resultType="com.terra.system.entity.sys.LoginEntity">
        select * from lf.sys_login where id = #{id}
    </select>
    <insert id="insertLogin" parameterType="com.lf.server.entity.sys.LoginEntity">
    <insert id="insertLogin" parameterType="com.terra.system.entity.sys.LoginEntity">
        <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
            select currval('lf.sys_login_id_seq'::regclass) as id
        </selectKey>
@@ -84,7 +84,7 @@
    update lf.sys_login set appid=#{appid},ip=#{ip},type=#{type},status=#{status},descr=#{descr},userid=#{userid},optime=now() where id=#{id}
    </update>
    <select id="selectLoginCounts" resultType="com.lf.server.entity.sys.LoginEntity">
    <select id="selectLoginCounts" resultType="com.terra.system.entity.sys.LoginEntity">
        select to_char(optime,'yyyy-mm-dd') as optime,count(*) from lf.sys_login where optime between (select optime - interval '30 day')
        and optime group by to_char(optime, 'yyyy-mm-dd') order by to_char(optime, 'yyyy-mm-dd') asc
    </select>