web端已基本完成

This commit is contained in:
chen-xin-zhi 2025-05-10 21:42:10 +08:00
parent cc55491cd6
commit f0d49d1378
48 changed files with 615 additions and 265 deletions

View File

@ -6,7 +6,6 @@ import jakarta.validation.ConstraintValidatorContext;
public class ProjectStatusEnumValidator implements ConstraintValidator<ProjectStatusEnumValue, String> {
@Override
public void initialize(ProjectStatusEnumValue constraintAnnotation) {

View File

@ -0,0 +1,18 @@
package com.greenorange.promotion.annotation;
import com.greenorange.promotion.model.enums.WithdrawStatusEnum;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
public class WithdrawStatusEnumValidator implements ConstraintValidator<WithdrawStatusEnumValue, String> {
@Override
public void initialize(WithdrawStatusEnumValue constraintAnnotation) {
}
@Override
public boolean isValid(String value, ConstraintValidatorContext context) {
return WithdrawStatusEnum.getEnumByValue(value) != null;
}
}

View File

@ -0,0 +1,21 @@
package com.greenorange.promotion.annotation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
// 自定义校验注解
@Constraint(validatedBy = WithdrawStatusEnumValidator.class)
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface WithdrawStatusEnumValue {
String message() default "提现状态错误"; // 错误信息
Class<?>[] groups() default {}; // 组别
Class<? extends Payload>[] payload() default {}; // 负载
Class<? extends Enum<?>> enumClass(); // 枚举类类型
}

View File

@ -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);
// }
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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;

View File

@ -27,13 +27,13 @@ public class Generator {
// 作者
private static final String AUTHOR = "chenxinzhi";
// 表注释
private static final String TABLE_COMMENT = "推广码申请记录";
private static final String TABLE_COMMENT = "提现申请记录";
// 实体类名
private static final String ENTITY_NAME = "PromoCodeApply";
private static final String ENTITY_NAME = "WithdrawalApply";
// 表名
private static final String TABLE_NAME = "promo_code_apply";
private static final String TABLE_NAME = "withdrawal_apply";
// 实体类属性名
private static final String ENTITY_NAME_LOWER = "promoCodeApply";
private static final String ENTITY_NAME_LOWER = "withdrawalApply";
// 父包名
private static final String PARENT_PATH = "com.greenorange.promotion";

View File

@ -0,0 +1,18 @@
package com.greenorange.promotion.mapper;
import com.greenorange.promotion.model.entity.WithdrawalApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author 35880
* @description 针对表withdrawal_apply(提现申请记录表)的数据库操作Mapper
* @createDate 2025-05-10 20:42:35
* @Entity com.greenorange.promotion.model.entity.WithdrawalApply
*/
public interface WithdrawalApplyMapper extends BaseMapper<WithdrawalApply> {
}

View File

@ -46,7 +46,7 @@ public class ProjectAddRequest implements Serializable {
* 项目图片URL
*/
@NotBlank(message = "项目图片URL不能为空")
@Schema(description = "项目图片URL", example = "http://xxx.png")
@Schema(description = "项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**

View File

@ -50,7 +50,7 @@ public class ProjectUpdateRequest implements Serializable {
* 项目图片URL
*/
@NotBlank(message = "项目图片URL不能为空")
@Schema(description = "项目图片URL", example = "http://xxx.png")
@Schema(description = "项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**

View File

@ -32,33 +32,33 @@ public class ProjectCommissionAddRequest implements Serializable {
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.45")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "5")
private BigDecimal currentCommissionRate;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -22,40 +22,40 @@ public class ProjectCommissionQueryRequest extends PageRequest implements Serial
* 抽佣记录ID
*/
@Min(value = 1L, message = "抽佣记录ID ID不能小于1")
@Schema(description = "抽佣记录ID", example = "")
@Schema(description = "抽佣记录ID", example = "1")
private Long id;
/**
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.45")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "5")
private BigDecimal currentCommissionRate;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -27,40 +27,40 @@ public class ProjectCommissionUpdateRequest implements Serializable {
* 抽佣记录ID
*/
@Min(value = 1L, message = "抽佣记录ID ID不能小于1")
@Schema(description = "抽佣记录ID", example = "")
@Schema(description = "抽佣记录ID", example = "1")
private Long id;
/**
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.45")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "5")
private BigDecimal currentCommissionRate;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -23,21 +23,21 @@ public class ProjectNotificationAddRequest implements Serializable {
* 通知标题
*/
@NotBlank(message = "通知标题不能为空")
@Schema(description = "通知标题", example = "")
@Schema(description = "通知标题", example = "美团试吃官-涨价通知")
private String notificationTitle;
/**
* 通知内容
*/
@NotBlank(message = "通知内容不能为空")
@Schema(description = "通知内容", example = "")
@Schema(description = "通知内容", example = "富文本")
private String notificationContent;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;

View File

@ -20,28 +20,28 @@ public class ProjectNotificationQueryRequest extends PageRequest implements Seri
* 通知ID
*/
@Min(value = 1L, message = "通知ID ID不能小于1")
@Schema(description = "通知ID", example = "")
@Schema(description = "通知ID", example = "1")
private Long id;
/**
* 通知标题
*/
@NotBlank(message = "通知标题不能为空")
@Schema(description = "通知标题", example = "")
@Schema(description = "通知标题", example = "美团试吃官-涨价通知")
private String notificationTitle;
/**
* 通知内容
*/
@NotBlank(message = "通知内容不能为空")
@Schema(description = "通知内容", example = "")
@Schema(description = "通知内容", example = "富文本")
private String notificationContent;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;

View File

@ -24,28 +24,28 @@ public class ProjectNotificationUpdateRequest implements Serializable {
* 通知ID
*/
@Min(value = 1L, message = "通知ID ID不能小于1")
@Schema(description = "通知ID", example = "")
@Schema(description = "通知ID", example = "1")
private Long id;
/**
* 通知标题
*/
@NotBlank(message = "通知标题不能为空")
@Schema(description = "通知标题", example = "")
@Schema(description = "通知标题", example = "美团试吃官-涨价通知")
private String notificationTitle;
/**
* 通知内容
*/
@NotBlank(message = "通知内容不能为空")
@Schema(description = "通知内容", example = "")
@Schema(description = "通知内容", example = "富文本")
private String notificationContent;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;

View File

@ -63,7 +63,7 @@ public class PromoCodeApplyAddRequest implements Serializable {
* 绑定的项目图片URL
*/
@NotBlank(message = "绑定的项目图片URL不能为空")
@Schema(description = "绑定的项目图片URL", example = "http://xxx.png")
@Schema(description = "绑定的项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**

View File

@ -63,7 +63,7 @@ public class PromoCodeApplyQueryRequest extends PageRequest implements Serializa
* 绑定的项目图片URL
*/
@NotBlank(message = "绑定的项目图片URL不能为空")
@Schema(description = "绑定的项目图片URL", example = "http://xxx.png")
@Schema(description = "绑定的项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**

View File

@ -71,7 +71,7 @@ public class PromoCodeApplyUpdateRequest implements Serializable {
* 绑定的项目图片URL
*/
@NotBlank(message = "绑定的项目图片URL不能为空")
@Schema(description = "绑定的项目图片URL", example = "http://xxx.png")
@Schema(description = "绑定的项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**

View File

@ -33,40 +33,40 @@ public class SubUserProjectCommissionAddRequest implements Serializable {
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.66")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "2")
private BigDecimal currentCommissionRate;
/**
* 下级用户ID
*/
@Min(value = 1L, message = "下级用户ID ID不能小于1")
@Schema(description = "下级用户ID", example = "")
@Schema(description = "下级用户ID", example = "1")
private Long subUserId;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "2")
private Long userId;

View File

@ -22,47 +22,47 @@ public class SubUserProjectCommissionQueryRequest extends PageRequest implements
* 下级用户抽佣记录ID
*/
@Min(value = 1L, message = "下级用户抽佣记录ID ID不能小于1")
@Schema(description = "下级用户抽佣记录ID", example = "")
@Schema(description = "下级用户抽佣记录ID", example = "1")
private Long id;
/**
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.83")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "3")
private BigDecimal currentCommissionRate;
/**
* 下级用户ID
*/
@Min(value = 1L, message = "下级用户ID ID不能小于1")
@Schema(description = "下级用户ID", example = "")
@Schema(description = "下级用户ID", example = "2")
private Long subUserId;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -28,47 +28,47 @@ public class SubUserProjectCommissionUpdateRequest implements Serializable {
* 下级用户抽佣记录ID
*/
@Min(value = 1L, message = "下级用户抽佣记录ID ID不能小于1")
@Schema(description = "下级用户抽佣记录ID", example = "")
@Schema(description = "下级用户抽佣记录ID", example = "1")
private Long id;
/**
* 项目明细ID
*/
@Min(value = 1L, message = "项目明细ID ID不能小于1")
@Schema(description = "项目明细ID", example = "")
@Schema(description = "项目明细ID", example = "1")
private Long projectDetailId;
/**
* 我的单价
*/
@Schema(description = "我的单价", example = "")
@Schema(description = "我的单价", example = "0.24")
private BigDecimal myUnitPrice;
/**
* 当前抽佣比例
*/
@Schema(description = "当前抽佣比例", example = "")
@Schema(description = "当前抽佣比例", example = "4")
private BigDecimal currentCommissionRate;
/**
* 下级用户ID
*/
@Min(value = 1L, message = "下级用户ID ID不能小于1")
@Schema(description = "下级用户ID", example = "")
@Schema(description = "下级用户ID", example = "2")
private Long subUserId;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -32,7 +32,7 @@ public class UserInfoAddRequest implements Serializable {
* 用户头像URL
*/
@NotBlank(message = "用户头像URL不能为空")
@Schema(description = "用户头像URL", example = "http://xxx.png")
@Schema(description = "用户头像URL", example = "3E8U2AM8")
private String userAvatar;
/**

View File

@ -39,7 +39,7 @@ public class UserInfoUpdateRequest implements Serializable {
* 用户头像URL
*/
@NotBlank(message = "用户头像URL不能为空")
@Schema(description = "用户头像URL", example = "http://xxx.png")
@Schema(description = "用户头像URL", example = "3E8U2AM8")
private String userAvatar;
/**

View File

@ -28,51 +28,51 @@ public class UserMainInfoAddRequest implements Serializable {
/**
* 团队人数不包括自己
*/
@Schema(description = "团队人数(不包括自己)", example = "")
@Schema(description = "团队人数(不包括自己)", example = "10")
private Integer teamSize;
/**
* 给上级带来的收益
*/
@Schema(description = "给上级带来的收益", example = "")
@Schema(description = "给上级带来的收益", example = "1.00")
private BigDecimal parentEarnings;
/**
* 当前余额
*/
@Schema(description = "当前余额", example = "")
@Schema(description = "当前余额", example = "45.00")
private BigDecimal currentBalance;
/**
* 提现中的金额
*/
@Schema(description = "提现中的金额", example = "")
@Schema(description = "提现中的金额", example = "20.00")
private BigDecimal withdrawalAmount;
/**
* 已提现的金额
*/
@Schema(description = "已提现的金额", example = "")
@Schema(description = "已提现的金额", example = "25.00")
private BigDecimal withdrawnAmount;
/**
* 累计收入
*/
@Schema(description = "累计收入", example = "")
@Schema(description = "累计收入", example = "70.00")
private BigDecimal totalIncome;
/**
* 用户id
*/
@Min(value = 1L, message = "用户id ID不能小于1")
@Schema(description = "用户id", example = "")
@Schema(description = "用户id", example = "1")
private Long userId;
/**
* 邀请二维码
*/
@NotBlank(message = "邀请二维码不能为空")
@Schema(description = "邀请二维码", example = "")
@Schema(description = "邀请二维码", example = "3E8U2AM8")
private String inviteQrCode;

View File

@ -22,57 +22,57 @@ public class UserMainInfoQueryRequest extends PageRequest implements Serializabl
* 主键ID
*/
@Min(value = 1L, message = "主键ID ID不能小于1")
@Schema(description = "主键ID", example = "")
@Schema(description = "主键ID", example = "1")
private Long id;
/**
* 团队人数不包括自己
*/
@Schema(description = "团队人数(不包括自己)", example = "")
@Schema(description = "团队人数(不包括自己)", example = "10")
private Integer teamSize;
/**
* 给上级带来的收益
*/
@Schema(description = "给上级带来的收益", example = "")
@Schema(description = "给上级带来的收益", example = "0.88")
private BigDecimal parentEarnings;
/**
* 当前余额
*/
@Schema(description = "当前余额", example = "")
@Schema(description = "当前余额", example = "45.00")
private BigDecimal currentBalance;
/**
* 提现中的金额
*/
@Schema(description = "提现中的金额", example = "")
@Schema(description = "提现中的金额", example = "20.00")
private BigDecimal withdrawalAmount;
/**
* 已提现的金额
*/
@Schema(description = "已提现的金额", example = "")
@Schema(description = "已提现的金额", example = "25.00")
private BigDecimal withdrawnAmount;
/**
* 累计收入
*/
@Schema(description = "累计收入", example = "")
@Schema(description = "累计收入", example = "70.00")
private BigDecimal totalIncome;
/**
* 用户id
*/
@Min(value = 1L, message = "用户id ID不能小于1")
@Schema(description = "用户id", example = "")
@Schema(description = "用户id", example = "1")
private Long userId;
/**
* 邀请二维码
*/
@NotBlank(message = "邀请二维码不能为空")
@Schema(description = "邀请二维码", example = "")
@Schema(description = "邀请二维码", example = "3E8U2AM8")
private String inviteQrCode;

View File

@ -30,57 +30,57 @@ public class UserMainInfoUpdateRequest implements Serializable {
* 主键ID
*/
@Min(value = 1L, message = "主键ID ID不能小于1")
@Schema(description = "主键ID", example = "")
@Schema(description = "主键ID", example = "1")
private Long id;
/**
* 团队人数不包括自己
*/
@Schema(description = "团队人数(不包括自己)", example = "")
@Schema(description = "团队人数(不包括自己)", example = "10")
private Integer teamSize;
/**
* 给上级带来的收益
*/
@Schema(description = "给上级带来的收益", example = "")
@Schema(description = "给上级带来的收益", example = "10.00")
private BigDecimal parentEarnings;
/**
* 当前余额
*/
@Schema(description = "当前余额", example = "")
@Schema(description = "当前余额", example = "45.00")
private BigDecimal currentBalance;
/**
* 提现中的金额
*/
@Schema(description = "提现中的金额", example = "")
@Schema(description = "提现中的金额", example = "20.00")
private BigDecimal withdrawalAmount;
/**
* 已提现的金额
*/
@Schema(description = "已提现的金额", example = "")
@Schema(description = "已提现的金额", example = "25.00")
private BigDecimal withdrawnAmount;
/**
* 累计收入
*/
@Schema(description = "累计收入", example = "")
@Schema(description = "累计收入", example = "70.00")
private BigDecimal totalIncome;
/**
* 用户id
*/
@Min(value = 1L, message = "用户id ID不能小于1")
@Schema(description = "用户id", example = "")
@Schema(description = "用户id", example = "1")
private Long userId;
/**
* 邀请二维码
*/
@NotBlank(message = "邀请二维码不能为空")
@Schema(description = "邀请二维码", example = "")
@Schema(description = "邀请二维码", example = "3E8U2AM8")
private String inviteQrCode;

View File

@ -25,34 +25,34 @@ public class UserProjectAddRequest implements Serializable {
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 项目名称
*/
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称", example = "")
@Schema(description = "项目名称", example = "美团省钱包")
private String projectName;
/**
* 项目图片URL
*/
@NotBlank(message = "项目图片URL不能为空")
@Schema(description = "项目图片URL", example = "")
@Schema(description = "项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**
* 项目结算周期
*/
@Schema(description = "项目结算周期", example = "")
@Schema(description = "项目结算周期", example = "2")
private Integer projectSettlementCycle;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -20,41 +20,41 @@ public class UserProjectQueryRequest extends PageRequest implements Serializable
* 用户项目ID
*/
@Min(value = 1L, message = "用户项目ID ID不能小于1")
@Schema(description = "用户项目ID", example = "")
@Schema(description = "用户项目ID", example = "1")
private Long id;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 项目名称
*/
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称", example = "")
@Schema(description = "项目名称", example = "美团省钱包")
private String projectName;
/**
* 项目图片URL
*/
@NotBlank(message = "项目图片URL不能为空")
@Schema(description = "项目图片URL", example = "")
@Schema(description = "项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**
* 项目结算周期
*/
@Schema(description = "项目结算周期", example = "")
@Schema(description = "项目结算周期", example = "2")
private Integer projectSettlementCycle;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -26,41 +26,41 @@ public class UserProjectUpdateRequest implements Serializable {
* 用户项目ID
*/
@Min(value = 1L, message = "用户项目ID ID不能小于1")
@Schema(description = "用户项目ID", example = "")
@Schema(description = "用户项目ID", example = "1")
private Long id;
/**
* 项目ID
*/
@Min(value = 1L, message = "项目ID ID不能小于1")
@Schema(description = "项目ID", example = "")
@Schema(description = "项目ID", example = "1")
private Long projectId;
/**
* 项目名称
*/
@NotBlank(message = "项目名称不能为空")
@Schema(description = "项目名称", example = "")
@Schema(description = "项目名称", example = "美团省钱包")
private String projectName;
/**
* 项目图片URL
*/
@NotBlank(message = "项目图片URL不能为空")
@Schema(description = "项目图片URL", example = "")
@Schema(description = "项目图片URL", example = "3E8U2AM8")
private String projectImage;
/**
* 项目结算周期
*/
@Schema(description = "项目结算周期", example = "")
@Schema(description = "项目结算周期", example = "2")
private Integer projectSettlementCycle;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "")
@Schema(description = "用户ID", example = "1")
private Long userId;

View File

@ -0,0 +1,49 @@
package com.greenorange.promotion.model.dto.withdrawalApply;
import com.greenorange.promotion.annotation.WithdrawStatusEnumValue;
import com.greenorange.promotion.model.enums.WithdrawStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;
import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
/**
* 提现申请记录添加请求体
*/
@Data
@Schema(description = "提现申请记录添加请求体", requiredProperties = {
"withdrawnAmount",
"withdrawalStatus",
"userId",
})
public class WithdrawalApplyAddRequest implements Serializable {
/**
* 提现金额
*/
@Schema(description = "提现金额", example = "1.00")
private BigDecimal withdrawnAmount;
/**
* 提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]
*/
@WithdrawStatusEnumValue(enumClass = WithdrawStatusEnum.class)
@Schema(description = "提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]", example = "processing")
private String withdrawalStatus;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "1")
private Long userId;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,33 @@
package com.greenorange.promotion.model.dto.withdrawalApply;
import com.greenorange.promotion.annotation.WithdrawStatusEnumValue;
import com.greenorange.promotion.model.enums.WithdrawStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;
import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
import com.greenorange.promotion.common.PageRequest;
/**
* 提现申请记录查询请求体继承自分页请求 PageRequest
*/
@Data
@Schema(description = "提现申请记录查询请求体", requiredProperties = {"current", "pageSize"})
public class WithdrawalApplyQueryRequest extends PageRequest implements Serializable {
/**
* 提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]
*/
@WithdrawStatusEnumValue(enumClass = WithdrawStatusEnum.class)
@Schema(description = "提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]", example = "processing")
private String withdrawalStatus;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,56 @@
package com.greenorange.promotion.model.dto.withdrawalApply;
import com.greenorange.promotion.annotation.WithdrawStatusEnumValue;
import com.greenorange.promotion.model.enums.WithdrawStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;
import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
/**
* 提现申请记录更新请求体
*/
@Data
@Schema(description = "提现申请记录更新请求体", requiredProperties = {
"id",
"withdrawnAmount",
"withdrawalStatus",
"userId",
})
public class WithdrawalApplyUpdateRequest implements Serializable {
/**
* 提现申请ID
*/
@Min(value = 1L, message = "提现申请ID ID不能小于1")
@Schema(description = "提现申请ID", example = "1")
private Long id;
/**
* 提现金额
*/
@Schema(description = "提现金额", example = "1.00")
private BigDecimal withdrawnAmount;
/**
* 提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]
*/
@WithdrawStatusEnumValue(enumClass = WithdrawStatusEnum.class)
@Schema(description = "提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]", example = "processing")
private String withdrawalStatus;
/**
* 用户ID
*/
@Min(value = 1L, message = "用户ID ID不能小于1")
@Schema(description = "用户ID", example = "1")
private Long userId;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,57 @@
package com.greenorange.promotion.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* 提现申请记录表
* @TableName withdrawal_apply
*/
@TableName(value ="withdrawal_apply")
@Data
public class WithdrawalApply implements Serializable {
/**
* 提现申请ID
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 提现金额
*/
private BigDecimal withdrawnAmount;
/**
* 提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]
*/
private String withdrawalStatus;
/**
* 用户ID
*/
private Long userId;
/**
* 是否删除
*/
private Integer isDelete;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -7,7 +7,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 文件上传业务类型枚举
*/

View File

@ -0,0 +1,53 @@
package com.greenorange.promotion.model.enums;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 提现状态枚举
*/
@Getter
public enum WithdrawStatusEnum {
PROCESSING("提现中", "processing"),
SUCCESS("提现成功", "success"),
FAILED("提现失败", "failed");
private final String text;
private final String value;
WithdrawStatusEnum(String text, String value) {
this.text = text;
this.value = value;
}
/**
* 获取所有状态的值列表
*/
public static List<String> getValues() {
return Arrays.stream(values())
.map(WithdrawStatusEnum::getValue)
.collect(Collectors.toList());
}
/**
* 根据 value 获取对应枚举
*/
public static WithdrawStatusEnum getEnumByValue(String value) {
if (StringUtils.isBlank(value)) {
return null;
}
for (WithdrawStatusEnum status : values()) {
if (status.getValue().equals(value)) {
return status;
}
}
return null;
}
}

View File

@ -0,0 +1,44 @@
package com.greenorange.promotion.model.vo.withdrawalApply;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 提现申请记录 视图对象
*/
@Data
@Schema(description = "提现申请记录 视图对象")
public class WithdrawalApplyVO implements Serializable {
/**
* 提现申请记录ID
*/
@Schema(description = "提现申请记录ID", example = "1")
private Long id;
/**
* 提现金额
*/
@Schema(description = "提现金额", example = "")
private BigDecimal withdrawnAmount;
/**
* 提现状态[提现中(processing)|提现成功(success)|提现失败(failed)]
*/
@Schema(description = "提现状态", example = "processing")
private String withdrawalStatus;
/**
* 用户ID
*/
@Schema(description = "用户ID", example = "1")
private Long userId;
@Serial
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,20 @@
package com.greenorange.promotion.service.settle;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyQueryRequest;
import com.greenorange.promotion.model.entity.WithdrawalApply;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author 35880
* @description 针对表withdrawal_apply(提现申请记录表)的数据库操作Service
* @createDate 2025-05-10 20:42:35
*/
public interface WithdrawalApplyService extends IService<WithdrawalApply> {
/**
* 获取查询条件
*/
QueryWrapper<WithdrawalApply> getQueryWrapper(WithdrawalApplyQueryRequest withdrawalApplyQueryRequest);
}

View File

@ -0,0 +1,41 @@
package com.greenorange.promotion.service.settle.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.greenorange.promotion.constant.CommonConstant;
import com.greenorange.promotion.model.dto.withdrawalApply.WithdrawalApplyQueryRequest;
import com.greenorange.promotion.model.entity.Project;
import com.greenorange.promotion.model.entity.WithdrawalApply;
import com.greenorange.promotion.service.settle.WithdrawalApplyService;
import com.greenorange.promotion.mapper.WithdrawalApplyMapper;
import com.greenorange.promotion.utils.SqlUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* @author 35880
* @description 针对表withdrawal_apply(提现申请记录表)的数据库操作Service实现
* @createDate 2025-05-10 20:42:35
*/
@Service
public class WithdrawalApplyServiceImpl extends ServiceImpl<WithdrawalApplyMapper, WithdrawalApply>
implements WithdrawalApplyService{
/**
* 获取查询条件
*/
@Override
public QueryWrapper<WithdrawalApply> getQueryWrapper(WithdrawalApplyQueryRequest withdrawalApplyQueryRequest) {
String withdrawalStatus = withdrawalApplyQueryRequest.getWithdrawalStatus();
String sortField = withdrawalApplyQueryRequest.getSortField();
String sortOrder = withdrawalApplyQueryRequest.getSortOrder();
QueryWrapper<WithdrawalApply> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.isNotBlank(withdrawalStatus), "withdrawalStatus", withdrawalStatus);
queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC), sortField);
return null;
}
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.greenorange.promotion.mapper.WithdrawalApplyMapper">
<resultMap id="BaseResultMap" type="com.greenorange.promotion.model.entity.WithdrawalApply">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="withdrawnAmount" column="withdrawnAmount" jdbcType="DECIMAL"/>
<result property="withdrawalStatus" column="withdrawalStatus" jdbcType="OTHER"/>
<result property="userId" column="userId" jdbcType="BIGINT"/>
<result property="isDelete" column="isDelete" jdbcType="TINYINT"/>
<result property="createTime" column="createTime" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,withdrawnAmount,withdrawalStatus,
userId,isDelete,createTime,
updateTime
</sql>
</mapper>