| | |
| | | @RestController |
| | | @Api(tags = "邀请码管理") |
| | | @Slf4j |
| | | @RequestMapping("/api/v1/invitation") |
| | | @RequestMapping("") |
| | | public class XpInvitationCodeController { |
| | | @Resource |
| | | private IXpInvitationCodeService xpInvitationCodeService; |
| | |
| | | private IXpWhitelistService xpWhitelistService; |
| | | |
| | | @ApiOperation(value = "邀请码管理分页列表",response = XpInvitationCode.class) |
| | | @PostMapping("/pageList") |
| | | @PostMapping("/api/v1/invitation/pageList") |
| | | public R<PageInfo<XpInvitationCode>> pageList(@RequestBody InvitationPageListQuery query) { |
| | | PageInfo<XpInvitationCode> pageList = xpInvitationCodeService.pageList(query); |
| | | return R.ok(pageList); |
| | |
| | | /** |
| | | * 生成邀请码 |
| | | */ |
| | | @PutMapping("/add") |
| | | @PutMapping("/api/v1/invitation/add") |
| | | @ResponseBody |
| | | @ApiOperation(value = "生成邀请码") |
| | | @ApiImplicitParams({ |
| | |
| | | /** |
| | | * 解绑 |
| | | */ |
| | | @PutMapping("/unbind") |
| | | @PutMapping("/api/v1/invitation/unbind") |
| | | @ResponseBody |
| | | @ApiOperation(value = "解绑") |
| | | @ApiImplicitParams({ |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "点位导入模板下载") |
| | | @GetMapping("/import-template") |
| | | @GetMapping("/api/v1/invitation/import-template") |
| | | public void importTemplate() { |
| | | List<InvitationCodeImportExcel> invitationCodeImportExcels = new ArrayList<>(); |
| | | InvitationCodeImportExcel invitationCodeImportExcel = new InvitationCodeImportExcel(); |
| | |
| | | } |
| | | } |
| | | @ApiOperation(value = "邀请码导入") |
| | | @PostMapping("/importExcel") |
| | | @PostMapping("/base/v1/invitation/importExcel") |
| | | public R<String> importExcel(@RequestPart("file") MultipartFile file) { |
| | | ImportParams params = new ImportParams(); |
| | | params.setHeadRows(1); //表头行数 |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "邀请码导出") |
| | | @PostMapping(value = "/exportExcel") |
| | | @PostMapping(value = "/api/v1/invitation/exportExcel") |
| | | public void exportExcel(@RequestBody InvitationPageListQuery query) { |
| | | List<XpInvitationCode> list = xpInvitationCodeService.exportList(query); |
| | | List<XpInvitationCodeExportExcel> xpWhitelistExportExcels = new ArrayList<>(); |
| | |
| | | /** |
| | | * 批量删除 |
| | | */ |
| | | @GetMapping("/deleteByIds") |
| | | @GetMapping("/api/v1/invitation/deleteByIds") |
| | | @ResponseBody |
| | | @ApiOperation(value = "批量删除") |
| | | public R deleteByIds(String ids){ |