<?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="org.springblade.modules.appmenu.mapper.AppMenuMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="appMenuResultMap" type="org.springblade.modules.appmenu.entity.AppMenu">
        <id column="app_id" property="appId"/>
        <result column="user_id" property="userId"/>
        <result column="appmc" property="appmc"/>
        <result column="qxbs" property="qxbs"/>
        <result column="bzxx" property="bzxx"/>
        <result column="apptb" property="apptb"/>
        <result column="mkbm" property="mkbm"/>
        <result column="sslb" property="sslb"/>
        <result column="bm" property="bm"/>
        <result column="qdlj" property="qdlj"/>
        <result column="appbbh" property="appbbh"/>
        <result column="app_url" property="appUrl"/>
        <result column="ssjz" property="ssjz"/>
        <result column="ssgs" property="ssgs"/>
    </resultMap>




    <select id="selectAppMenuPage" resultMap="appMenuResultMap">
        select * from ydjw_app_menu where is_deleted = 0
    </select>

    <select id="getQzgx" resultType="java.lang.Integer">
        SELECT
            SUM(qzgx)
        FROM
            jdrh.ydjw_app_history
        WHERE
            create_time > ( SELECT create_time FROM jdrh.ydjw_app_history WHERE app_bbh = #{params.appBbh} )
    </select>

</mapper>
