嗨森逛服务
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/HighCouponMapperExt.java

19 lines
540 B

4 years ago
package com.hai.dao;
2 years ago
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
4 years ago
/**
* mapper扩展类
*/
public interface HighCouponMapperExt {
2 years ago
/**
* 查询月销量
* @param couponId
* @return
*/
@Select({"SELECT count(1) FROM `high_child_order` " +
2 years ago
" where goods_type = 1 and goods_id = #{couponId} and child_order_status in (2,3,6,7) and DATE_FORMAT(pay_time,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m')"})
2 years ago
int getMonthlySales(@Param("couponId") Long couponId);
}