package com.hai.dao; import com.hai.entity.HighOrder; import com.hai.model.*; 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.math.BigDecimal; import java.util.List; import java.util.Map; /** * mapper扩展类 */ public interface HighOrderMapperExt { @Select({"SELECT * FROM high_order ho WHERE TIMESTAMPDIFF(MINUTE,ho.create_time,SYSDATE()) > 15 AND ho.order_status = 1"}) @Results({ @Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", 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) }) List getCloseOrder(); @Select({"select distinct * from high_order a left join high_child_order b on a.id = b.order_id where order_status in (1,2) and goods_type in (4,9,10) group by a.id;"}) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="mem_card_id", property="memCardId", jdbcType=JdbcType.BIGINT), @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", jdbcType=JdbcType.VARCHAR), @Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT), @Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), @Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR), @Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT), @Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER), @Result(column="region_id", property="regionId", 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) }) List getThirdOrder(); @Select({ "" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), @Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), }) List selectOrderDataList(@Param("map") Map map); @Select({""}) List selectGoodsOrderList(@Param("map") Map map); @Select({""}) List selectKfcOrderList(@Param("map") Map map); @Select({""}) List selectCinemaOrderList(@Param("map") Map map); @Select({""}) List getMobileOrderList(@Param("map") Map map); @Select({""}) List getOrderListByIdCode(@Param("map") Map map); /** * 查询处于已经支付和待支付的话费订单 */ @Select({"SELECT" + " b.*" + " FROM" + " high_child_order a," + " high_order b" + " WHERE" + " a.order_id = b.id" + " and a.goods_type = 6" + " and b.order_status in (1,2) " + " and a.giveaway_type = 0" + " GROUP BY b.id"}) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", 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) }) List selectAlreadyPaidMobileOrder(); /** * 查询处于已经支付和待支付的KFC订单 */ @Select({"SELECT " + " b.*" + " FROM" + " high_child_order a," + " high_order b" + " WHERE" + " a.order_id = b.id" + " and a.goods_type = 4" + " and b.order_status in (1,2) " + " and a.giveaway_type = 0" + " GROUP BY b.id"}) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", 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) }) List selectAlreadyPaidKfcOrder(); /** * 查询处于已经支付和待支付的电影票订单 */ @Select({"SELECT" + " b.*" + " FROM" + " high_child_order a," + " high_order b" + " WHERE" + " a.order_id = b.id" + " and a.goods_type = 5" + " and b.order_status in (1,2)" + " and a.giveaway_type = 0" + " GROUP BY b.id"}) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", 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) }) List selectAlreadyPaidCinemaOrder(); @Select("select a.id,a.order_no,TRIM(BOTH '\"' FROM b.transaction_id) pay_serial_no from " + "(select id,order_no from high_order where order_status = 5 and create_time >= '2021-06-21 00:00:00') a" + "LEFT JOIN (select JSON_EXTRACT(body_info,'$.out_trade_no') out_trade_no,JSON_EXTRACT(body_info,'$.transaction_id') transaction_id from high_pay_record where create_time >= '2021-06-21 00:00:00' and res_type = 2 GROUP BY JSON_EXTRACT(body_info,'$.out_trade_no')) b on a.order_no = b.out_trade_no where b.out_trade_no is not null") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", 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) }) List selectTest(); @Select({"select a.id orderId,b.id childOrderId from high_order a,high_child_order b where a.id = b.order_id and b.goods_type = 3 and a.order_status = 2 and TIMESTAMPDIFF(MINUTE,a.pay_time,SYSDATE()) > 60*24 GROUP BY b.id"}) List> selectFinishGasOrder(); @Select({""}) List ExportPreOrderList(@Param("map") Map map); @Select({""}) List selectDiscountPackageOrderList(@Param("map") Map map); @Select(value = { "" }) @Results({ @Result(column="payPrice", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="orderPrice", property="orderPrice", jdbcType=JdbcType.DECIMAL), @Result(column="count", property="count", jdbcType=JdbcType.BIGINT), }) OrderCountModel orderByIndex(Integer code); @Select(value = { "" }) @Results({ @Result(column="payRealPrice", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="orderPrice", property="orderPrice", jdbcType=JdbcType.DECIMAL), @Result(column="count", property="count", jdbcType=JdbcType.BIGINT), }) OrderCountModel HLTOrderByIndex(Integer code); @Select({""}) List selectOrderList(@Param("map") Map map); @Select(value = { ""}) BigDecimal orderPriceTotal(@Param("map") Map map); @Select(value = { "" }) BigDecimal rechargePriceTotal(@Param("map") Map map); @Select(value = { "" }) Long orderPriceCount(@Param("map") Map map); @Select(value = { "" }) Long rechargePriceCount(@Param("map") Map map); @Select(value = { "" }) List getOrderSumOrderByDate(); @Select(value = { "" }) List getOrderSumRechargeByDate(); @Select(value = { "" }) List getDateCountByOrder(); @Select(value = { "" }) List getDateCountByRecharge(); @Select(value = { "" }) List getDateCountByUser(); @Select({"select count(1) from high_order " + "where id in (select b.order_id from high_child_order b where goods_type = 3 and mem_id = #{userId} and child_orde_status in (2,3)) " + "and year(pay_time)=year(now()) and month(pay_time) = month(now()) and day(pay_time) = day(now())"}) int selectGasTheDayOrderNum(@Param("userId") Long userId); @Select(value = { "" }) @Results({ @Result(column="tradePrice", property="tradePrice", jdbcType=JdbcType.DECIMAL), @Result(column="discountedPrice", property="discountedPrice", jdbcType=JdbcType.DECIMAL), @Result(column="orderPrice", property="orderPrice", jdbcType=JdbcType.DECIMAL), }) TyOrderCountModel TyOrderCount(@Param("map") Map map); @Select(value = { "" }) int TyOrderNum(@Param("map") Map map); @Select(value = { "" }) int TyOrderNumByPrice(@Param("map") Map map); @Select(value = { "" }) @Results({ @Result(column="value", property="value", jdbcType=JdbcType.INTEGER), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), }) List TyOrderNumGroupByPayType(@Param("map") Map map); @Select(value = { "" }) @Results({ @Result(column="value", property="value", jdbcType=JdbcType.INTEGER), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), }) List TyOrderNumGroupByGasOilNo(@Param("map") Map map); @Select({" select" + " case when SUM(gas_refuel_price) is null then 0 else SUM(gas_refuel_price) end price," + " count(1) count" + " from high_gas_order where store_id = #{storeId} and status in (${status}) " + " and to_days(pay_time) = to_days(now())"}) Map selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status); @Select({" select" + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," + " count(1) count" + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) " + " and to_days(pay_time) = to_days(now())"}) Map selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); @Select({" select" + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," + " count(1) count" + " from high_gas_order a where store_id = #{storeId} and a.status in (${status}) "}) Map selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status); @Select({" select" + " case when SUM(a.total_price) is null then 0 else SUM(a.total_price) end price," + " count(1) count" + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) "}) Map selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); @Select({ "" }) Map countGasStoreOrder(@Param("param") Map param); @Select({ "" }) @Results({ @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_station_name", property="oilStationName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_oil_type", property="gasOilType", jdbcType=JdbcType.INTEGER), @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price", property="gasPrice", jdbcType=JdbcType.DECIMAL), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), }) List getSelfOilStationOrderList(@Param("goodsId") String goodsId); @Select("select ho.* from high_order ho left join bs_order_rebate bor on ho.id = bor.order_id where bor.id is null and order_status = 3 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false and ho.create_time > '2023-02-01 00:00:00' group by create_time desc;") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_id", property="memCardId", jdbcType=JdbcType.BIGINT), @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR), @Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), @Result(column="profit_sharing_record_id", property="profitSharingRecordId", jdbcType=JdbcType.BIGINT), @Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT), @Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_content", property="exceptionContent", 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 integralRebateOrder(); @Select({"" }) List getApiThirdOrderByList(@Param("map") Map map); @Select("SELECT * FROM high_order WHERE create_time < NOW()-INTERVAL 3 day and product_type = 9 and order_status = 2 group by create_time asc;") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_id", property="memCardId", jdbcType=JdbcType.BIGINT), @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR), @Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), @Result(column="profit_sharing_record_id", property="profitSharingRecordId", jdbcType=JdbcType.BIGINT), @Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT), @Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_content", property="exceptionContent", 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 phoneErrorOrder(); @Select({ "" }) Map HltCardNoTopUpStatistic(); }