From 997b721ad8c8026d733c5ba953c462d268560d57 Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期一, 25 十二月 2023 01:45:40 +0800 Subject: [PATCH] 第一阶段 --- data-server/src/main/resources/mapper/DataReportingMapper.xml | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/data-server/src/main/resources/mapper/DataReportingMapper.xml b/data-server/src/main/resources/mapper/DataReportingMapper.xml index abbdd78..2d5c698 100644 --- a/data-server/src/main/resources/mapper/DataReportingMapper.xml +++ b/data-server/src/main/resources/mapper/DataReportingMapper.xml @@ -31,17 +31,6 @@ <result property="updateUser" column="update_user" jdbcType="VARCHAR"/> </resultMap> - <sql id="Base_Column_List"> - id,department,registrant, - product,channel,name, - show,click,account_consumption, - rebate_consumption,consumption,discounted_consumption, - fans_add,actual_cost,internal_costs, - customer_costs,profit,agent_rebate, - customer_rebate,remark,create_time, - update_time,create_user,update_user - </sql> - <select id="selectDataReportingDtoPageList" resultType="com.yuanchu.mom.dto.DataReportingPageDto"> select * from ( select dr.*,u1.name create_user_name,u2.name update_user_name from data_reporting dr @@ -52,4 +41,24 @@ ${ew.customSqlSegment} </if> </select> + <select id="selectProductCountDtoPageList" resultType="com.yuanchu.mom.dto.ProductCountDto"> + select * from ( + select update_time, create_time, product, sum(consumption) consumption, sum(fans_add) fans_add, sum(customer_costs) customer_costs + from data_reporting + group by product + ) a + <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> + ${ew.customSqlSegment} + </if> + </select> + <select id="selectRegistrantCountDtoPageList" resultType="com.yuanchu.mom.dto.RegistrantCountDto"> + select * from ( + select id, department, registrant, product, name, sum(`show`) `show`, sum(click) click, sum(account_consumption)account_consumption, sum(rebate_consumption) rebate_consumption,(sum(rebate_consumption)+sum(remark)) rebate_consumption2, sum(discounted_consumption) discounted_consumption, sum(fans_add) fans_add, sum(actual_cost) actual_cost, sum(customer_costs) customer_costs, sum(profit) profit, sum(agent_rebate) agent_rebate, sum(customer_rebate) customer_rebate, sum(remark) remark, create_time, update_time + from data_reporting + group by registrant + ) a + <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> + ${ew.customSqlSegment} + </if> + </select> </mapper> -- Gitblit v1.9.3