import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.sqx.SqxApplication;
import com.sqx.common.utils.Query;
import com.sqx.common.utils.RedisUtils;
import com.sqx.modules.activity.entity.ActivityPartRecord;
import com.sqx.modules.activity.service.ActivityPartRecordService;
import com.sqx.modules.app.dao.UserMoneyDetailsDao;
import com.sqx.modules.app.entity.UserMoneyDetails;
import com.sqx.modules.app.service.UserMoneyDetailsService;
import com.sqx.modules.app.service.UserMoneyService;
import com.sqx.modules.common.entity.CommonInfo;
import com.sqx.modules.common.service.CommonInfoService;
import com.sqx.modules.coupon.dao.TbCouponUserDao;
import com.sqx.modules.coupon.entity.TbCouponUser;
import com.sqx.modules.coupon.service.TbCouponService;
import com.sqx.modules.errand.entity.TbIndentSmsSendLog;
import com.sqx.modules.goods.entity.GoodsShop;
import com.sqx.modules.order.dao.AppOrderDao;
import com.sqx.modules.order.entity.TbOrder;
import com.sqx.modules.order.service.AppOrderService;
import com.sqx.modules.pay.service.WxService;
import com.sqx.modules.shop.service.ShopMessageService;
import com.sqx.scheduler.order.OrderScheduler;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;

/**
 * @author : codingliang
 * @date : 2024-09-10 16:24
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SqxApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class OrderTest {

    @Resource
    private AppOrderService appOrderService;

    @Resource
    private ShopMessageService shopMessageService;

    @Resource
    private TbCouponUserDao tbCouponUserDao;

    @Resource
    private ActivityPartRecordService activityPartRecordService;

    @Resource
    private CommonInfoService commonInfoService;

    @Resource
    private UserMoneyDetailsDao userMoneyDetailsDao;

    @Resource
    private UserMoneyDetailsService userMoneyDetailsService;

    @Resource
    private UserMoneyService userMoneyService;

    @Resource
    private OrderScheduler orderScheduler;

    @Resource
    private WxService wxService;

    @Resource
    private RedisUtils redisUtils;
    @Autowired
    private AppOrderDao appOrderDao;

    @Autowired
    private AppOrderService orderService;

    @Test
    public void test() {
        orderService.accomplishOrder(1521747L, 2);
    }

    @Test
    public void test2() {
        String value = commonInfoService.findOne(19).getValue();
        System.out.println("value = " + value);
    }
}
