<?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.lutao.cloud.oil.mapper.AppInfoMapper">

  <resultMap id="appInfoMap" type="com.lutao.entity.AppInfo">
                  <id property="id" column="id"/>
                        <result property="companyCode" column="company_code"/>
                        <result property="companyName" column="company_name"/>
                        <result property="appName" column="app_name"/>
                        <result property="appKey" column="app_key"/>
                        <result property="appSecret" column="app_secret"/>
                        <result property="clientSecret" column="client_secret"/>
                        <result property="pfStatus" column="pf_status"/>
            </resultMap>
    <select id="appPlatformNumber" resultType="com.lutao.cloud.oil.pojo.vo.AppPlatformNumberVO">
        SELECT
            app_name AS appName,
            COUNT(*) AS platformNumber
        FROM
            platform_info pi
                LEFT JOIN app_info ai ON pi.app_id = ai.id
        WHERE
            pi.delete_flag = '0'
        GROUP BY
            pi.app_id
    </select>
</mapper>
