嗨森逛服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hai-server/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt...

24 lines
1.1 KiB

4 years ago
package com.hai.dao;
4 years ago
import com.hai.model.AgentSalesModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
4 years ago
/**
* mapper扩展类
*/
public interface HighCouponAgentRelMapperExt {
4 years ago
@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 = 3 and a.coupon_code_id = b.id and b.consume_time >= #{consumeTimeS} and b.consume_time <= #{consumeTimeE}")
4 years ago
AgentSalesModel getAgentSales(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE);
4 years ago
@Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (#{status}) ")
Integer getAgentCodeCount(@Param("agentId") Long agentId,@Param("status") String status);
4 years ago
}