|
|
|
package com.hai.dao;
|
|
|
|
|
|
|
|
import com.hai.model.CmsContentModel;
|
|
|
|
import com.hai.model.OutRechargeOrderModel;
|
|
|
|
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.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* mapper扩展类
|
|
|
|
*/
|
|
|
|
public interface OutRechargeOrderMapperExt {
|
|
|
|
|
|
|
|
@Select(value = {
|
|
|
|
"<script>",
|
|
|
|
"SELECT DATE_FORMAT(finish_time, '%Y-%m-%d') as day,",
|
|
|
|
"count(1) as count,",
|
|
|
|
"sum(pay_price) as pay_price,",
|
|
|
|
"sum(order_price) as order_price",
|
|
|
|
"from out_recharge_order",
|
|
|
|
"where status = 3",
|
|
|
|
" <if test='map.finishTimeS != null'> <![CDATA[ AND bco.finish_time >= '${map.finishTimeS}' ]]> </if> " ,
|
|
|
|
" <if test='map.finishTimeE != null'> <![CDATA[ AND bco.finish_time <= '${map.finishTimeE}' ]]> </if> " ,
|
|
|
|
"GROUP BY day",
|
|
|
|
"</script>"
|
|
|
|
})
|
|
|
|
@Results({
|
|
|
|
@Result(column="count", property="count", jdbcType=JdbcType.BIGINT),
|
|
|
|
@Result(column="day", property="day", jdbcType=JdbcType.TIMESTAMP),
|
|
|
|
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
|
|
|
|
@Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL),
|
|
|
|
})
|
|
|
|
List<OutRechargeOrderModel> getListOrderCount(@Param("map") Map<String,String> map);
|
|
|
|
}
|