package com.xxfc.platform.order;

import cn.hutool.extra.template.Template;
import cn.hutool.extra.template.TemplateConfig;
import cn.hutool.extra.template.TemplateEngine;
import cn.hutool.extra.template.TemplateUtil;
import com.xxfc.platform.order.biz.BaseOrderBiz;
import com.xxfc.platform.order.entity.BaseOrder;
import lombok.extern.slf4j.Slf4j;
import org.junit.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.SpringJUnit4ClassRunner;

import java.util.HashMap;

@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes={OrderApplication.class})
public class OrderTest {


    @Autowired
    BaseOrderBiz baseOrderBiz;

    @Test
    public void test() {

        BaseOrder baseOrder =baseOrderBiz.selectById(93);
        baseOrder.setRefundTime(System.currentTimeMillis());
        baseOrder.setVersion(baseOrder.getVersion() - 1);
        baseOrderBiz.updateSelectiveById(baseOrder);

        log.info("success");
    }
}
