
2 changed files with 1 additions and 52 deletions
@ -1,51 +0,0 @@ |
|||||
package com.yxt.supervise.report.biz.dailysalesreport; |
|
||||
|
|
||||
import cn.hutool.Hutool; |
|
||||
import cn.hutool.core.date.DateUtil; |
|
||||
import com.yxt.supervise.report.biz.messagepushlog.MessagePushLogService; |
|
||||
import com.yxt.supervise.report.wx.SuperviseWxMessSender; |
|
||||
import junit.framework.TestCase; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import javax.annotation.PostConstruct; |
|
||||
import java.text.ParseException; |
|
||||
import java.text.SimpleDateFormat; |
|
||||
import java.util.Calendar; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/9/6 15:18 |
|
||||
*/ |
|
||||
@Component |
|
||||
public class DailySalesReportServiceTest extends TestCase { |
|
||||
@Autowired |
|
||||
private DailySalesReportService dailySalesReportService; |
|
||||
|
|
||||
public static DailySalesReportServiceTest dailySalesReportServiceTest; |
|
||||
@PostConstruct // 初始化
|
|
||||
public void init(){ |
|
||||
dailySalesReportServiceTest= this; |
|
||||
dailySalesReportServiceTest.dailySalesReportService= this.dailySalesReportService; |
|
||||
} |
|
||||
|
|
||||
// public void test() throws ParseException {
|
|
||||
// SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||
// //String date=ft.format(new Date()-1);
|
|
||||
// //昨天时间
|
|
||||
// Date date= DateUtil.yesterday();
|
|
||||
// //结束时间
|
|
||||
// String d="2023-07-01";
|
|
||||
// Date date1=ft.parse(d);
|
|
||||
// while (date1.before(date)){
|
|
||||
// Calendar calendar = Calendar.getInstance();
|
|
||||
// calendar.setTime(date);
|
|
||||
// calendar.add(Calendar.DAY_OF_MONTH, -1);
|
|
||||
// date = calendar.getTime();
|
|
||||
// System.out.println(ft.format(date));
|
|
||||
// dailySalesReportService.saveSales(ft.format(date));
|
|
||||
// }
|
|
||||
//
|
|
||||
// }
|
|
||||
} |
|
Loading…
Reference in new issue