| | |
| | | */ |
| | | @FeignClient(contextId = "AppUserClient", value = ServiceNameConstants.ACCOUNT_SERVICE, fallbackFactory = AppUserFallbackFactory.class) |
| | | public interface AppUserClient { |
| | | |
| | | |
| | | @ApiOperation(value = "管理后台-根据手机号查询用户ids", tags = {"管理后台-活动费用统计"}) |
| | | @PostMapping(value = "/t-app-user/user/getUserIdsByPhone") |
| | | @PostMapping(value = "/t-app-user/user/getUserIdsByPhone1") |
| | | public R<List<Long>> getUserIdsByPhone(@RequestParam("phone") String phone); |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "管理后台-开票发送邮件", tags = {"管理后台-开票发送邮件"}) |
| | | @PostMapping(value = "/t-app-user/uploadPdf") |
| | | public R uploadPdf(@RequestBody UploadPdfDTO dto); |
| | |
| | | R<TActivityVO> activityStatistics(@RequestBody TActivityStatisticsQuery dto); |
| | | |
| | | |
| | | @PostMapping(value = "/chargingBill/accountBillList") |
| | | @PostMapping(value = "/chargingBill/accountBillList1") |
| | | @ApiOperation(value = "列表查询", tags = {"管理后台-账户结算账单"}) |
| | | R<AccountListVO> accountBillList(@RequestBody ChargingListQuery dto); |
| | | |
| | |
| | | @PostMapping(value = "/t-coupon/getCouponById") |
| | | R<TCoupon> getCouponById(@RequestParam("id") Integer id); |
| | | |
| | | @PutMapping(value = "/t-enterprise-user-application/export") |
| | | @PutMapping(value = "/t-enterprise-user-application/export1") |
| | | R<List<TEnterpriseUserApplication>> getTnterPrise(); |
| | | @GetMapping("/region/getRegionBuyCode/{code}") |
| | | R<Region> getRegionBuyCode(@PathVariable("code") String code); |
| | |
| | | */ |
| | | public static String createToken(Map<String, Object> claims) |
| | | { |
| | | System.err.println("claims:" + claims); |
| | | System.err.println("secret:" + secret); |
| | | String token = Jwts.builder().setClaims(claims).signWith(SignatureAlgorithm.HS512, secret).compact(); |
| | | return token; |
| | | } |
| | |
| | | */ |
| | | public static Claims parseToken(String token) |
| | | { |
| | | System.err.println("token:" + token); |
| | | System.err.println("secret:" + secret); |
| | | return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody(); |
| | | } |
| | | |
| | |
| | | public R<List<Long>> getUserIdsByPhone(@RequestParam("phone") String phone) { |
| | | return R.ok(appUserService.list(new QueryWrapper<TAppUser>().like("phone",phone)).stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/user/getUserIdsByPhone1") |
| | | public R<List<Long>> getUserIdsByPhone1(@RequestParam("phone") String phone) { |
| | | return R.ok(appUserService.list(new QueryWrapper<TAppUser>().like("phone",phone)).stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/company"}, logical = Logical.OR) |
| | |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/appUser/giftVip", "/appUser/gift_vip"}, logical = Logical.OR) |
| | | @PostMapping(value = "/user/give/vip1") |
| | | public R giveVip1(@RequestBody GiveVipDto giveVipDto) { |
| | | String[] split = giveVipDto.getUserIds().split(","); |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/accountBillList1") |
| | | public R<AccountListVO> accountBillList1(@RequestBody ChargingListQuery dto) { |
| | | AccountListVO accountListVO = new AccountListVO(); |
| | | ChargingBillVO res = chargingBillService.chargingBillList1(dto); |
| | | List<ChargingBillListVO> records = res.getList().getRecords(); |
| | | accountListVO.setBillCount(records.size()); |
| | | accountListVO.setTotalAmount(res.getPaymentAmount().subtract(res.getCommissionAmount()).subtract(res.getSharingAmount()).setScale(2, BigDecimal.ROUND_DOWN)); |
| | | accountListVO.setPaymentAmount(res.getPaymentAmount().setScale(2, BigDecimal.ROUND_DOWN)); |
| | | accountListVO.setRefundAmount(res.getRefundAmount().setScale(2, BigDecimal.ROUND_DOWN)); |
| | | accountListVO.setCommissionAmount(res.getCommissionAmount().setScale(2, BigDecimal.ROUND_DOWN)); |
| | | accountListVO.setSharingAmount(res.getSharingAmount().setScale(2, BigDecimal.ROUND_DOWN)); |
| | | accountListVO.setList(res.getList()); |
| | | accountListVO.setOrderList(res.getExportList()); |
| | | return R.ok(accountListVO); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/chargeBill"}, logical = Logical.OR) |
| | | @PostMapping(value = "/chargingBillList") |
| | |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | @PutMapping(value = "/export1") |
| | | public R<List<TEnterpriseUserApplication>> export1() { |
| | | |
| | | |
| | | List<TEnterpriseUserApplication> list = enterpriseUserApplicationService.lambdaQuery().list(); |
| | | |
| | | return R.ok(list); |
| | | // Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TEnterpriseExport.class, orderInvoiceExports); |
| | | // HttpServletResponse response = WebUtils.response(); |
| | | // response.setCharacterEncoding("utf-8"); |
| | | // ServletOutputStream outputStream = null; |
| | | // try { |
| | | // String fileName = URLEncoder.encode("公司导出.xls", "utf-8"); |
| | | // response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | // response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | // response.setHeader("Pragma", "no-cache"); |
| | | // response.setHeader("Cache-Control", "no-cache"); |
| | | // outputStream = response.getOutputStream(); |
| | | // workbook.write(outputStream); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // } finally { |
| | | // try { |
| | | // workbook.close(); |
| | | // outputStream.close(); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | |
| | | |