直播
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<ijapy.version>2.9.10</ijapy.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -34,5 +35,16 @@
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-yunxin</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.javen205</groupId>
|
||||
<artifactId>IJPay-WxPay</artifactId>
|
||||
<version>${ijapy.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.javen205</groupId>
|
||||
<artifactId>IJPay-AliPay</artifactId>
|
||||
<version>${ijapy.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -97,7 +97,7 @@ public class CaiLoginManager {
|
||||
|
||||
public String register(CaiRegisterUser caiUser) {
|
||||
User user = userService.getByUsername(caiUser.getUsername());
|
||||
if(user == null){
|
||||
if(user != null){
|
||||
throw new ServiceException("手机号已存在");
|
||||
}
|
||||
if(!caiUser.getPassword().equals(caiUser.getPasswordCheck())){
|
||||
|
||||
@@ -34,6 +34,7 @@ public class AgreementSettingAppController extends BaseController {
|
||||
|
||||
@GetMapping("/userAgreement")
|
||||
@Operation(summary = "获取用户协议")
|
||||
@Log(title = "获取用户协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<AgreementDTO> userAgreement() {
|
||||
String userAgreement = agreementSettingService.getAgreementSetting().getUserAgreement();
|
||||
return R.ok(new AgreementDTO(userAgreement));
|
||||
@@ -41,6 +42,7 @@ public class AgreementSettingAppController extends BaseController {
|
||||
|
||||
@GetMapping("/anchorJoinAgreement")
|
||||
@Operation(summary = "用户主播入驻协议")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<AgreementDTO> anchorJoinAgreement() {
|
||||
String anchorJoinAgreement = agreementSettingService.getAgreementSetting().getAnchorJoinAgreement();
|
||||
return R.ok(new AgreementDTO(anchorJoinAgreement));
|
||||
|
||||
@@ -10,7 +10,9 @@ import com.ruoyi.cai.service.AnchorApplyService;
|
||||
import com.ruoyi.cai.service.AnchorService;
|
||||
import com.ruoyi.cai.service.UserCameraAuditService;
|
||||
import com.ruoyi.cai.service.UserService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -36,6 +38,7 @@ public class AnchorAppController {
|
||||
|
||||
@GetMapping("/info")
|
||||
@Operation(summary = "当前用户的主播信息")
|
||||
@Log(title = "当前用户的主播信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<AnchorVo> anchorInfo(){
|
||||
return R.ok(currentUserManager.anchorInfo());
|
||||
}
|
||||
@@ -43,12 +46,14 @@ public class AnchorAppController {
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "修改当前用户的主播信息")
|
||||
@Log(title = "修改当前用户的主播信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> anchorUpdate(@RequestBody AnchorUpdateReq anchorUpdate){
|
||||
return R.ok(currentUserManager.anchorUpdate(anchorUpdate));
|
||||
}
|
||||
|
||||
@GetMapping("/cameraAudit")
|
||||
@Operation(summary = "主播自拍认证")
|
||||
@Log(title = "主播自拍认证", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<CameraAuditVo> cameraAudit(){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
return R.ok(userCameraAuditService.cameraAudit(userId));
|
||||
@@ -56,6 +61,7 @@ public class AnchorAppController {
|
||||
|
||||
@PostMapping("/uploadCameraAudit")
|
||||
@Operation(summary = "上传自拍认证")
|
||||
@Log(title = "上传自拍认证", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> uploadCameraAudit(@RequestBody CameraAuditVo vo){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
vo.setUserId(userId);
|
||||
@@ -64,6 +70,7 @@ public class AnchorAppController {
|
||||
|
||||
@Operation(summary = "同意主播服务协议")
|
||||
@PostMapping("/agreeProtocol")
|
||||
@Log(title = "同意主播服务协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> agreeProtocol(){
|
||||
boolean b = userService.agreeProtocol(LoginHelper.getUserId());
|
||||
return R.ok(b);
|
||||
@@ -71,6 +78,7 @@ public class AnchorAppController {
|
||||
|
||||
@Operation(summary = "加入主播页面")
|
||||
@GetMapping("/joinHome")
|
||||
@Log(title = "加入主播页面", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<AnchorJoinHomeVo> joinHome(){
|
||||
AnchorJoinHomeVo vo = anchorApplyService.joinHome(LoginHelper.getUserId());
|
||||
return R.ok(vo);
|
||||
@@ -78,6 +86,7 @@ public class AnchorAppController {
|
||||
|
||||
@Operation(summary = "申请加入主播")
|
||||
@GetMapping("/joinAnchor")
|
||||
@Log(title = "申请加入主播", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> joinAnchor(){
|
||||
return R.ok(anchorApplyService.joinAnchor(LoginHelper.getUserId()));
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ import com.ruoyi.cai.domain.User;
|
||||
import com.ruoyi.cai.enums.CodeEnum;
|
||||
import com.ruoyi.cai.service.SmsVerifyService;
|
||||
import com.ruoyi.cai.service.UserService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -37,6 +39,7 @@ public class AuthAppController {
|
||||
|
||||
@PostMapping("/register")
|
||||
@Operation(summary = "注册")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Map<String, Object>> register(@Validated @RequestBody CaiRegisterUser caiUser){
|
||||
boolean mobile = PhoneUtil.isMobile(caiUser.getUsername());
|
||||
if(!mobile){
|
||||
@@ -50,6 +53,7 @@ public class AuthAppController {
|
||||
|
||||
@PostMapping("/register/code")
|
||||
@Operation(summary = "获取注册验证码")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Map<String,String>> registerCode(@Validated @RequestBody RegisterCode code){
|
||||
boolean mobile = PhoneUtil.isMobile(code.getMobile());
|
||||
if(!mobile){
|
||||
@@ -61,6 +65,7 @@ public class AuthAppController {
|
||||
|
||||
@PostMapping("/resetPassword/code")
|
||||
@Operation(summary = "获取重置密码验证码")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Map<String,String>> resetPasswordCode(@Validated @RequestBody RegisterCode code){
|
||||
boolean mobile = PhoneUtil.isMobile(code.getMobile());
|
||||
if(!mobile){
|
||||
@@ -76,6 +81,7 @@ public class AuthAppController {
|
||||
|
||||
@PostMapping("/login")
|
||||
@Operation(summary = "登陆")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Map<String,Object>> login(@Validated @RequestBody LoginCaiUser loginBody){
|
||||
Map<String, Object> ajax = new HashMap<>();
|
||||
String token = caiLoginManager.login(loginBody.getUsername(), loginBody.getPassword());
|
||||
@@ -85,6 +91,7 @@ public class AuthAppController {
|
||||
|
||||
@PostMapping("/resetPassword")
|
||||
@Operation(summary = "重置密码")
|
||||
@Log(title = "用户主播入驻协议", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> resetPassword(@RequestBody ResetPasswordReq code){
|
||||
caiLoginManager.resetPassword(code);
|
||||
return R.ok(true);
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.ruoyi.cai.dto.ConsumeResp;
|
||||
import com.ruoyi.cai.dto.app.query.GiveGiftRes;
|
||||
import com.ruoyi.cai.dto.app.query.GiveGuardReq;
|
||||
import com.ruoyi.cai.manager.ConsumerManager;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -23,6 +25,7 @@ public class ConsumeController {
|
||||
|
||||
@PostMapping("/give/guard")
|
||||
@Operation(summary = "赠送主播守护")
|
||||
@Log(title = "赠送主播守护", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> giveGuard(@RequestBody GiveGuardReq query){
|
||||
ConsumeResp resp = consumerManager.sendGuard(query);
|
||||
return R.ok(resp.isSuccess());
|
||||
@@ -30,6 +33,7 @@ public class ConsumeController {
|
||||
|
||||
@PostMapping("/give/gift")
|
||||
@Operation(summary = "赠送主播礼物")
|
||||
@Log(title = "赠送主播礼物", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> giveGift(@RequestBody GiveGiftRes query){
|
||||
ConsumeResp resp = consumerManager.sendGift(query);
|
||||
return R.ok(resp.isSuccess());
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.ruoyi.cai.controller.app;
|
||||
import com.ruoyi.cai.dto.app.dto.ImMessageDTO;
|
||||
import com.ruoyi.cai.dto.app.vo.ImResp;
|
||||
import com.ruoyi.cai.manager.ImService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -24,6 +26,7 @@ public class ImAppController {
|
||||
|
||||
@PostMapping("/send/message")
|
||||
@Operation(summary = "发送消息")
|
||||
@Log(title = "发送消息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<ImResp> sendMessage(@Validated @RequestBody ImMessageDTO imMessageDTO){
|
||||
ImResp resp = imService.sendMessage(LoginHelper.getUserId(), imMessageDTO);
|
||||
return R.ok(resp);
|
||||
|
||||
@@ -12,9 +12,11 @@ import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||
import com.ruoyi.cai.dto.app.vo.index.GuardListPageVo;
|
||||
import com.ruoyi.cai.dto.app.vo.index.UserGiftIndexVo;
|
||||
import com.ruoyi.cai.service.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -44,6 +46,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/banner")
|
||||
@Operation(summary = "获取首页banner图")
|
||||
@Log(title = "获取首页banner图", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<IndexBannerVo>> banner(){
|
||||
List<Banner> res = bannerService.index();
|
||||
return R.ok(BeanConvertUtil.convertListTo(res, IndexBannerVo::new));
|
||||
@@ -51,6 +54,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/anchor/page")
|
||||
@Operation(summary = "首页查询主播接口-分页")
|
||||
@Log(title = "首页查询主播接口", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<AnchorListVo> page(PageQuery page, AnchorListQuery query){
|
||||
Page<AnchorListVo> res = anchorService.pageApp(page,query);
|
||||
return TableDataInfo.build(res);
|
||||
@@ -58,6 +62,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/user/page")
|
||||
@Operation(summary = "首页用户搜索接口-分页")
|
||||
@Log(title = "首页用户搜索接口-分页", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserListVo> page(PageQuery page, UserQuery query){
|
||||
Page<UserListVo> res = userService.pageApp(page,query);
|
||||
return TableDataInfo.build(res);
|
||||
@@ -65,6 +70,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/user/greet/page")
|
||||
@Operation(summary = "群打招呼界面-用户搜索接口")
|
||||
@Log(title = "群打招呼界面-用户搜索接口", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserListVo> greetQuery(PageQuery page, GreetQuery query){
|
||||
Page<UserListVo> res = userService.greetPageApp(page,query);
|
||||
return TableDataInfo.build(res);
|
||||
@@ -72,6 +78,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/home/info")
|
||||
@Operation(summary = "获取指定用户主页信息")
|
||||
@Log(title = "获取指定用户主页信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<UserInfoVo> info(Long userId){
|
||||
UserInfoVo res = userService.info(userId);
|
||||
return R.ok(res);
|
||||
@@ -80,6 +87,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/userGuard/page")
|
||||
@Operation(summary = "获取指定女神守护排行")
|
||||
@Log(title = "获取指定女神守护排行", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<GuardListPageVo> userGuardPage(PageQuery pageQuery,Long userId){
|
||||
Page<GuardListPageVo> page = guardTotalService.userGuardPage(pageQuery, userId);
|
||||
return TableDataInfo.build(page);
|
||||
@@ -87,6 +95,7 @@ public class IndexController {
|
||||
|
||||
@GetMapping("/userGift/list")
|
||||
@Operation(summary = "获取指定女神收到的礼物列表")
|
||||
@Log(title = "获取指定女神收到的礼物列表", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<UserGiftIndexVo>> userGiftList(Long userId){
|
||||
List<UserGiftIndexVo> res = userGiftService.selectGiftList(userId);
|
||||
return R.ok(res);
|
||||
|
||||
@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.dto.app.vo.invite.InviteHomeVo;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||
import com.ruoyi.cai.service.UserInviteService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -25,6 +27,7 @@ public class InviteAppController {
|
||||
|
||||
@GetMapping("/home")
|
||||
@Operation(summary = "邀请有奖页面")
|
||||
@Log(title = "邀请有奖页面", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<InviteHomeVo> inviteHome(){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
InviteHomeVo inviteHome = userInviteService.inviteHome(userId);
|
||||
@@ -33,6 +36,7 @@ public class InviteAppController {
|
||||
|
||||
@GetMapping("/user/page")
|
||||
@Operation(summary = "我邀请的人")
|
||||
@Log(title = "我邀请的人", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserListVo> inviteUserPage(PageQuery pageQuery){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
Page<UserListVo> userPage = userInviteService.inviteUserPage(pageQuery,userId);
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.ruoyi.cai.controller.app;
|
||||
|
||||
import com.ruoyi.cai.dto.app.query.UserReportReq;
|
||||
import com.ruoyi.cai.service.ReportService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -22,6 +24,7 @@ public class OtherController {
|
||||
|
||||
@PostMapping("/report")
|
||||
@Operation(summary = "举报")
|
||||
@Log(title = "举报", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> report(@RequestBody UserReportReq reportRes){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
reportRes.setUserId(userId);
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.ruoyi.cai.chat.ChatManager;
|
||||
import com.ruoyi.cai.dto.app.query.CallReq;
|
||||
import com.ruoyi.cai.dto.app.vo.chat.CallResp;
|
||||
import com.ruoyi.cai.dto.app.vo.chat.GetRoomResp;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,6 +26,7 @@ public class RoomController {
|
||||
|
||||
@PostMapping("/call")
|
||||
@Operation(summary = "发起直播")
|
||||
@Log(title = "发起直播", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<CallResp> call(@RequestBody CallReq req){
|
||||
CallResp call = chatManager.call(req);
|
||||
return R.ok(call);
|
||||
@@ -31,6 +34,7 @@ public class RoomController {
|
||||
|
||||
@GetMapping("/getRoom")
|
||||
@Operation(summary = "获取房间信息")
|
||||
@Log(title = "获取房间信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<GetRoomResp> getRoom(@NotEmpty(message = "房间不存在") String roomId){
|
||||
GetRoomResp room = chatManager.getRoom(roomId);
|
||||
return R.ok(room);
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.cai.domain.*;
|
||||
import com.ruoyi.cai.dto.app.vo.GiftVo;
|
||||
import com.ruoyi.cai.service.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -32,6 +34,7 @@ public class SettingAppController {
|
||||
|
||||
@GetMapping("/goods")
|
||||
@Operation(summary = "充值配置")
|
||||
@Log(title = "充值配置", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<Goods>> goods(){
|
||||
List<Goods> list = goodsService.list(Wrappers.lambdaQuery(Goods.class)
|
||||
.eq(Goods::getStatus,0)
|
||||
@@ -41,6 +44,7 @@ public class SettingAppController {
|
||||
|
||||
@GetMapping("/withdraw")
|
||||
@Operation(summary = "提现配置")
|
||||
@Log(title = "提现配置", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<WithdrawExchange>> withdraw(){
|
||||
List<WithdrawExchange> list = withdrawExchangeService.list(Wrappers.lambdaQuery(WithdrawExchange.class)
|
||||
.orderByAsc(WithdrawExchange::getMoney));
|
||||
@@ -49,6 +53,7 @@ public class SettingAppController {
|
||||
|
||||
@GetMapping("/report")
|
||||
@Operation(summary = "举报分类配置")
|
||||
@Log(title = "举报分类配置", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<ReportCate>> report(){
|
||||
List<ReportCate> list = reportCateService.list(Wrappers.lambdaQuery(ReportCate.class));
|
||||
return R.ok(list);
|
||||
@@ -57,6 +62,7 @@ public class SettingAppController {
|
||||
|
||||
@GetMapping("/gift")
|
||||
@Operation(summary = "礼物配置")
|
||||
@Log(title = "礼物配置", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<GiftVo>> gift(){
|
||||
List<Gift> res = giftService.all();
|
||||
return R.ok(BeanConvertUtil.convertListTo(res, GiftVo::new));
|
||||
|
||||
@@ -9,7 +9,9 @@ import com.ruoyi.cai.dto.app.vo.user.MemberInfoVo;
|
||||
import com.ruoyi.cai.manager.CurrentUserManager;
|
||||
import com.ruoyi.cai.service.UserAlbumService;
|
||||
import com.ruoyi.cai.service.UserMemberService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -33,12 +35,14 @@ public class UserAppController {
|
||||
|
||||
@GetMapping("/info")
|
||||
@Operation(summary = "当前用户信息")
|
||||
@Log(title = "当前用户信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<CurrentUserInfoVo> currentInfo(){
|
||||
return R.ok(currentUserManager.currentInfo());
|
||||
}
|
||||
|
||||
@GetMapping("/member")
|
||||
@Operation(summary = "当前用户信息")
|
||||
@Operation(summary = "当前会员信息")
|
||||
@Log(title = "当前会员信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<MemberInfoVo> member(@Parameter(description = "类型 0-普通会员 1-超级会员") Integer type){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
if(type == null){
|
||||
@@ -52,18 +56,21 @@ public class UserAppController {
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "修改当前用户信息")
|
||||
@Log(title = "修改当前用户信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> userUpdate(@Validated @RequestBody UserUpdateReq res){
|
||||
return R.ok(currentUserManager.userUpdate(res));
|
||||
}
|
||||
|
||||
@PostMapping("/album/del")
|
||||
@Operation(summary = "删除相册")
|
||||
@Log(title = "删除相册", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> userAlbumDel(@RequestBody IdRes res){
|
||||
return R.ok(userAlbumService.removeAlbum(res.getId()));
|
||||
}
|
||||
|
||||
@PostMapping("/album/add")
|
||||
@Operation(summary = "新增相册")
|
||||
@Log(title = "新增相册", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> userAlbumAdd(@RequestBody AlbumAddReq res){
|
||||
res.setUserId(LoginHelper.getUserId());
|
||||
return R.ok(userAlbumService.addAlbum(res));
|
||||
@@ -71,6 +78,7 @@ public class UserAppController {
|
||||
|
||||
@PostMapping("/album/reset")
|
||||
@Operation(summary = "重排序相册",hidden = true)
|
||||
@Log(title = "重排序相册", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> userAlbumAdd(@RequestBody List<AlbumResetReq> res){
|
||||
return R.ok(userAlbumService.resetAlbum(res,LoginHelper.getUserId()));
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.dto.app.query.BlackQuery;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||
import com.ruoyi.cai.service.UserBlacklistService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -23,6 +25,7 @@ public class UserBlackAppController {
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "用户黑名单查询")
|
||||
@Log(title = "用户黑名单查询", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserListVo> page(PageQuery pageQuery){
|
||||
Page<UserListVo> page = userBlacklistService.pageApp(pageQuery, LoginHelper.getUserId());
|
||||
return TableDataInfo.build(page);
|
||||
@@ -30,6 +33,7 @@ public class UserBlackAppController {
|
||||
|
||||
@PostMapping("black")
|
||||
@Operation(summary = "拉黑操作")
|
||||
@Log(title = "拉黑操作", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> black(@RequestBody BlackQuery query){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
boolean b = userBlacklistService.black(userId,query.getBlackUserId(),query.getActionType());
|
||||
|
||||
@@ -7,9 +7,11 @@ import com.ruoyi.cai.dto.app.query.DynamicStarReq;
|
||||
import com.ruoyi.cai.dto.app.vo.DynamicListVo;
|
||||
import com.ruoyi.cai.service.DynamicService;
|
||||
import com.ruoyi.cai.service.UserFollowDynamicService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -28,6 +30,7 @@ public class UserDynamicAppController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "动态查询动态")
|
||||
@Log(title = "动态查询动态", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<DynamicListVo> page(PageQuery pageQuery, DynamicQuery query){
|
||||
Page<DynamicListVo> resp = dynamicService.pageApp(pageQuery,query);
|
||||
return TableDataInfo.build(resp);
|
||||
@@ -35,6 +38,7 @@ public class UserDynamicAppController {
|
||||
|
||||
@PostMapping("/star")
|
||||
@Operation(summary = "关注动态")
|
||||
@Log(title = "关注动态", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> star(@RequestBody DynamicStarReq query){
|
||||
query.setUserId(LoginHelper.getUserId());
|
||||
userFollowDynamicService.star(query);
|
||||
@@ -43,6 +47,7 @@ public class UserDynamicAppController {
|
||||
|
||||
@PostMapping("/unstar")
|
||||
@Operation(summary = "取消关注动态")
|
||||
@Log(title = "取消关注动态", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> unStar(@RequestBody DynamicStarReq query){
|
||||
query.setUserId(LoginHelper.getUserId());
|
||||
userFollowDynamicService.unStar(query);
|
||||
@@ -51,6 +56,7 @@ public class UserDynamicAppController {
|
||||
|
||||
@PostMapping("/push")
|
||||
@Operation(summary = "发布动态")
|
||||
@Log(title = "发布动态", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> push(@RequestBody DynamicAddReq res){
|
||||
res.setUserId(LoginHelper.getUserId());
|
||||
dynamicService.saveDynamic(res);
|
||||
|
||||
@@ -7,7 +7,9 @@ import com.ruoyi.cai.dto.app.query.user.UserGreetAddReq;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserGreetVo;
|
||||
import com.ruoyi.cai.service.UserGreetService;
|
||||
import com.ruoyi.cai.service.UserService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -30,6 +32,7 @@ public class UserGreetAppController {
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获取当前用户打招呼列表")
|
||||
@Log(title = "获取当前用户打招呼列表", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<UserGreetVo>> list(){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
User user = userService.getById(userId);
|
||||
@@ -42,6 +45,7 @@ public class UserGreetAppController {
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "新增群打招呼")
|
||||
@Log(title = "新增群打招呼", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> add(@Validated @RequestBody UserGreetAddReq req){
|
||||
req.setUserId(LoginHelper.getUserId());
|
||||
userGreetService.addUserGreet(req);
|
||||
@@ -51,6 +55,7 @@ public class UserGreetAppController {
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除群打招呼")
|
||||
@Log(title = "删除群打招呼", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> add(@RequestBody IdRes req){
|
||||
userGreetService.removeById(req.getId());
|
||||
return R.ok();
|
||||
@@ -58,6 +63,7 @@ public class UserGreetAppController {
|
||||
|
||||
@PostMapping("/send")
|
||||
@Operation(summary = "群打招呼")
|
||||
@Log(title = "群打招呼", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Void> send(@RequestBody IdRes req){
|
||||
userGreetService.batchSend(req.getId(),LoginHelper.getUserId());
|
||||
return R.ok();
|
||||
|
||||
@@ -5,9 +5,11 @@ import com.ruoyi.cai.dto.app.query.StarOrVisitorReq;
|
||||
import com.ruoyi.cai.dto.app.query.StarQuery;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserStarOrVisitorList;
|
||||
import com.ruoyi.cai.service.UserFollowService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -23,6 +25,7 @@ public class UserStartAppController {
|
||||
|
||||
@PostMapping("/star")
|
||||
@Operation(summary = "关注用户")
|
||||
@Log(title = "关注用户", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> star(@RequestBody StarOrVisitorReq starOrVisitorReq){
|
||||
boolean bool = userFollowService.star(starOrVisitorReq);
|
||||
return R.ok(bool);
|
||||
@@ -30,6 +33,7 @@ public class UserStartAppController {
|
||||
|
||||
@PostMapping("/unstar")
|
||||
@Operation(summary = "取消关注用户")
|
||||
@Log(title = "取消关注用户", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> unStar(@RequestBody StarOrVisitorReq starOrVisitorReq){
|
||||
boolean bool = userFollowService.unStar(starOrVisitorReq);
|
||||
return R.ok(bool);
|
||||
@@ -37,6 +41,7 @@ public class UserStartAppController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "关注、粉丝列表查询")
|
||||
@Log(title = "粉丝列表查询", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserStarOrVisitorList> page(StarQuery query, PageQuery pageQuery){
|
||||
Page<UserStarOrVisitorList> res = userFollowService.pageApp(pageQuery,query);
|
||||
return TableDataInfo.build(res);
|
||||
|
||||
@@ -5,9 +5,11 @@ import com.ruoyi.cai.dto.app.query.StarOrVisitorReq;
|
||||
import com.ruoyi.cai.dto.app.query.VisitorQuery;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserStarOrVisitorList;
|
||||
import com.ruoyi.cai.service.UserVisitorService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -26,6 +28,7 @@ public class UserVisitorAppController {
|
||||
// 除网络问题不返回异常。避免影响业务
|
||||
@PostMapping("/visitor")
|
||||
@Operation(summary = "新增浏览记录")
|
||||
@Log(title = "新增浏览记录", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> visitor(@RequestBody StarOrVisitorReq starOrVisitorReq){
|
||||
try {
|
||||
boolean bool = userVisitorService.visitor(starOrVisitorReq);
|
||||
@@ -37,6 +40,7 @@ public class UserVisitorAppController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "我的浏览记录、访客查询-分页")
|
||||
@Log(title = "我的浏览记录、访客查询-分页", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<UserStarOrVisitorList> page(VisitorQuery query, PageQuery pageQuery){
|
||||
Page<UserStarOrVisitorList> res = userVisitorService.pageApp(pageQuery,query);
|
||||
return TableDataInfo.build(res);
|
||||
|
||||
@@ -14,9 +14,11 @@ import com.ruoyi.cai.manager.CurrentUserManager;
|
||||
import com.ruoyi.cai.pay.PayStatusEnum;
|
||||
import com.ruoyi.cai.service.AccountCashService;
|
||||
import com.ruoyi.cai.service.RechargeOrderService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -37,12 +39,14 @@ public class WalletController {
|
||||
|
||||
@GetMapping("/account")
|
||||
@Operation(summary = "快速获取当前用户账号余额信息")
|
||||
@Log(title = "快速获取当前用户账号余额信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<UserAccountVo> currentAccount(){
|
||||
return R.ok(currentUserManager.currentAccount());
|
||||
}
|
||||
|
||||
@GetMapping("/aliInfo")
|
||||
@Operation(summary = "获取绑定支付宝信息")
|
||||
@Log(title = "获取绑定支付宝信息", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<AccountBankcard> aliInfo(){
|
||||
AccountBankcard accountBankcard = currentUserManager.aliInfo();
|
||||
return R.ok(accountBankcard);
|
||||
@@ -50,6 +54,7 @@ public class WalletController {
|
||||
|
||||
@PostMapping("/save-or-update/ali")
|
||||
@Operation(summary = "支付宝信息的新增和修改")
|
||||
@Log(title = "支付宝信息的新增和修改", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> updateAli(@RequestBody AccountAliBankCardRes res){
|
||||
currentUserManager.saveOrUpdateAliInfo(res);
|
||||
return R.ok(true);
|
||||
@@ -57,6 +62,7 @@ public class WalletController {
|
||||
|
||||
@PostMapping("/withdraw/ali")
|
||||
@Operation(summary = "支付宝提现接口")
|
||||
@Log(title = "支付宝提现接口", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<Boolean> withdraw(@RequestBody WithdrawReq res){
|
||||
res.setUserId(LoginHelper.getUserId());
|
||||
accountCashService.withdraw(res);
|
||||
@@ -65,6 +71,7 @@ public class WalletController {
|
||||
|
||||
@GetMapping("/recharge/log")
|
||||
@Operation(summary = "充值记录-分页")
|
||||
@Log(title = "充值记录", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<RechargeOrderVo> rechargeLog(PageQuery query){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
Page<RechargeOrder> page = rechargeOrderService.page(query.build(), Wrappers.lambdaQuery(RechargeOrder.class)
|
||||
@@ -77,6 +84,7 @@ public class WalletController {
|
||||
|
||||
@GetMapping("/cash/log")
|
||||
@Operation(summary = "提现记录-分页")
|
||||
@Log(title = "提现记录", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public TableDataInfo<AccountCashVo> cashLog(PageQuery query){
|
||||
Long userId = LoginHelper.getUserId();
|
||||
Page<AccountCash> page = accountCashService.page(query.build(), Wrappers.lambdaQuery(AccountCash.class)
|
||||
|
||||
@@ -44,4 +44,6 @@ public @interface Log {
|
||||
*/
|
||||
String[] excludeParamNames() default {};
|
||||
|
||||
boolean isSaveDb() default true;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,32 +67,36 @@ public class LogAspect {
|
||||
|
||||
protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult) {
|
||||
try {
|
||||
|
||||
// *========数据库日志=========*//
|
||||
OperLogEvent operLog = new OperLogEvent();
|
||||
StringBuilder logString = new StringBuilder();
|
||||
logString.append("record logs:");
|
||||
operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
|
||||
// 请求的地址
|
||||
String ip = ServletUtils.getClientIP();
|
||||
operLog.setOperIp(ip);
|
||||
logString.append(String.format("ip=%s;",ip));
|
||||
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if(loginUser != null){
|
||||
operLog.setOperName(loginUser.getUsername());
|
||||
operLog.setUserType(loginUser.getUserType());
|
||||
operLog.setDeptName(loginUser.getDeptName());
|
||||
}
|
||||
if (e != null) {
|
||||
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
||||
operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
|
||||
}
|
||||
// 设置方法名称
|
||||
String className = joinPoint.getTarget().getClass().getName();
|
||||
String methodName = joinPoint.getSignature().getName();
|
||||
operLog.setMethod(className + "." + methodName + "()");
|
||||
// 设置请求方式
|
||||
operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
|
||||
logString.append(String.format("url=%s;method=%s;title=%s;",operLog.getOperUrl(),operLog.getRequestMethod(),controllerLog.title()));
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if(loginUser != null){
|
||||
operLog.setOperName(loginUser.getUsername());
|
||||
operLog.setUserType(loginUser.getUserType());
|
||||
operLog.setDeptName(loginUser.getDeptName());
|
||||
}
|
||||
// 处理设置注解上的参数
|
||||
getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
|
||||
getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult,logString);
|
||||
if (e != null) {
|
||||
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
||||
operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
|
||||
logString.append(String.format("exception=%s;",e.getMessage()));
|
||||
}
|
||||
// 发布事件保存数据库
|
||||
SpringUtils.context().publishEvent(operLog);
|
||||
} catch (Exception exp) {
|
||||
@@ -109,7 +113,7 @@ public class LogAspect {
|
||||
* @param operLog 操作日志
|
||||
* @throws Exception
|
||||
*/
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult) throws Exception {
|
||||
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult,StringBuilder logString) throws Exception {
|
||||
// 设置action动作
|
||||
operLog.setBusinessType(log.businessType().ordinal());
|
||||
// 设置标题
|
||||
@@ -119,11 +123,13 @@ public class LogAspect {
|
||||
// 是否需要保存request,参数和值
|
||||
if (log.isSaveRequestData()) {
|
||||
// 获取参数的信息,传入到数据库中。
|
||||
setRequestValue(joinPoint, operLog, log.excludeParamNames());
|
||||
setRequestValue(joinPoint, operLog, log.excludeParamNames(),logString);
|
||||
}
|
||||
// 是否需要保存response,参数和值
|
||||
if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) {
|
||||
operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 2000));
|
||||
String jsonResultString = JsonUtils.toJsonString(jsonResult);
|
||||
operLog.setJsonResult(StringUtils.substring(jsonResultString, 0, 2000));
|
||||
logString.append(String.format("result=%s;",jsonResultString));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,17 +139,20 @@ public class LogAspect {
|
||||
* @param operLog 操作日志
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames) throws Exception {
|
||||
private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames,StringBuilder logString) throws Exception {
|
||||
Map<String, String> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
||||
String requestMethod = operLog.getRequestMethod();
|
||||
if (MapUtil.isEmpty(paramsMap)
|
||||
&& HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) {
|
||||
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
|
||||
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
||||
logString.append(String.format("params=%s;",params));
|
||||
} else {
|
||||
MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES);
|
||||
MapUtil.removeAny(paramsMap, excludeParamNames);
|
||||
operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 2000));
|
||||
String params = JsonUtils.toJsonString(paramsMap);
|
||||
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
||||
logString.append(String.format("params=%s;",params));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user