web端已基本完成
This commit is contained in:
@ -1,148 +0,0 @@
|
||||
package com.greenorange.promotion.controller.fundsChange;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
||||
import com.greenorange.promotion.annotation.SysLog;
|
||||
import com.greenorange.promotion.common.BaseResponse;
|
||||
import com.greenorange.promotion.common.ErrorCode;
|
||||
import com.greenorange.promotion.common.ResultUtils;
|
||||
import com.greenorange.promotion.constant.UserConstant;
|
||||
import com.greenorange.promotion.exception.ThrowUtils;
|
||||
import com.greenorange.promotion.model.dto.CommonBatchRequest;
|
||||
import com.greenorange.promotion.model.dto.fundsChange.FundsChangeAddRequest;
|
||||
import com.greenorange.promotion.model.dto.fundsChange.FundsChangeQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.fundsChange.FundsChangeUpdateRequest;
|
||||
import com.greenorange.promotion.model.entity.FundsChange;
|
||||
import com.greenorange.promotion.model.vo.fundsChange.FundsChangeVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.settle.FundsChangeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.greenorange.promotion.model.dto.CommonRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 资金变动记录 控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("fundsChange")
|
||||
@Slf4j
|
||||
@Tag(name = "资金变动记录管理")
|
||||
public class FundsChangeController {
|
||||
|
||||
@Resource
|
||||
private FundsChangeService fundsChangeService;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
/**
|
||||
* web端管理员添加资金变动记录
|
||||
* @param fundsChangeAddRequest 资金变动记录添加请求体
|
||||
* @return 是否添加成功
|
||||
*/
|
||||
@PostMapping("add")
|
||||
@Operation(summary = "web端管理员添加资金变动记录", description = "参数:资金变动记录添加请求体,权限:管理员,方法名:addFundsChange")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "资金变动记录管理", content = "web端管理员添加资金变动记录")
|
||||
public BaseResponse<Boolean> addFundsChange(@Valid @RequestBody FundsChangeAddRequest fundsChangeAddRequest) {
|
||||
FundsChange fundsChange = commonService.copyProperties(fundsChangeAddRequest, FundsChange.class);
|
||||
fundsChangeService.save(fundsChange);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id修改资金变动记录信息
|
||||
* @param fundsChangeUpdateRequest 资金变动记录更新请求体
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("update")
|
||||
@Operation(summary = "web端管理员更新资金变动记录", description = "参数:资金变动记录更新请求体,权限:管理员,方法名:updateFundsChange")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "资金变动记录管理", content = "web端管理员根据id修改资金变动记录信息")
|
||||
public BaseResponse<Boolean> updateFundsChange(@Valid @RequestBody FundsChangeUpdateRequest fundsChangeUpdateRequest) {
|
||||
FundsChange fundsChange = commonService.copyProperties(fundsChangeUpdateRequest, FundsChange.class);
|
||||
fundsChangeService.updateById(fundsChange);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id删除资金变动记录
|
||||
* @param commonRequest 资金变动记录删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
@Operation(summary = "web端管理员根据id删除资金变动记录", description = "参数:资金变动记录删除请求体,权限:管理员,方法名:delFundsChange")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "资金变动记录管理", content = "web端管理员根据id删除资金变动记录")
|
||||
public BaseResponse<Boolean> delFundsChange(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
fundsChangeService.removeById(id);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员批量删除资金变动记录
|
||||
* @param commonBatchRequest 资金变动记录批量删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delBatch")
|
||||
@Operation(summary = "web端管理员批量删除资金变动记录", description = "参数:资金变动记录批量删除请求体,权限:管理员,方法名:delBatchFundsChange")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "资金变动记录管理", content = "web端管理员批量删除资金变动记录")
|
||||
public BaseResponse<Boolean> delBatchFundsChange(@Valid @RequestBody CommonBatchRequest commonBatchRequest) {
|
||||
List<Long> ids = commonBatchRequest.getIds();
|
||||
fundsChangeService.removeByIds(ids);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id查询资金变动记录
|
||||
* @param commonRequest 资金变动记录查询请求体
|
||||
* @return 资金变动记录信息
|
||||
*/
|
||||
@PostMapping("queryById")
|
||||
@Operation(summary = "web端管理员根据id查询资金变动记录", description = "参数:资金变动记录查询请求体,权限:管理员,方法名:queryFundsChangeById")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "资金变动记录管理", content = "web端管理员根据id查询资金变动记录")
|
||||
public BaseResponse<FundsChangeVO> queryFundsChangeById(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
FundsChange fundsChange = fundsChangeService.getById(id);
|
||||
ThrowUtils.throwIf(fundsChange == null, ErrorCode.OPERATION_ERROR, "当前资金变动记录不存在");
|
||||
FundsChangeVO fundsChangeVO = commonService.copyProperties(fundsChange, FundsChangeVO.class);
|
||||
return ResultUtils.success(fundsChangeVO);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Web端管理员分页查询资金变动记录
|
||||
// * @param fundsChangeQueryRequest 资金变动记录查询请求体
|
||||
// * @return 资金变动记录列表
|
||||
// */
|
||||
// @PostMapping("page")
|
||||
// @Operation(summary = "Web端管理员分页查询资金变动记录", description = "参数:资金变动记录查询请求体,权限:管理员,方法名:listFundsChangeByPage")
|
||||
// @RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
// @SysLog(title = "资金变动记录管理", content = "Web端管理员分页查询资金变动记录")
|
||||
// public BaseResponse<Page<FundsChangeVO>> listFundsChangeByPage(@Valid @RequestBody FundsChangeQueryRequest fundsChangeQueryRequest) {
|
||||
// long current = fundsChangeQueryRequest.getCurrent();
|
||||
// long pageSize = fundsChangeQueryRequest.getPageSize();
|
||||
// QueryWrapper<FundsChange> queryWrapper = fundsChangeService.getQueryWrapper(fundsChangeQueryRequest);
|
||||
// Page<FundsChange> page = fundsChangeService.page(new Page<>(current, pageSize), queryWrapper);
|
||||
// List<FundsChange> fundsChangeList = page.getRecords();
|
||||
// List<FundsChangeVO> fundsChangeVOList = commonService.convertList(fundsChangeList, FundsChangeVO.class);
|
||||
// Page<FundsChangeVO> voPage = new Page<>(current, pageSize);
|
||||
// voPage.setRecords(fundsChangeVOList);
|
||||
// voPage.setPages(page.getPages());
|
||||
// voPage.setTotal(page.getTotal());
|
||||
// return ResultUtils.success(voPage);
|
||||
// }
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.projectCommission;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.projectDetail;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.projectNotification;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.promoCodeApply;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.promoCode;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.subUserProjectCommission;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.userProject;
|
||||
package com.greenorange.promotion.controller.project;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
@ -0,0 +1,72 @@
|
||||
package com.greenorange.promotion.controller.projectSettlement;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
||||
import com.greenorange.promotion.annotation.SysLog;
|
||||
import com.greenorange.promotion.common.BaseResponse;
|
||||
import com.greenorange.promotion.common.ErrorCode;
|
||||
import com.greenorange.promotion.common.ResultUtils;
|
||||
import com.greenorange.promotion.constant.UserConstant;
|
||||
import com.greenorange.promotion.exception.ThrowUtils;
|
||||
import com.greenorange.promotion.model.dto.CommonBatchRequest;
|
||||
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyAddRequest;
|
||||
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyUpdateRequest;
|
||||
import com.greenorange.promotion.model.entity.WithdrawalApply;
|
||||
import com.greenorange.promotion.model.vo.withdrawalApply.WithdrawalApplyVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.settle.WithdrawalApplyService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.greenorange.promotion.model.dto.CommonRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 提现申请记录 控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("withdrawalApply")
|
||||
@Slf4j
|
||||
@Tag(name = "提现申请记录管理")
|
||||
public class WithdrawalApplyController {
|
||||
|
||||
@Resource
|
||||
private WithdrawalApplyService withdrawalApplyService;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
|
||||
/**
|
||||
* Web端管理员分页查询提现申请记录
|
||||
* @param withdrawalApplyQueryRequest 提现申请记录查询请求体
|
||||
* @return 提现申请记录列表
|
||||
*/
|
||||
@PostMapping("page")
|
||||
@Operation(summary = "Web端管理员分页查询提现申请记录", description = "参数:提现申请记录查询请求体,权限:管理员,方法名:listWithdrawalApplyByPage")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "提现申请记录管理", content = "Web端管理员分页查询提现申请记录")
|
||||
public BaseResponse<Page<WithdrawalApplyVO>> listWithdrawalApplyByPage(@Valid @RequestBody WithdrawalApplyQueryRequest withdrawalApplyQueryRequest) {
|
||||
long current = withdrawalApplyQueryRequest.getCurrent();
|
||||
long pageSize = withdrawalApplyQueryRequest.getPageSize();
|
||||
QueryWrapper<WithdrawalApply> queryWrapper = withdrawalApplyService.getQueryWrapper(withdrawalApplyQueryRequest);
|
||||
Page<WithdrawalApply> page = withdrawalApplyService.page(new Page<>(current, pageSize), queryWrapper);
|
||||
List<WithdrawalApply> withdrawalApplyList = page.getRecords();
|
||||
List<WithdrawalApplyVO> withdrawalApplyVOList = commonService.convertList(withdrawalApplyList, WithdrawalApplyVO.class);
|
||||
Page<WithdrawalApplyVO> voPage = new Page<>(current, pageSize);
|
||||
voPage.setRecords(withdrawalApplyVOList);
|
||||
voPage.setPages(page.getPages());
|
||||
voPage.setTotal(page.getTotal());
|
||||
return ResultUtils.success(voPage);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.greenorange.promotion.controller.user;
|
||||
package com.greenorange.promotion.controller.userInfo;
|
||||
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
||||
import com.greenorange.promotion.annotation.SysLog;
|
||||
import com.greenorange.promotion.annotation.Timeout;
|
||||
import com.greenorange.promotion.common.BaseResponse;
|
||||
import com.greenorange.promotion.common.ErrorCode;
|
||||
import com.greenorange.promotion.common.ResultUtils;
|
@ -1,6 +1,5 @@
|
||||
package com.greenorange.promotion.controller.userMainInfo;
|
||||
package com.greenorange.promotion.controller.userInfo;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.greenorange.promotion.annotation.RequiresPermission;
|
||||
import com.greenorange.promotion.annotation.SysLog;
|
||||
import com.greenorange.promotion.common.BaseResponse;
|
||||
@ -10,7 +9,6 @@ import com.greenorange.promotion.constant.UserConstant;
|
||||
import com.greenorange.promotion.exception.ThrowUtils;
|
||||
import com.greenorange.promotion.model.dto.CommonBatchRequest;
|
||||
import com.greenorange.promotion.model.dto.userMainInfo.UserMainInfoAddRequest;
|
||||
import com.greenorange.promotion.model.dto.userMainInfo.UserMainInfoQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.userMainInfo.UserMainInfoUpdateRequest;
|
||||
import com.greenorange.promotion.model.entity.UserMainInfo;
|
||||
import com.greenorange.promotion.model.vo.userMainInfo.UserMainInfoVO;
|
||||
@ -22,7 +20,6 @@ import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.greenorange.promotion.model.dto.CommonRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
Reference in New Issue
Block a user