add
yj
2024-12-05 b9900893177c78fc559223521fe839aa21000017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.iotechn.unimall.data.mapper;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dobbinsoft.fw.support.mapper.IMapper;
import com.dobbinsoft.fw.support.model.KVModel;
import com.dobbinsoft.fw.support.model.Page;
import com.iotechn.unimall.data.domain.CouponDO;
import com.iotechn.unimall.data.dto.CouponAdminDTO;
import com.iotechn.unimall.data.dto.CouponDTO;
import org.apache.ibatis.annotations.Param;
 
import java.util.Date;
import java.util.List;
 
/**
 * Created by rize on 2019/7/4.
 */
public interface CouponMapper extends IMapper<CouponDO> {
 
    public Integer decCoupon(Long couponId);
 
    //这样写MyBatis无法直接映射泛型,只能用Long了
    public List<KVModel<Long,Long>> getUserCouponsCount(@Param("userId") Long userId, @Param("couponIds") List<Long> couponIds);
 
    public List<CouponDTO> getActiveCoupons();
 
    public Page<CouponAdminDTO> getAdminCouponList(IPage<CouponAdminDTO> page, @Param("title") String title, @Param("type") Integer type, @Param("status") Integer status, @Param("now") Date now);
 
}