<?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.gree.mall.manager.commonmapper.workorder.IncreMapper">


    <select id="list" resultType="com.gree.mall.manager.bean.workorder.IncreVO">
        SELECT
        ${ex.selected}
        FROM pg_incre a
        ${ex.query}
        <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
            AND a.company_wechat_id IN
            <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="ex.orderBy == null or ex.orderBy ==''">
            ORDER BY a.create_time DESC
        </if>
        ${ex.orderBy}
    </select>
</mapper>