票务新增区间抽数方法(测试接口)
This commit is contained in:
parent
7b9932797a
commit
fe20745099
@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.infra.controller.admin.ticketing;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.date.TickingDateUtils;
|
||||
import cn.iocoder.yudao.module.infra.job.ticketing.TicketDataMigration;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description 测试抽数接口
|
||||
*/
|
||||
@Tag(name = "管理后台 - 抽数接口")
|
||||
@RestController
|
||||
@RequestMapping("/infra/ticketing")
|
||||
@Validated
|
||||
public class TicketingController {
|
||||
@Resource
|
||||
TicketDataMigration ticketDataMigration;
|
||||
|
||||
@GetMapping
|
||||
public CommonResult<String> testTicketing(@RequestParam("startDate") String startDate, @RequestParam("endDate")String endDate, @RequestParam("method") String method) throws Exception {
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
startCalendar.setTime(TickingDateUtils.parse(startDate));
|
||||
endCalendar.setTime(TickingDateUtils.parse(endDate));
|
||||
return CommonResult.success(ticketDataMigration.getTicketDataByTimeZonesToMongo(startCalendar, endCalendar, method));
|
||||
}
|
||||
}
|
@ -36,6 +36,7 @@ public class SecurityConfiguration {
|
||||
.antMatchers(adminSeverContextPath + "/**").anonymous();
|
||||
// 文件读取
|
||||
registry.antMatchers(buildAdminApi("/infra/file/*/get/**")).permitAll();
|
||||
registry.antMatchers("/**/infra/ticketing/**").permitAll();
|
||||
|
||||
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
|
||||
// RPC 服务的安全配置
|
||||
|
Loading…
Reference in New Issue
Block a user