加上售中下单逻辑,修改账号渠道,进粉统计的渠道和下单时保持一致
This commit is contained in:
@ -41,6 +41,7 @@
|
||||
<result property="serverEndTime" column="server_end_time"/>
|
||||
<result property="becomeFanTime" column="become_fan_time"/>
|
||||
|
||||
<result property="pushPreSaleId" column="push_pre_sale_id" />
|
||||
<result property="onSaleId" column="on_sale_id"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="orderCountType" column="order_count_type"/>
|
||||
@ -63,7 +64,7 @@
|
||||
o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time,
|
||||
o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id,
|
||||
o.recommender, o.order_time,o.give_serve_day,o.conditioning_project_id,cp.dict_label as conditioning_project,o.server_end_time,
|
||||
o.on_sale_id,o.order_type,o.order_count_type,o.order_money_type,o.main_order_id,o.after_sale_commiss_order,o.commiss_start_time, o.counted
|
||||
o.on_sale_id,o.order_type,o.order_count_type,o.order_money_type,o.main_order_id,o.after_sale_commiss_order,o.commiss_start_time, o.counted,o.push_pre_sale_id
|
||||
from sys_order o
|
||||
LEFT JOIN sys_customer sc ON sc.id = o.cus_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
||||
@ -227,6 +228,7 @@
|
||||
<if test="operatorId != null">operator_id,</if>
|
||||
<if test="serveTimeId != null">serve_time_id,</if>
|
||||
<if test="recommender != null">recommender,</if>
|
||||
<if test="pushPreSaleId != null">push_pre_sale_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
@ -270,6 +272,7 @@
|
||||
<if test="operatorId != null">#{operatorId},</if>
|
||||
<if test="serveTimeId != null">#{serveTimeId},</if>
|
||||
<if test="recommender != null">#{recommender},</if>
|
||||
<if test="pushPreSaleId != null">#{pushPreSaleId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
@ -316,6 +319,7 @@
|
||||
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||
<if test="serveTimeId != null">serve_time_id = #{serveTimeId},</if>
|
||||
<if test="recommender != null">recommender = #{recommender},</if>
|
||||
<if test="pushPreSaleId != null">push_pre_sale_id = #{pushPreSaleId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
@ -387,6 +391,7 @@
|
||||
<result property="serverEndTime" column="server_end_time"/>
|
||||
<result property="becomeFanTime" column="become_fan_time"/>
|
||||
|
||||
<result property="pushPreSaleId" column="push_pre_sale_id" />
|
||||
<result property="onSaleId" column="on_sale_id"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="orderCountType" column="order_count_type"/>
|
||||
|
@ -35,7 +35,7 @@
|
||||
FROM sys_wx_distribution AS swd
|
||||
lEFT JOIN sys_wx_sale_account swsa ON swsa.id = swd.wechat_account and swsa.del_flag = 0
|
||||
LEFT JOIN sys_user su ON su.user_id = swd.user_id AND su.del_flag = 0
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sale_group') AS asg ON asg.dict_value = swd.sale_group_id
|
||||
where swd.del_flag = 0
|
||||
</sql>
|
||||
|
@ -37,7 +37,7 @@
|
||||
left join sys_wx_sale_account swsa on swsa.id = swfs.wx_id and swsa.del_flag = 0
|
||||
left join sys_wx_distribution swd on swd.wechat_account = swfs.wx_id and swd.del_flag = 0
|
||||
left join sys_user su on su.user_id = swd.user_id and su.del_flag = 0
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sale_group') AS asg ON asg.dict_value = swd.sale_group_id
|
||||
</sql>
|
||||
|
||||
|
@ -145,6 +145,15 @@
|
||||
left join sys_wx_distribution swd on wa.id = swd.wechat_account and swd.del_flag = 0
|
||||
LEFT JOIN sys_user su ON su.user_id = swd.user_id AND su.del_flag = 0
|
||||
where wa.del_flag = 0 and wa.status = 0
|
||||
<if test="saleId != null">
|
||||
and swd.user_id = #{saleId}
|
||||
</if>
|
||||
<if test="wxAccount != null and wxAccount != ''">
|
||||
and wa.wx_account like concat('%',#{wxAccount},'%')
|
||||
</if>
|
||||
<if test="channel != null">
|
||||
and swd.account_id = #{channel}
|
||||
</if>
|
||||
order by su.user_id asc
|
||||
</select>
|
||||
|
||||
|
Reference in New Issue
Block a user