<?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="io.renren.modules.generator.dao.ApplicationsDao">

    <!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.generator.entity.ApplicationsEntity" id="applicationsMap">
        <result property="applicationName" column="application_name"/>
        <result property="applicationId" column="application_id"/>
        <result property="deployDeviceId" column="deploy_device_id" />
        <result property="applicationVersion" column="application_version"/>
        <result property="lastUpdateTime" column="last_update_time"/>
        <result property="parentClusterId" column="parent_cluster_id"/>
        <result property="applicationStatus" column="application_status"/>
        <result property="parentProjectName" column="parent_project_name"/>
        <result property="createTime" column="create_time"/>
        <result property="creatorName" column="creator_name"/>
        <result property="applicationDescription" column="application_description"/>
    </resultMap>

    <select id="selectByDeployDeviceId" parameterType="java.lang.Integer" resultType="java.lang.Integer">
        select count(*) from applications
        where deploy_device_id=#{deployDeviceId,jdbcType=INTEGER}
    </select>


</mapper>