Merge remote-tracking branch 'origin/master'
commit
8de029e5ea
@ -0,0 +1,46 @@
|
|||||||
|
package com.baiyee.adcallback;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baiyee.adcallback.service.JlV1BackDataService;
|
||||||
|
import com.baiyee.adcallback.service.UcBackDateService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Enzo
|
||||||
|
* @date : 2023/7/4
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest(classes = AdCallbackApplication.class,
|
||||||
|
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
|
public class DeleteTest {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private JlV1BackDataService jlV1BackDataService;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UcBackDateService ucBackDateService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void test1() {
|
||||||
|
|
||||||
|
DateTime dateTime = DateUtil.offsetMonth(DateUtil.date(), -1);
|
||||||
|
ucBackDateService.deleteDateByDateAndLimitNum(dateTime, 5000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue