parent
82e27c0062
commit
fb9de099ac
@ -1,7 +1,21 @@ |
|||||||
package com.hai.dao; |
package com.hai.dao; |
||||||
|
|
||||||
|
import com.hai.model.AgentSalesModel; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
|
||||||
/** |
/** |
||||||
* mapper扩展类 |
* mapper扩展类 |
||||||
*/ |
*/ |
||||||
public interface HighCouponAgentRelMapperExt { |
public interface HighCouponAgentRelMapperExt { |
||||||
|
|
||||||
|
|
||||||
|
@Select(" select case when sum(1) is not null then sum(1) else 0 end count," + |
||||||
|
" case when sum(c.sales_price) is not null then sum(c.sales_price) else 0 end salesCountPrice " + |
||||||
|
" from high_coupon_agent_code a,high_coupon_code b,high_coupon_agent_rel c" + |
||||||
|
" where c.id = a.coupon_agent_id and c.agent_id = #{agentId}" + |
||||||
|
" and a.status = 2 and a.coupon_code_id = b.id and b.consume_time >= #{consumeTimeS} and b.consume_time <= #{consumeTimeE}") |
||||||
|
AgentSalesModel getAgentSales(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE); |
||||||
} |
} |
@ -0,0 +1,31 @@ |
|||||||
|
package com.hai.model; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: 胡锐 |
||||||
|
* @Description: |
||||||
|
* @Date: 2021/4/22 23:44 |
||||||
|
*/ |
||||||
|
public class AgentSalesModel { |
||||||
|
|
||||||
|
private Integer count; |
||||||
|
|
||||||
|
private BigDecimal salesCountPrice; |
||||||
|
|
||||||
|
public Integer getCount() { |
||||||
|
return count; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCount(Integer count) { |
||||||
|
this.count = count; |
||||||
|
} |
||||||
|
|
||||||
|
public BigDecimal getSalesCountPrice() { |
||||||
|
return salesCountPrice; |
||||||
|
} |
||||||
|
|
||||||
|
public void setSalesCountPrice(BigDecimal salesCountPrice) { |
||||||
|
this.salesCountPrice = salesCountPrice; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue