<?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.mca.cmmn.mapper.LogMapper">

  <insert id="insertLog" parameterType="logVO">
    insert into t_logs values(
      #{log_cd}, #{userid}, #{action}, #{etc}, #{created_date}
    );
  </insert>

  <select id="selectLoginCnt" parameterType="baseSearchVO" resultType="int">
    select
      count(*)
    from t_logs
    where created_date >= concat(#{searchStartDate},' 00:00:00')
      and created_date &lt;= concat(#{searchEndDate}' 23:59:59')
      and action = 'login'
  </select>
</mapper>