|
|
@@ -2,6 +2,7 @@ package com.kym.miniapp.controller;
|
|
|
|
|
|
import com.kym.common.R;
|
|
|
import com.kym.entity.admin.queryParams.CommonQueryParam;
|
|
|
+import com.kym.service.miniapp.AccountService;
|
|
|
import com.kym.service.miniapp.RefundLogService;
|
|
|
import com.kym.service.miniapp.WalletDetailService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -18,11 +19,14 @@ import org.springframework.web.bind.annotation.*;
|
|
|
@RequestMapping("/account/")
|
|
|
public class AccountController {
|
|
|
|
|
|
+ private final AccountService accountService;
|
|
|
+
|
|
|
private final WalletDetailService walletDetailService;
|
|
|
|
|
|
private final RefundLogService refundLogService;
|
|
|
|
|
|
- public AccountController(WalletDetailService walletDetailService, RefundLogService refundLogService) {
|
|
|
+ public AccountController(AccountService accountService, WalletDetailService walletDetailService, RefundLogService refundLogService) {
|
|
|
+ this.accountService = accountService;
|
|
|
this.walletDetailService = walletDetailService;
|
|
|
this.refundLogService = refundLogService;
|
|
|
}
|
|
|
@@ -43,4 +47,15 @@ public class AccountController {
|
|
|
return R.success(refundLogService.listRefundLogForApp(params));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取当前用户有效的权益和优惠券
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/listRightsAndCoupons")
|
|
|
+ public R<?> listRightsAndCoupons() {
|
|
|
+ return R.success(accountService.listRightsAndCoupons());
|
|
|
+ }
|
|
|
+
|
|
|
}
|