<?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.cpop.jambox.business.mapper.DevelopmentMapper">

    <select id="selectDistinctPublishTime" resultType="java.lang.String">
        SELECT
            DATE_FORMAT(publish_time, '%Y.%m') AS formatted_publish_time
        FROM
            cp_j_web_development
        WHERE is_delete = '0'
        GROUP BY
            formatted_publish_time
        ORDER BY
            publish_time ASC;
    </select>
    <select id="selectDevelopmentByPublishTime"
            resultType="com.cpop.jambox.business.entity.website.Development">
        SELECT
            *
        FROM
            cp_j_web_development
        WHERE
            DATE_FORMAT(publish_time, '%Y.%m') = #{publishTime}
            AND is_delete = '0'
        ORDER BY publish_time ASC;
    </select>

</mapper>
