TCheckLockMapper.xml 1.4 KB
Newer Older
fangxinjiang's avatar
fangxinjiang committed
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
<?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.yifu.cloud.plus.v1.check.mapper.TCheckLockMapper">
    <resultMap id="tCheckIdCardMap" type="com.yifu.cloud.plus.v1.check.entity.TCheckLock">
        <id property="id" column="id"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="createUserName" column="CREATE_USER_NAME"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="createMonth" column="CREATE_MONTH"/>
        <result property="importNum" column="IMPORT_NUM"/>
        <result property="apiNum" column="API_NUM"/>
        <result property="deleteFlag" column="DELETE_FLAG"/>
    </resultMap>
    <sql id="Base_Column_List">
        ID,
        CREATE_USER,
        CREATE_USER_NAME,
        CREATE_TIME,
        CREATE_MONTH,
        IMPORT_NUM,
        API_NUM,
        DELETE_FLAG
    </sql>

    <!--获取所有数据-->
    <select id="getAllList" resultMap="tCheckIdCardMap">
        SELECT
            <include refid="Base_Column_List"/>
        FROM t_check_lock a
        where a.DELETE_FLAG = 0
    </select>

hongguangwu's avatar
hongguangwu committed
33 34 35 36 37
	<!--获取所有数据-->
	<select id="getApiNumByMonth" resultType="java.lang.Integer">
		select ifnull(sum(c.API_NUM),0) apiNum from t_check_lock c where c.CREATE_MONTH = #{nowMonth}
	</select>

fangxinjiang's avatar
fangxinjiang committed
38
</mapper>