package com.izouma.jiashanxia.service;

import cn.hutool.core.collection.CollUtil;
import com.izouma.jiashanxia.ApplicationTests;
import com.izouma.jiashanxia.dto.PageQuery;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;


public class UserCouponServiceTest extends ApplicationTests {

    @Autowired
    private UserCouponService userCouponService;

    @Test
    public void getCoupon() {
        userCouponService.getCoupon(916L, 1124L);
    }

    @Test
    public void writeOff() {
        userCouponService.writeOff(1142L, 2L);
    }

    @Test
    public void backAll() {
        PageQuery pageQuery = new PageQuery();
        Map<String, Object> query = pageQuery.getQuery();
        query.put("attractionsId", 1124L);
        userCouponService.backAll(pageQuery);
    }
}