|
@@ -0,0 +1,51 @@
|
|
|
+<?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.github.zuihou.business.externalApi.dao.MesNoticeMapper">
|
|
|
+
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMap" type="com.github.zuihou.business.externalApi.entity.MesNotice">
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="create_user" jdbcType="BIGINT" property="createUser"/>
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
+ <result column="update_user" jdbcType="BIGINT" property="updateUser"/>
|
|
|
+ <result column="bu_type" jdbcType="VARCHAR" property="buType"/>
|
|
|
+ <result column="line_code" jdbcType="VARCHAR" property="lineCode"/>
|
|
|
+ <result column="api_address" jdbcType="VARCHAR" property="apiAddress"/>
|
|
|
+ <result column="api_type" jdbcType="VARCHAR" property="apiType"/>
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
|
|
|
+ <result column="status" jdbcType="VARCHAR" property="status"/>
|
|
|
+ <result column="order_info" jdbcType="VARCHAR" property="orderInfo"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 通用查询结果列 -->
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,bu_type,line_code,api_address,api_type,order_no,status,order_info,api_sort,create_time,create_user,update_time,update_user
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="pageList" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from (
|
|
|
+ SELECT
|
|
|
+ m.*
|
|
|
+ FROM
|
|
|
+ zuihou_base_yj_0000.imcs_mes_notice m,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ MAX(m2.api_sort) AS msort,
|
|
|
+ m2.order_no
|
|
|
+ FROM
|
|
|
+ zuihou_base_yj_0000.imcs_mes_notice m2
|
|
|
+ WHERE m2.`status` in ('1','2')
|
|
|
+ GROUP BY
|
|
|
+ m2.order_no
|
|
|
+ ) n
|
|
|
+ WHERE
|
|
|
+ m.`status` in ('1','2')
|
|
|
+ AND m.api_sort = n.msort and m.order_no = n.order_no
|
|
|
+ group by m.order_no order by m.api_sort asc, m.status desc
|
|
|
+ ) s ${ew.customSqlSegment}
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|