提交代码

dev-discount
胡锐 3 years ago
parent f5fe389bcc
commit 46346f3ab8
  1. 4
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java

@ -51,7 +51,9 @@ public interface HighCouponAgentRelMapperExt {
@Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (${status}) and a.type = #{type} ") @Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (${status}) and a.type = #{type} ")
Integer getAgentCodeCount(@Param("agentId") Long agentId,@Param("status") String status,@Param("type") Integer type); Integer getAgentCodeCount(@Param("agentId") Long agentId,@Param("status") String status,@Param("type") Integer type);
@Select(" select sum(b.sales_price) from high_coupon_agent_code a " + @Select(" select " +
" case WHEN sum(b.sales_price) is null then 0 else sum(b.sales_price) end" +
" from high_coupon_agent_code a " +
" LEFT JOIN high_coupon_agent_rel b on b.id = a.coupon_agent_id " + " LEFT JOIN high_coupon_agent_rel b on b.id = a.coupon_agent_id " +
" where a.agent_id = #{agentId} and a.`status` in (${status}) and a.type = #{type} ") " where a.agent_id = #{agentId} and a.`status` in (${status}) and a.type = #{type} ")
Integer getAgentCodePrice(@Param("agentId") Long agentId,@Param("status") String status,@Param("type") Integer type); Integer getAgentCodePrice(@Param("agentId") Long agentId,@Param("status") String status,@Param("type") Integer type);

Loading…
Cancel
Save