package com.jzdsh.auto.biz;

import com.jzdsh.auto.model.CouponSet;
import lombok.extern.log4j.Log4j2;

/**
 * @ProjectName: auto
 * @Package: com.jzdsh.auto.biz
 * @ClassName: CouponSetService
 * @Author: Jzdsh
 * @Description: 优惠券金额设置
 * @Date: 2020/3/23 12:40
 * @Version: 1.0
 */
@Log4j2
public class CouponSetService {

    /**
     * 查找正在使用的优惠券金额设置
     * @param isUse 0 否 1是
     * @param type 0 入驻优惠券，1开通商城优惠券
     * @return
     */
    public CouponSet getByTypeUsed(String isUse, String type) {
        try {
            return CouponSet.dao.findFirst("select * from coupon_set where isUsed = ? and type = ?", isUse, type);
        } catch (Exception e) {
            log.info(e);
        }
        return null;
    }
}
