init
This commit is contained in:
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequestMapping("/api/anchor")
|
||||
@Tag(name = "主播相关接口")
|
||||
public class CaiAnchorAppController {
|
||||
public class AnchorAppController {
|
||||
|
||||
@Autowired
|
||||
private CurrentUserManager currentUserManager;
|
||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
@RequestMapping("/api/auth")
|
||||
@SaIgnore
|
||||
@Tag(name = "权限相关接口,免鉴权")
|
||||
public class CaiAuthAppController {
|
||||
public class AuthAppController {
|
||||
|
||||
@Autowired
|
||||
private CaiLoginManager caiLoginManager;
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("/api/consume")
|
||||
@Tag(name = "消费相关的接口")
|
||||
public class CaiConsumeController {
|
||||
public class ConsumeController {
|
||||
|
||||
@Autowired
|
||||
private CaiGuardTotalService guardTotalService;
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/api/index")
|
||||
@Tag(name = "首页展示相关接口")
|
||||
public class CaiIndexController {
|
||||
public class IndexController {
|
||||
|
||||
@Autowired
|
||||
private CaiAnchorService anchorService;
|
||||
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("/api/other")
|
||||
@Tag(name = "其他接口")
|
||||
public class CaiOtherController {
|
||||
public class OtherController {
|
||||
|
||||
@Autowired
|
||||
private CaiReportService reportService;
|
||||
@@ -19,7 +19,7 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequestMapping("/api/setting")
|
||||
@Tag(name = "获取设置相关接口")
|
||||
public class CaiSettingAppController {
|
||||
public class SettingAppController {
|
||||
|
||||
@Autowired
|
||||
private CaiGoodsService goodsService;
|
||||
@@ -2,7 +2,6 @@ package com.ruoyi.cai.controller.app;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.domain.CaiAccountBankcard;
|
||||
import com.ruoyi.cai.domain.CaiAccountCash;
|
||||
import com.ruoyi.cai.domain.CaiAccountRecharge;
|
||||
import com.ruoyi.cai.dto.app.query.*;
|
||||
@@ -28,7 +27,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/api/user")
|
||||
@Tag(name = "用户相关接口")
|
||||
public class CaiUserAppController {
|
||||
public class UserAppController {
|
||||
@Autowired
|
||||
private CurrentUserManager currentUserManager;
|
||||
@Autowired
|
||||
@@ -38,28 +37,6 @@ public class CaiUserAppController {
|
||||
@Autowired
|
||||
private CaiUserAlbumService userAlbumService;
|
||||
|
||||
@GetMapping("/aliInfo")
|
||||
@Operation(summary = "获取绑定支付宝信息")
|
||||
public R<CaiAccountBankcard> aliInfo(){
|
||||
CaiAccountBankcard accountBankcard = currentUserManager.aliInfo();
|
||||
return R.ok(accountBankcard);
|
||||
}
|
||||
|
||||
@PostMapping("/save-or-update/ali")
|
||||
@Operation(summary = "支付宝信息的新增和修改")
|
||||
public R<Boolean> updateAli(@RequestBody AccountAliBankCardRes res){
|
||||
currentUserManager.saveOrUpdateAliInfo(res);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@PostMapping("/withdraw/ali")
|
||||
@Operation(summary = "支付宝提现接口")
|
||||
public R<Boolean> withdraw(@RequestBody WithdrawReq res){
|
||||
res.setUserId(LoginHelper.getUserId());
|
||||
accountCashService.withdraw(res);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@GetMapping("/info")
|
||||
@Operation(summary = "当前用户信息")
|
||||
public R<CurrentUserInfoVo> currentInfo(){
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequestMapping("/api/dynamic")
|
||||
@Tag(name = "广场动态相关接口")
|
||||
public class CaiUserDynamicAppController {
|
||||
public class UserDynamicAppController {
|
||||
|
||||
@Autowired
|
||||
private CaiDynamicService dynamicService;
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequestMapping("/api/user/star")
|
||||
@Tag(name = "关注相关接口")
|
||||
public class CaiUserStartAppController {
|
||||
public class UserStartAppController {
|
||||
|
||||
@Autowired
|
||||
private CaiUserFollowService userFollowService;
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RequestMapping("/api/user/visitor")
|
||||
@Slf4j
|
||||
@Tag(name = "访问记录相关接口")
|
||||
public class CaiUserVisitorAppController {
|
||||
public class UserVisitorAppController {
|
||||
|
||||
@Autowired
|
||||
private CaiUserVisitorService userVisitorService;
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.ruoyi.cai.controller.app;
|
||||
|
||||
import com.ruoyi.cai.domain.CaiAccountBankcard;
|
||||
import com.ruoyi.cai.dto.app.query.AccountAliBankCardRes;
|
||||
import com.ruoyi.cai.dto.app.query.WithdrawReq;
|
||||
import com.ruoyi.cai.manager.CurrentUserManager;
|
||||
import com.ruoyi.cai.service.CaiAccountCashService;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/wallet")
|
||||
@Tag(name = "钱包操作相关的接口")
|
||||
public class WalletController {
|
||||
|
||||
@Autowired
|
||||
private CurrentUserManager currentUserManager;
|
||||
@Autowired
|
||||
private CaiAccountCashService accountCashService;
|
||||
|
||||
@GetMapping("/aliInfo")
|
||||
@Operation(summary = "获取绑定支付宝信息")
|
||||
public R<CaiAccountBankcard> aliInfo(){
|
||||
CaiAccountBankcard accountBankcard = currentUserManager.aliInfo();
|
||||
return R.ok(accountBankcard);
|
||||
}
|
||||
|
||||
@PostMapping("/save-or-update/ali")
|
||||
@Operation(summary = "支付宝信息的新增和修改")
|
||||
public R<Boolean> updateAli(@RequestBody AccountAliBankCardRes res){
|
||||
currentUserManager.saveOrUpdateAliInfo(res);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@PostMapping("/withdraw/ali")
|
||||
@Operation(summary = "支付宝提现接口")
|
||||
public R<Boolean> withdraw(@RequestBody WithdrawReq res){
|
||||
res.setUserId(LoginHelper.getUserId());
|
||||
accountCashService.withdraw(res);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user