| | |
| | | */ |
| | | @PostMapping("/register") |
| | | @ApiOperation(value = "注册",tags = "app用户端") |
| | | public R<Void> register(@RequestBody @Valid RegisterDTO registerDTO) { |
| | | appUserService.register(registerDTO); |
| | | return R.ok(); |
| | | public R<LoginVO> register(@RequestBody @Valid RegisterDTO registerDTO) { |
| | | |
| | | return R.ok( appUserService.register(registerDTO)); |
| | | } |
| | | /** |
| | | * 根据小区id(可选择) |
| | |
| | | */ |
| | | @GetMapping("/getOrderPage") |
| | | @ApiOperation(value = "获取相关信息",tags = "app用户端-下单页面") |
| | | public R<OrderPageVO> getOrderPage(@RequestParam(value = "communityId",required = false) Integer communityId) { |
| | | return R.ok(appUserService.getOrderPage(communityId)); |
| | | public R<OrderPageVO> getOrderPage(@RequestParam(value = "communityId",required = false) Integer communityId , |
| | | @RequestParam(value = "regionExtend",required = false) String regionExtend) { |
| | | return R.ok(appUserService.getOrderPage(communityId,regionExtend)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 修改姓名 |
| | | */ |
| | | @PutMapping("/setName") |
| | | @ApiOperation(value = "修改姓名",tags = "app用户端-个人信息") |
| | | public R<Void> setName(@RequestParam String name) { |
| | | appUserService.setName(name); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 修改头像 |
| | | */ |
| | | @PutMapping("/setAvatar") |
| | | @ApiOperation(value = "修改头像",tags = "app用户端-个人信息") |
| | | public R<Void> setAvatar(@RequestParam String avatar) { |
| | | appUserService.setAvatar(avatar); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 修改生日 |
| | | */ |
| | | @PutMapping("/setBirthDay") |
| | |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation(value = "注销账号",tags = "app用户端-个人信息") |
| | | public R<Void> delete() { |
| | | appUserService.delete(); |
| | | public R<Void> delete(@RequestHeader("Authorization") String token) { |
| | | appUserService.delete(token); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @GetMapping("/detail") |
| | | @PreAuthorize("@ss.hasPermi('system:appuser:list')") |
| | | @ApiOperation(value = "用户管理-用户详情", tags = "系统后台-用户管理") |
| | | public R<AppUserSysDetailVO> detail(@RequestParam("id") Integer id) { |
| | | public R<AppUserSysDetailVO> detail(@RequestParam("id") String id) { |
| | | return R.ok(appUserService.detail(id)); |
| | | } |
| | | /** |
| | |
| | | @PutMapping("/froze") |
| | | @PreAuthorize("@ss.hasPermi('system:appuser:list')") |
| | | @ApiOperation(value = "用户管理-冻结/解冻", tags = "系统后台-用户管理") |
| | | public R froze(@RequestParam("id") Integer id) { |
| | | public R froze(@RequestParam("id") String id) { |
| | | appUserService.froze(id); |
| | | return R.ok(); |
| | | } |
| | |
| | | @GetMapping("/refund") |
| | | @PreAuthorize("@ss.hasPermi('system:appuser:list')") |
| | | @ApiOperation(value = "用户管理-会员退费", tags = "系统后台-用户管理") |
| | | public R<Void> refund(@RequestParam("id") Integer id) { |
| | | public R<Void> refund(@RequestParam("id") String id) { |
| | | appUserService.refund(id); |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 订单取消支付回退 |
| | | * |
| | | * @param refundCallbackResult |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping("/refundPayMoneyCallback") |
| | | public void refundPayMoneyCallback(RefundCallbackResult refundCallbackResult, HttpServletResponse response) { |
| | | R callback = appUserService.refundPayMoneyCallback(refundCallbackResult); |
| | | @PostMapping("/refundPayMoneyCallback") |
| | | public String refundPayMoneyCallback(@RequestBody(required = false) String xmlData) { |
| | | System.out.println("会员退费:" + xmlData); |
| | | R callback = appUserService.refundPayMoneyCallback(xmlData); |
| | | if (callback.getCode() == 200) { |
| | | response.setStatus(200); |
| | | PrintWriter out = null; |
| | | try { |
| | | out = response.getWriter(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | out.println("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | return "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>"; |
| | | }else { |
| | | System.err.println("支付回退错误:"+callback.getMsg()); |
| | | return "<xml><return_code><![CDATA[FAIL]]></return_code></xml>"; |
| | | } |
| | | } |
| | | |