|
|
@@ -97,6 +97,52 @@
|
|
|
company_id ASC
|
|
|
LIMIT #{dto.pageSize} OFFSET #{dto.pageNum};
|
|
|
</select>
|
|
|
+ <select id="queryInfoPages" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ company_id as companyId,
|
|
|
+ GROUP_CONCAT(
|
|
|
+ CONCAT(
|
|
|
+ '{"id":', id,
|
|
|
+ ',"orderno":"', orderno,
|
|
|
+ '","companyId":"', company_id,
|
|
|
+ '","userId":"', user_id,
|
|
|
+ '","userName":"', user_name,
|
|
|
+ '","issuerId":"', issuer_id,
|
|
|
+ '","issuerName":"', issuer_name,
|
|
|
+ '","jqpremium":', jqpremium,
|
|
|
+ ',"sypremium":', sypremium,
|
|
|
+ ',"jypremium":', jypremium,
|
|
|
+ ',"sumpremium":', sumpremium,
|
|
|
+ ',"proportional":"', proportional,
|
|
|
+ '","extractFee":', extract_fee,
|
|
|
+ ',"status":', status,
|
|
|
+ ',"createTime":"', DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s'),
|
|
|
+ '","type":', type,
|
|
|
+ ',"industrySector":', industry_sector,
|
|
|
+ ',"licenseno":"', licenseno,
|
|
|
+ '","source":', source,
|
|
|
+ '}'
|
|
|
+ )
|
|
|
+ ) AS sysPremiumDetails
|
|
|
+ FROM
|
|
|
+ sys_premium_details
|
|
|
+ <where>
|
|
|
+ status = 1
|
|
|
+ <if test="dto.userId !=null and dto.userId !=''">
|
|
|
+ and user_id = #{dto.userId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.industrySector != 0 ">
|
|
|
+ and industry_sector = #{dto.industrySector}
|
|
|
+ </if>
|
|
|
+ <if test="dto.beginTime != null and dto.beginTime != '' and dto.endTime != null and dto.endTime != ''">
|
|
|
+ and (DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') between DATE_FORMAT( #{dto.beginTime}, '%Y-%m-%d %H:%i:%s') and DATE_FORMAT( #{dto.endTime}, '%Y-%m-%d %H:%i:%s'))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY
|
|
|
+ company_id
|
|
|
+ ORDER BY
|
|
|
+ company_id ASC
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
</mapper>
|