@ -1,8 +1,13 @@
package com.hfkj.dao ;
import org.apache.ibatis.annotations.Param ;
import org.apache.ibatis.annotations.Result ;
import org.apache.ibatis.annotations.Results ;
import org.apache.ibatis.annotations.Select ;
import org.apache.ibatis.type.JdbcType ;
import java.util.HashMap ;
import java.util.List ;
import java.util.Map ;
/ * *
@ -54,4 +59,93 @@ public interface BsGasOrderMapperExt {
" select count(1) from bs_gas_order where user_phone = #{userPhone} and `status` in (2,5,6) and create_type = 1 and to_days(pay_time) = to_days(NOW())" +
"</script>" )
int countTodayOrder ( @Param ( "userPhone" ) String userPhone ) ;
@Select ( "<script>" +
" select b.*," +
" a.gains_rebate_user_id gainsRebateUserId, " +
" a.gains_rebate_amount gainsRebateAmount, " +
" a.gains_rebate_rate gainsRebateRate, " +
" a.gains_rebate_one_user_id gainsRebateOneUserId, " +
" a.gains_rebate_one_amount gainsRebateOneAmount, " +
" a.gains_rebate_one_rate gainsRebateOneRate, " +
" a.gains_rebate_two_user_id gainsRebateTwoUserId, " +
" a.gains_rebate_two_amount gainsRebateTwoAmount, " +
" a.gains_rebate_two_rate gainsRebateTwoRate" +
" from bs_gas_order_spread a " +
" LEFT JOIN bs_gas_order b on b.order_no = a.order_no " +
" where 1 = 1" +
" <if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>" +
" <if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>" +
" and b.`status` in (${param.status}) " +
" and a.gains_rebate_user_id = #{param.userId} OR a.gains_rebate_one_user_id = #{param.userId} OR a.gains_rebate_two_user_id = #{param.userId}" +
" ORDER BY b.pay_time desc" +
"</script>" )
@Results ( {
@Result ( column = "id" , property = "id" , jdbcType = JdbcType . BIGINT , id = true ) ,
@Result ( column = "order_no" , property = "orderNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "order_child_no" , property = "orderChildNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "channel_type" , property = "channelType" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "channel_order_no" , property = "channelOrderNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "agent_id" , property = "agentId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "agent_name" , property = "agentName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "agent_staff_id" , property = "agentStaffId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "agent_staff_name" , property = "agentStaffName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "user_id" , property = "userId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "user_phone" , property = "userPhone" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "mer_chain_brand_id" , property = "merChainBrandId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "mer_chain_brand_name" , property = "merChainBrandName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "mer_id" , property = "merId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "mer_no" , property = "merNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "mer_name" , property = "merName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "mer_address" , property = "merAddress" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "total_deduction_price" , property = "totalDeductionPrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "deduction_coupon_price" , property = "deductionCouponPrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "deduction_oil_price" , property = "deductionOilPrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "pay_integral" , property = "payIntegral" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "payable_price" , property = "payablePrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "actual_pay_price" , property = "actualPayPrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_refuel_price" , property = "gasRefuelPrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_settle_price" , property = "gasSettlePrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_agent_settle_price" , property = "gasAgentSettlePrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_service_fee_rate" , property = "gasServiceFeeRate" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_service_fee_price" , property = "gasServiceFeePrice" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_oil_no" , property = "gasOilNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "gas_gun_no" , property = "gasGunNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "gas_oil_type" , property = "gasOilType" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "gas_price_official" , property = "gasPriceOfficial" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_price_gun" , property = "gasPriceGun" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_price_vip" , property = "gasPriceVip" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_price_platform" , property = "gasPricePlatform" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_price_cost" , property = "gasPriceCost" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_oil_liters" , property = "gasOilLiters" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_discount" , property = "gasDiscount" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_oil_subsidy" , property = "gasOilSubsidy" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_liters_preferences" , property = "gasLitersPreferences" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_price_preferences" , property = "gasPricePreferences" , jdbcType = JdbcType . DECIMAL ) ,
@Result ( column = "gas_class_group_id" , property = "gasClassGroupId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "gas_class_group_name" , property = "gasClassGroupName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "gas_class_group_task_id" , property = "gasClassGroupTaskId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "gas_staff_id" , property = "gasStaffId" , jdbcType = JdbcType . BIGINT ) ,
@Result ( column = "gas_staff_name" , property = "gasStaffName" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "receipt_status" , property = "receiptStatus" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "receipt_fail_remark" , property = "receiptFailRemark" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "pay_type" , property = "payType" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "pay_serial_no" , property = "paySerialNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "pay_channel_order_no" , property = "payChannelOrderNo" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "status" , property = "status" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "create_type" , property = "createType" , jdbcType = JdbcType . INTEGER ) ,
@Result ( column = "create_time" , property = "createTime" , jdbcType = JdbcType . TIMESTAMP ) ,
@Result ( column = "cancel_time" , property = "cancelTime" , jdbcType = JdbcType . TIMESTAMP ) ,
@Result ( column = "pay_time" , property = "payTime" , jdbcType = JdbcType . TIMESTAMP ) ,
@Result ( column = "refund_time" , property = "refundTime" , jdbcType = JdbcType . TIMESTAMP ) ,
@Result ( column = "refund_remarks" , property = "refundRemarks" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "abnormal" , property = "abnormal" , jdbcType = JdbcType . BIT ) ,
@Result ( column = "abnormal_content" , property = "abnormalContent" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_1" , property = "ext1" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_2" , property = "ext2" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_3" , property = "ext3" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_4" , property = "ext4" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_5" , property = "ext5" , jdbcType = JdbcType . VARCHAR ) ,
@Result ( column = "ext_6" , property = "ext6" , jdbcType = JdbcType . VARCHAR )
} )
List < HashMap < String , Object > > queryOilOrderSpread ( @Param ( "param" ) Map < String , Object > param ) ;
}