项目明细调整
This commit is contained in:
parent
a607eff4d8
commit
a79cd3d502
|
@ -5,11 +5,11 @@ import jakarta.validation.ConstraintValidator;
|
|||
import jakarta.validation.ConstraintValidatorContext;
|
||||
|
||||
// 枚举校验器
|
||||
public class FileEnumValidator implements ConstraintValidator<UserEnumValue, String> {
|
||||
public class FileEnumValidator implements ConstraintValidator<FileEnumValue, String> {
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(UserEnumValue constraintAnnotation) {
|
||||
public void initialize(FileEnumValue constraintAnnotation) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
// 自定义校验注解
|
||||
@Constraint(validatedBy = UserEnumValidator.class)
|
||||
@Constraint(validatedBy = FileEnumValidator.class)
|
||||
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface FileEnumValue {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.greenorange.promotion.annotation;
|
||||
|
||||
import com.greenorange.promotion.model.enums.ProjectStatusEnum;
|
||||
import jakarta.validation.ConstraintValidator;
|
||||
import jakarta.validation.ConstraintValidatorContext;
|
||||
|
||||
public class ProjectStatusEnumValidator implements ConstraintValidator<ProjectStatusEnumValue, String> {
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(ProjectStatusEnumValue constraintAnnotation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(String value, ConstraintValidatorContext context) {
|
||||
return ProjectStatusEnum.getEnumByValue(value) != null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
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 = ProjectStatusEnumValidator.class)
|
||||
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ProjectStatusEnumValue {
|
||||
|
||||
String message() default "项目状态错误"; // 错误信息
|
||||
Class<?>[] groups() default {}; // 组别
|
||||
Class<? extends Payload>[] payload() default {}; // 负载
|
||||
Class<? extends Enum<?>> enumClass(); // 枚举类类型
|
||||
|
||||
}
|
|
@ -16,10 +16,17 @@ import com.greenorange.promotion.model.dto.CommonBatchRequest;
|
|||
import com.greenorange.promotion.model.dto.CommonRequest;
|
||||
import com.greenorange.promotion.model.dto.project.ProjectAddRequest;
|
||||
import com.greenorange.promotion.model.dto.project.ProjectQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.project.ProjectStatusUpdateRequest;
|
||||
import com.greenorange.promotion.model.dto.project.ProjectUpdateRequest;
|
||||
import com.greenorange.promotion.model.dto.projectDetail.ProjectDetailAddRequest;
|
||||
import com.greenorange.promotion.model.dto.projectNotification.ProjectNotificationAddRequest;
|
||||
import com.greenorange.promotion.model.entity.Project;
|
||||
import com.greenorange.promotion.model.entity.ProjectDetail;
|
||||
import com.greenorange.promotion.model.entity.ProjectNotification;
|
||||
import com.greenorange.promotion.model.vo.project.ProjectVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.project.ProjectDetailService;
|
||||
import com.greenorange.promotion.service.project.ProjectNotificationService;
|
||||
import com.greenorange.promotion.service.project.ProjectService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
@ -149,25 +156,43 @@ public class ProjectController {
|
|||
return ResultUtils.success(voPage);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Web端管理员上(下)架项目
|
||||
// * @param commonRequest 项目id
|
||||
// * @return 是否更新成功
|
||||
// */
|
||||
// @PostMapping("/shelves")
|
||||
// @Operation(summary = "Web端管理员上(下)架项目", description = "参数:项目id,权限:管理员(admin, boss),方法名:updateProjectShelvesStatus")
|
||||
// @RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
// @SysLog(title = "项目管理", content = "Web端管理员上(下)架项目")
|
||||
// public BaseResponse<Boolean> updateProjectShelvesStatus(@RequestBody CommonRequest commonRequest) {
|
||||
// // 获取当前服务类商品的上(下)架状态
|
||||
// Long id = commonRequest.getId();
|
||||
// Project project = projectService.getById(id);
|
||||
// Integer status = project.getIsShelves() == 0 ? 1 : 0;
|
||||
// LambdaUpdateWrapper<Project> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
// updateWrapper.eq(Project::getId, id).set(Project::getIsShelves, status);
|
||||
// projectService.update(updateWrapper);
|
||||
// return ResultUtils.success(true);
|
||||
// }
|
||||
/**
|
||||
* Web端管理员上(下)架项目
|
||||
* @param commonRequest 项目id
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("shelves")
|
||||
@Operation(summary = "Web端管理员上(下)架项目", description = "参数:项目id,权限:管理员(admin, boss),方法名:updateProjectShelvesStatus")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目管理", content = "Web端管理员上(下)架项目")
|
||||
public BaseResponse<Boolean> updateProjectShelvesStatus(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
// 获取当前服务类商品的上(下)架状态
|
||||
Long id = commonRequest.getId();
|
||||
Project project = projectService.getById(id);
|
||||
Boolean isShelves = project.getIsShelves();
|
||||
LambdaUpdateWrapper<Project> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(Project::getId, id).set(Project::getIsShelves, !isShelves);
|
||||
projectService.update(updateWrapper);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Web端管理员根据项目id修改项目状态
|
||||
* @param projectStatusUpdateRequest 项目状态更新请求体
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("status")
|
||||
@Operation(summary = "Web端管理员根据项目id修改项目状态", description = "参数:项目id,权限:管理员(admin, boss),方法名:updateProjectStatus")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目管理", content = "Web端管理员根据项目id修改项目状态")
|
||||
public BaseResponse<Boolean> updateProjectStatus(@Valid @RequestBody ProjectStatusUpdateRequest projectStatusUpdateRequest) {
|
||||
Long id = projectStatusUpdateRequest.getId();
|
||||
String projectStatus = projectStatusUpdateRequest.getProjectStatus();
|
||||
LambdaUpdateWrapper<Project> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(Project::getId, id).set(Project::getProjectStatus, projectStatus);
|
||||
projectService.update(updateWrapper);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.greenorange.promotion.controller.projectCommission;
|
||||
|
||||
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.projectCommission.ProjectCommissionAddRequest;
|
||||
import com.greenorange.promotion.model.dto.projectCommission.ProjectCommissionQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.projectCommission.ProjectCommissionUpdateRequest;
|
||||
import com.greenorange.promotion.model.entity.ProjectCommission;
|
||||
import com.greenorange.promotion.model.vo.projectCommission.ProjectCommissionVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.project.ProjectCommissionService;
|
||||
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("projectCommission")
|
||||
@Slf4j
|
||||
@Tag(name = "项目明细抽佣管理")
|
||||
public class ProjectCommissionController {
|
||||
|
||||
@Resource
|
||||
private ProjectCommissionService projectCommissionService;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
/**
|
||||
* web端管理员添加项目明细抽佣
|
||||
* @param projectCommissionAddRequest 项目明细抽佣添加请求体
|
||||
* @return 是否添加成功
|
||||
*/
|
||||
@PostMapping("add")
|
||||
@Operation(summary = "web端管理员添加项目明细抽佣", description = "参数:项目明细抽佣添加请求体,权限:管理员,方法名:addProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目明细抽佣管理", content = "web端管理员添加项目明细抽佣")
|
||||
public BaseResponse<Boolean> addProjectCommission(@Valid @RequestBody ProjectCommissionAddRequest projectCommissionAddRequest) {
|
||||
ProjectCommission projectCommission = commonService.copyProperties(projectCommissionAddRequest, ProjectCommission.class);
|
||||
projectCommissionService.save(projectCommission);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id修改项目明细抽佣信息
|
||||
* @param projectCommissionUpdateRequest 项目明细抽佣更新请求体
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("update")
|
||||
@Operation(summary = "web端管理员更新项目明细抽佣", description = "参数:项目明细抽佣更新请求体,权限:管理员,方法名:updateProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目明细抽佣管理", content = "web端管理员根据id修改项目明细抽佣信息")
|
||||
public BaseResponse<Boolean> updateProjectCommission(@Valid @RequestBody ProjectCommissionUpdateRequest projectCommissionUpdateRequest) {
|
||||
ProjectCommission projectCommission = commonService.copyProperties(projectCommissionUpdateRequest, ProjectCommission.class);
|
||||
projectCommissionService.updateById(projectCommission);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id删除项目明细抽佣
|
||||
* @param commonRequest 项目明细抽佣删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
@Operation(summary = "web端管理员根据id删除项目明细抽佣", description = "参数:项目明细抽佣删除请求体,权限:管理员,方法名:delProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目明细抽佣管理", content = "web端管理员根据id删除项目明细抽佣")
|
||||
public BaseResponse<Boolean> delProjectCommission(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
projectCommissionService.removeById(id);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员批量删除项目明细抽佣
|
||||
* @param commonBatchRequest 项目明细抽佣批量删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delBatch")
|
||||
@Operation(summary = "web端管理员批量删除项目明细抽佣", description = "参数:项目明细抽佣批量删除请求体,权限:管理员,方法名:delBatchProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目明细抽佣管理", content = "web端管理员批量删除项目明细抽佣")
|
||||
public BaseResponse<Boolean> delBatchProjectCommission(@Valid @RequestBody CommonBatchRequest commonBatchRequest) {
|
||||
List<Long> ids = commonBatchRequest.getIds();
|
||||
projectCommissionService.removeByIds(ids);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id查询项目明细抽佣
|
||||
* @param commonRequest 项目明细抽佣查询请求体
|
||||
* @return 项目明细抽佣信息
|
||||
*/
|
||||
@PostMapping("queryById")
|
||||
@Operation(summary = "web端管理员根据id查询项目明细抽佣", description = "参数:项目明细抽佣查询请求体,权限:管理员,方法名:queryProjectCommissionById")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "项目明细抽佣管理", content = "web端管理员根据id查询项目明细抽佣")
|
||||
public BaseResponse<ProjectCommissionVO> queryProjectCommissionById(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
ProjectCommission projectCommission = projectCommissionService.getById(id);
|
||||
ThrowUtils.throwIf(projectCommission == null, ErrorCode.OPERATION_ERROR, "当前项目明细抽佣不存在");
|
||||
ProjectCommissionVO projectCommissionVO = commonService.copyProperties(projectCommission, ProjectCommissionVO.class);
|
||||
return ResultUtils.success(projectCommissionVO);
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * Web端管理员分页查询项目明细抽佣
|
||||
// * @param projectCommissionQueryRequest 项目明细抽佣查询请求体
|
||||
// * @return 项目明细抽佣列表
|
||||
// */
|
||||
// @PostMapping("page")
|
||||
// @Operation(summary = "Web端管理员分页查询项目明细抽佣", description = "参数:项目明细抽佣查询请求体,权限:管理员,方法名:listProjectCommissionByPage")
|
||||
// @RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
// @SysLog(title = "项目明细抽佣管理", content = "Web端管理员分页查询项目明细抽佣")
|
||||
// public BaseResponse<Page<ProjectCommissionVO>> listProjectCommissionByPage(@Valid @RequestBody ProjectCommissionQueryRequest projectCommissionQueryRequest) {
|
||||
// long current = projectCommissionQueryRequest.getCurrent();
|
||||
// long pageSize = projectCommissionQueryRequest.getPageSize();
|
||||
// QueryWrapper<ProjectCommission> queryWrapper = projectCommissionService.getQueryWrapper(projectCommissionQueryRequest);
|
||||
// Page<ProjectCommission> page = projectCommissionService.page(new Page<>(current, pageSize), queryWrapper);
|
||||
// List<ProjectCommission> projectCommissionList = page.getRecords();
|
||||
// List<ProjectCommissionVO> projectCommissionVOList = commonService.convertList(projectCommissionList, ProjectCommissionVO.class);
|
||||
// Page<ProjectCommissionVO> voPage = new Page<>(current, pageSize);
|
||||
// voPage.setRecords(projectCommissionVOList);
|
||||
// voPage.setPages(page.getPages());
|
||||
// voPage.setTotal(page.getTotal());
|
||||
// return ResultUtils.success(voPage);
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.greenorange.promotion.controller.subUserProjectCommission;
|
||||
|
||||
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.subUserProjectCommission.SubUserProjectCommissionAddRequest;
|
||||
import com.greenorange.promotion.model.dto.subUserProjectCommission.SubUserProjectCommissionQueryRequest;
|
||||
import com.greenorange.promotion.model.dto.subUserProjectCommission.SubUserProjectCommissionUpdateRequest;
|
||||
import com.greenorange.promotion.model.entity.SubUserProjectCommission;
|
||||
import com.greenorange.promotion.model.vo.subUserProjectCommission.SubUserProjectCommissionVO;
|
||||
import com.greenorange.promotion.service.common.CommonService;
|
||||
import com.greenorange.promotion.service.project.SubUserProjectCommissionService;
|
||||
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("subUserProjectCommission")
|
||||
@Slf4j
|
||||
@Tag(name = "下级用户项目明细抽佣管理")
|
||||
public class SubUserProjectCommissionController {
|
||||
|
||||
@Resource
|
||||
private SubUserProjectCommissionService subUserProjectCommissionService;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
/**
|
||||
* web端管理员添加下级用户项目明细抽佣
|
||||
* @param subUserProjectCommissionAddRequest 下级用户项目明细抽佣添加请求体
|
||||
* @return 是否添加成功
|
||||
*/
|
||||
@PostMapping("add")
|
||||
@Operation(summary = "web端管理员添加下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣添加请求体,权限:管理员,方法名:addSubUserProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "下级用户项目明细抽佣管理", content = "web端管理员添加下级用户项目明细抽佣")
|
||||
public BaseResponse<Boolean> addSubUserProjectCommission(@Valid @RequestBody SubUserProjectCommissionAddRequest subUserProjectCommissionAddRequest) {
|
||||
SubUserProjectCommission subUserProjectCommission = commonService.copyProperties(subUserProjectCommissionAddRequest, SubUserProjectCommission.class);
|
||||
subUserProjectCommissionService.save(subUserProjectCommission);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id修改下级用户项目明细抽佣信息
|
||||
* @param subUserProjectCommissionUpdateRequest 下级用户项目明细抽佣更新请求体
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("update")
|
||||
@Operation(summary = "web端管理员更新下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣更新请求体,权限:管理员,方法名:updateSubUserProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "下级用户项目明细抽佣管理", content = "web端管理员根据id修改下级用户项目明细抽佣信息")
|
||||
public BaseResponse<Boolean> updateSubUserProjectCommission(@Valid @RequestBody SubUserProjectCommissionUpdateRequest subUserProjectCommissionUpdateRequest) {
|
||||
SubUserProjectCommission subUserProjectCommission = commonService.copyProperties(subUserProjectCommissionUpdateRequest, SubUserProjectCommission.class);
|
||||
subUserProjectCommissionService.updateById(subUserProjectCommission);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id删除下级用户项目明细抽佣
|
||||
* @param commonRequest 下级用户项目明细抽佣删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
@Operation(summary = "web端管理员根据id删除下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣删除请求体,权限:管理员,方法名:delSubUserProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "下级用户项目明细抽佣管理", content = "web端管理员根据id删除下级用户项目明细抽佣")
|
||||
public BaseResponse<Boolean> delSubUserProjectCommission(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
subUserProjectCommissionService.removeById(id);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员批量删除下级用户项目明细抽佣
|
||||
* @param commonBatchRequest 下级用户项目明细抽佣批量删除请求体
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@PostMapping("delBatch")
|
||||
@Operation(summary = "web端管理员批量删除下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣批量删除请求体,权限:管理员,方法名:delBatchSubUserProjectCommission")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "下级用户项目明细抽佣管理", content = "web端管理员批量删除下级用户项目明细抽佣")
|
||||
public BaseResponse<Boolean> delBatchSubUserProjectCommission(@Valid @RequestBody CommonBatchRequest commonBatchRequest) {
|
||||
List<Long> ids = commonBatchRequest.getIds();
|
||||
subUserProjectCommissionService.removeByIds(ids);
|
||||
return ResultUtils.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* web端管理员根据id查询下级用户项目明细抽佣
|
||||
* @param commonRequest 下级用户项目明细抽佣查询请求体
|
||||
* @return 下级用户项目明细抽佣信息
|
||||
*/
|
||||
@PostMapping("queryById")
|
||||
@Operation(summary = "web端管理员根据id查询下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣查询请求体,权限:管理员,方法名:querySubUserProjectCommissionById")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@SysLog(title = "下级用户项目明细抽佣管理", content = "web端管理员根据id查询下级用户项目明细抽佣")
|
||||
public BaseResponse<SubUserProjectCommissionVO> querySubUserProjectCommissionById(@Valid @RequestBody CommonRequest commonRequest) {
|
||||
Long id = commonRequest.getId();
|
||||
SubUserProjectCommission subUserProjectCommission = subUserProjectCommissionService.getById(id);
|
||||
ThrowUtils.throwIf(subUserProjectCommission == null, ErrorCode.OPERATION_ERROR, "当前下级用户项目明细抽佣不存在");
|
||||
SubUserProjectCommissionVO subUserProjectCommissionVO = commonService.copyProperties(subUserProjectCommission, SubUserProjectCommissionVO.class);
|
||||
return ResultUtils.success(subUserProjectCommissionVO);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Web端管理员分页查询下级用户项目明细抽佣
|
||||
// * @param subUserProjectCommissionQueryRequest 下级用户项目明细抽佣查询请求体
|
||||
// * @return 下级用户项目明细抽佣列表
|
||||
// */
|
||||
// @PostMapping("page")
|
||||
// @Operation(summary = "Web端管理员分页查询下级用户项目明细抽佣", description = "参数:下级用户项目明细抽佣查询请求体,权限:管理员,方法名:listSubUserProjectCommissionByPage")
|
||||
// @RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
// @SysLog(title = "下级用户项目明细抽佣管理", content = "Web端管理员分页查询下级用户项目明细抽佣")
|
||||
// public BaseResponse<Page<SubUserProjectCommissionVO>> listSubUserProjectCommissionByPage(@Valid @RequestBody SubUserProjectCommissionQueryRequest subUserProjectCommissionQueryRequest) {
|
||||
// long current = subUserProjectCommissionQueryRequest.getCurrent();
|
||||
// long pageSize = subUserProjectCommissionQueryRequest.getPageSize();
|
||||
// QueryWrapper<SubUserProjectCommission> queryWrapper = subUserProjectCommissionService.getQueryWrapper(subUserProjectCommissionQueryRequest);
|
||||
// Page<SubUserProjectCommission> page = subUserProjectCommissionService.page(new Page<>(current, pageSize), queryWrapper);
|
||||
// List<SubUserProjectCommission> subUserProjectCommissionList = page.getRecords();
|
||||
// List<SubUserProjectCommissionVO> subUserProjectCommissionVOList = commonService.convertList(subUserProjectCommissionList, SubUserProjectCommissionVO.class);
|
||||
// Page<SubUserProjectCommissionVO> voPage = new Page<>(current, pageSize);
|
||||
// voPage.setRecords(subUserProjectCommissionVOList);
|
||||
// voPage.setPages(page.getPages());
|
||||
// voPage.setTotal(page.getTotal());
|
||||
// return ResultUtils.success(voPage);
|
||||
// }
|
||||
}
|
|
@ -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 = "UserProject";
|
||||
private static final String ENTITY_NAME = "SubUserProjectCommission";
|
||||
// 表名
|
||||
private static final String TABLE_NAME = "user_project";
|
||||
private static final String TABLE_NAME = "sub_user_project_commission";
|
||||
// 实体类属性名
|
||||
private static final String ENTITY_NAME_LOWER = "userProject";
|
||||
private static final String ENTITY_NAME_LOWER = "subUserProjectCommission";
|
||||
|
||||
// 父包名
|
||||
private static final String PARENT_PATH = "com.greenorange.promotion";
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.greenorange.promotion.mapper;
|
||||
|
||||
import com.greenorange.promotion.model.entity.ProjectCommission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【project_commission(项目明细抽佣表)】的数据库操作Mapper
|
||||
* @createDate 2025-05-09 18:42:17
|
||||
* @Entity com.greenorange.promotion.model.entity.ProjectCommission
|
||||
*/
|
||||
public interface ProjectCommissionMapper extends BaseMapper<ProjectCommission> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.greenorange.promotion.mapper;
|
||||
|
||||
import com.greenorange.promotion.model.entity.SubUserProjectCommission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【sub_user_project_commission(下级用户项目明细抽佣表)】的数据库操作Mapper
|
||||
* @createDate 2025-05-09 19:06:19
|
||||
* @Entity com.greenorange.promotion.model.entity.SubUserProjectCommission
|
||||
*/
|
||||
public interface SubUserProjectCommissionMapper extends BaseMapper<SubUserProjectCommission> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -61,10 +61,10 @@ public class FileInfoAddRequest implements Serializable {
|
|||
private String fileView;
|
||||
|
||||
/**
|
||||
* 文件业务类型(头像,项目,富文本,默认)
|
||||
* 文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]
|
||||
*/
|
||||
@FileEnumValue(enumClass = FileUploadBizEnum.class)
|
||||
@Schema(description = "文件业务类型(头像,项目,富文本,默认)", example = "avatar")
|
||||
@Schema(description = "文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]", example = "avatar")
|
||||
private String biz;
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,10 +68,10 @@ public class FileInfoUpdateRequest implements Serializable {
|
|||
private String fileView;
|
||||
|
||||
/**
|
||||
* 文件业务类型(头像,项目,富文本,默认)
|
||||
* 文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]
|
||||
*/
|
||||
@FileEnumValue(enumClass = FileUploadBizEnum.class)
|
||||
@Schema(description = "文件业务类型(头像,项目,富文本,默认)", example = "avatar")
|
||||
@Schema(description = "文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]", example = "default")
|
||||
private String biz;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,10 +13,10 @@ import java.io.Serializable;
|
|||
public class UploadFileRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 文件业务类型(头像,项目,富文本,默认)
|
||||
* 文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]
|
||||
*/
|
||||
@FileEnumValue(enumClass = FileUploadBizEnum.class)
|
||||
@Schema(description = "文件业务类型(头像,项目,富文本,默认)", example = "avatar")
|
||||
@Schema(description = "文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]", example = "default")
|
||||
private String biz;
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
package com.greenorange.promotion.model.dto.project;
|
||||
|
||||
import com.greenorange.promotion.annotation.UserEnumValue;
|
||||
import com.greenorange.promotion.annotation.ProjectStatusEnumValue;
|
||||
import com.greenorange.promotion.model.dto.projectDetail.ProjectDetailAddRequest;
|
||||
import com.greenorange.promotion.model.dto.projectDetail.ProjectDetailUpdateRequest;
|
||||
import com.greenorange.promotion.model.dto.projectNotification.ProjectNotificationAddRequest;
|
||||
import com.greenorange.promotion.model.entity.ProjectNotification;
|
||||
import com.greenorange.promotion.model.enums.ProjectStatusEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目添加请求体
|
||||
|
@ -19,13 +24,14 @@ import java.math.BigDecimal;
|
|||
@Schema(description = "项目添加请求体", requiredProperties = {
|
||||
"projectName",
|
||||
"projectImage",
|
||||
"projectSettlementCycle",
|
||||
"maxPromoterCount",
|
||||
"projectStatus",
|
||||
"projectDescription",
|
||||
"settlementDesc",
|
||||
"projectDesc",
|
||||
"projectFlow",
|
||||
"applyPromoCodeDesc",
|
||||
"projectSettlementCycle",
|
||||
"maxPromoterCount",
|
||||
})
|
||||
public class ProjectAddRequest implements Serializable {
|
||||
|
||||
|
@ -43,6 +49,27 @@ public class ProjectAddRequest implements Serializable {
|
|||
@Schema(description = "项目图片URL", example = "http://xxx.png")
|
||||
private String projectImage;
|
||||
|
||||
/**
|
||||
* 项目结算周期
|
||||
*/
|
||||
@Min(value = 1, message = "项目结算周期不能小于1")
|
||||
@Schema(description = "项目结算周期", example = "2")
|
||||
private Integer projectSettlementCycle;
|
||||
|
||||
/**
|
||||
* 最大推广人数
|
||||
*/
|
||||
@Min(value = 1, message = "最大推广人数不能小于1")
|
||||
@Schema(description = "最大推广人数", example = "200")
|
||||
private Integer maxPromoterCount;
|
||||
|
||||
/**
|
||||
* 项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]
|
||||
*/
|
||||
@ProjectStatusEnumValue(enumClass = ProjectStatusEnum.class)
|
||||
@Schema(description = "项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]", example = "running")
|
||||
private String projectStatus;
|
||||
|
||||
/**
|
||||
* 项目简介
|
||||
*/
|
||||
|
@ -78,20 +105,6 @@ public class ProjectAddRequest implements Serializable {
|
|||
@Schema(description = "申请推广码说明(富文本)", example = "富文本")
|
||||
private String applyPromoCodeDesc;
|
||||
|
||||
/**
|
||||
* 项目结算周期
|
||||
*/
|
||||
@Min(value = 1, message = "项目结算周期不能小于1")
|
||||
@Schema(description = "项目结算周期", example = "2")
|
||||
private Integer projectSettlementCycle;
|
||||
|
||||
/**
|
||||
* 最大推广人数
|
||||
*/
|
||||
@Min(value = 1, message = "最大推广人数不能小于1")
|
||||
@Schema(description = "最大推广人数", example = "200")
|
||||
private Integer maxPromoterCount;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.greenorange.promotion.model.dto.project;
|
||||
|
||||
import com.greenorange.promotion.annotation.ProjectStatusEnumValue;
|
||||
import com.greenorange.promotion.model.enums.ProjectStatusEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 项目状态更新请求体
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "项目状态更新请求体", requiredProperties = {"id", "projectStatus"})
|
||||
public class ProjectStatusUpdateRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 项目 ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目 ID不能小于1")
|
||||
@Schema(description = "项目 ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]
|
||||
*/
|
||||
@ProjectStatusEnumValue(enumClass = ProjectStatusEnum.class)
|
||||
@Schema(description = "项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]", example = "running")
|
||||
private String projectStatus;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.greenorange.promotion.model.dto.projectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 项目明细抽佣添加请求体
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "项目明细抽佣添加请求体", requiredProperties = {
|
||||
"projectDetailId",
|
||||
"myUnitPrice",
|
||||
"currentCommissionRate",
|
||||
"projectId",
|
||||
"userId",
|
||||
})
|
||||
public class ProjectCommissionAddRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.greenorange.promotion.model.dto.projectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.greenorange.promotion.common.PageRequest;
|
||||
|
||||
/**
|
||||
* 项目明细抽佣查询请求体,继承自分页请求 PageRequest
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "项目明细抽佣查询请求体", requiredProperties = {"current", "pageSize"})
|
||||
public class ProjectCommissionQueryRequest extends PageRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 抽佣记录ID
|
||||
*/
|
||||
@Min(value = 1L, message = "抽佣记录ID ID不能小于1")
|
||||
@Schema(description = "抽佣记录ID", example = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.greenorange.promotion.model.dto.projectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 项目明细抽佣更新请求体
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "项目明细抽佣更新请求体", requiredProperties = {
|
||||
"id",
|
||||
"projectDetailId",
|
||||
"myUnitPrice",
|
||||
"currentCommissionRate",
|
||||
"projectId",
|
||||
"userId",
|
||||
})
|
||||
public class ProjectCommissionUpdateRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 抽佣记录ID
|
||||
*/
|
||||
@Min(value = 1L, message = "抽佣记录ID ID不能小于1")
|
||||
@Schema(description = "抽佣记录ID", example = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -24,29 +24,29 @@ public class PromoCodeAddRequest implements Serializable {
|
|||
* 推广码信息key
|
||||
*/
|
||||
@NotBlank(message = "推广码信息key不能为空")
|
||||
@Schema(description = "推广码信息key", example = "")
|
||||
@Schema(description = "推广码信息key", example = "ykxy227")
|
||||
private String promoCodeInfoKey;
|
||||
|
||||
/**
|
||||
* 推广码链接
|
||||
*/
|
||||
@NotBlank(message = "推广码链接不能为空")
|
||||
@Schema(description = "推广码链接", example = "")
|
||||
@Schema(description = "推广码链接", example = "mp://y04CZgGkCBmIaZd")
|
||||
private String promoCodeLink;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
@Schema(description = "项目ID", example = "1")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 推广码状态
|
||||
* 推广码状态(true:占用,false:空闲)
|
||||
*/
|
||||
@NotBlank(message = "推广码状态不能为空")
|
||||
@Schema(description = "推广码状态", example = "")
|
||||
private String promoCodeStatus;
|
||||
@Schema(description = "推广码状态(true:占用,false:空闲)", example = "false")
|
||||
private Boolean promoCodeStatus;
|
||||
|
||||
|
||||
@Serial
|
||||
|
|
|
@ -20,36 +20,36 @@ public class PromoCodeQueryRequest extends PageRequest implements Serializable {
|
|||
* 推广码ID
|
||||
*/
|
||||
@Min(value = 1L, message = "推广码ID ID不能小于1")
|
||||
@Schema(description = "推广码ID", example = "")
|
||||
@Schema(description = "推广码ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推广码信息key
|
||||
*/
|
||||
@NotBlank(message = "推广码信息key不能为空")
|
||||
@Schema(description = "推广码信息key", example = "")
|
||||
@Schema(description = "推广码信息key", example = "ykxy227")
|
||||
private String promoCodeInfoKey;
|
||||
|
||||
/**
|
||||
* 推广码链接
|
||||
*/
|
||||
@NotBlank(message = "推广码链接不能为空")
|
||||
@Schema(description = "推广码链接", example = "")
|
||||
@Schema(description = "推广码链接", example = "mp://y04CZgGkCBmIaZd")
|
||||
private String promoCodeLink;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
@Schema(description = "项目ID", example = "1")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 推广码状态
|
||||
* 推广码状态(true:占用,false:空闲)
|
||||
*/
|
||||
@NotBlank(message = "推广码状态不能为空")
|
||||
@Schema(description = "推广码状态", example = "")
|
||||
private String promoCodeStatus;
|
||||
@Schema(description = "推广码状态(true:占用,false:空闲)", example = "false")
|
||||
private Boolean promoCodeStatus;
|
||||
|
||||
|
||||
@Serial
|
||||
|
|
|
@ -25,36 +25,36 @@ public class PromoCodeUpdateRequest implements Serializable {
|
|||
* 推广码ID
|
||||
*/
|
||||
@Min(value = 1L, message = "推广码ID ID不能小于1")
|
||||
@Schema(description = "推广码ID", example = "")
|
||||
@Schema(description = "推广码ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推广码信息key
|
||||
*/
|
||||
@NotBlank(message = "推广码信息key不能为空")
|
||||
@Schema(description = "推广码信息key", example = "")
|
||||
@Schema(description = "推广码信息key", example = "ykxy227")
|
||||
private String promoCodeInfoKey;
|
||||
|
||||
/**
|
||||
* 推广码链接
|
||||
*/
|
||||
@NotBlank(message = "推广码链接不能为空")
|
||||
@Schema(description = "推广码链接", example = "")
|
||||
@Schema(description = "推广码链接", example = "mp://y04CZgGkCBmIaZd")
|
||||
private String promoCodeLink;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
@Schema(description = "项目ID", example = "1")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 推广码状态
|
||||
* 推广码状态(true:占用,false:空闲)
|
||||
*/
|
||||
@NotBlank(message = "推广码状态不能为空")
|
||||
@Schema(description = "推广码状态", example = "")
|
||||
private String promoCodeStatus;
|
||||
@Schema(description = "推广码状态(true:占用,false:空闲)", example = "false")
|
||||
private Boolean promoCodeStatus;
|
||||
|
||||
|
||||
@Serial
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
package com.greenorange.promotion.model.dto.subUserProjectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 下级用户项目明细抽佣添加请求体
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "下级用户项目明细抽佣添加请求体", requiredProperties = {
|
||||
"projectDetailId",
|
||||
"myUnitPrice",
|
||||
"currentCommissionRate",
|
||||
"subUserId",
|
||||
"projectId",
|
||||
"userId",
|
||||
})
|
||||
public class SubUserProjectCommissionAddRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 下级用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "下级用户ID ID不能小于1")
|
||||
@Schema(description = "下级用户ID", example = "")
|
||||
private Long subUserId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.greenorange.promotion.model.dto.subUserProjectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.greenorange.promotion.common.PageRequest;
|
||||
|
||||
/**
|
||||
* 下级用户项目明细抽佣查询请求体,继承自分页请求 PageRequest
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "下级用户项目明细抽佣查询请求体", requiredProperties = {"current", "pageSize"})
|
||||
public class SubUserProjectCommissionQueryRequest extends PageRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 下级用户抽佣记录ID
|
||||
*/
|
||||
@Min(value = 1L, message = "下级用户抽佣记录ID ID不能小于1")
|
||||
@Schema(description = "下级用户抽佣记录ID", example = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 下级用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "下级用户ID ID不能小于1")
|
||||
@Schema(description = "下级用户ID", example = "")
|
||||
private Long subUserId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.greenorange.promotion.model.dto.subUserProjectCommission;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 下级用户项目明细抽佣更新请求体
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "下级用户项目明细抽佣更新请求体", requiredProperties = {
|
||||
"id",
|
||||
"projectDetailId",
|
||||
"myUnitPrice",
|
||||
"currentCommissionRate",
|
||||
"subUserId",
|
||||
"projectId",
|
||||
"userId",
|
||||
})
|
||||
public class SubUserProjectCommissionUpdateRequest implements Serializable {
|
||||
|
||||
/**
|
||||
* 下级用户抽佣记录ID
|
||||
*/
|
||||
@Min(value = 1L, message = "下级用户抽佣记录ID ID不能小于1")
|
||||
@Schema(description = "下级用户抽佣记录ID", example = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目明细ID ID不能小于1")
|
||||
@Schema(description = "项目明细ID", example = "")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 下级用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "下级用户ID ID不能小于1")
|
||||
@Schema(description = "下级用户ID", example = "")
|
||||
private Long subUserId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Min(value = 1L, message = "项目ID ID不能小于1")
|
||||
@Schema(description = "项目ID", example = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Min(value = 1L, message = "用户ID ID不能小于1")
|
||||
@Schema(description = "用户ID", example = "")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -54,7 +54,7 @@ public class FileInfo implements Serializable {
|
|||
private String fileView;
|
||||
|
||||
/**
|
||||
* 文件业务类型(头像,项目,富文本,默认)
|
||||
* 文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]
|
||||
*/
|
||||
private String biz;
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ public class Project implements Serializable {
|
|||
*/
|
||||
private String projectDescription;
|
||||
|
||||
/**
|
||||
* 项目价格
|
||||
*/
|
||||
private BigDecimal projectPrice;
|
||||
|
||||
/**
|
||||
* 结算说明(富文本)
|
||||
*/
|
||||
|
@ -73,7 +78,7 @@ public class Project implements Serializable {
|
|||
private Integer maxPromoterCount;
|
||||
|
||||
/**
|
||||
* 项目状态(项目运行|人数已满|项目暂停)
|
||||
* 项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]
|
||||
*/
|
||||
private String projectStatus;
|
||||
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
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 project_commission
|
||||
*/
|
||||
@TableName(value ="project_commission")
|
||||
@Data
|
||||
public class ProjectCommission implements Serializable {
|
||||
/**
|
||||
* 抽佣记录ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -39,7 +39,7 @@ public class PromoCode implements Serializable {
|
|||
/**
|
||||
* 推广码状态
|
||||
*/
|
||||
private Object promoCodeStatus;
|
||||
private Boolean promoCodeStatus;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
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 sub_user_project_commission
|
||||
*/
|
||||
@TableName(value ="sub_user_project_commission")
|
||||
@Data
|
||||
public class SubUserProjectCommission implements Serializable {
|
||||
/**
|
||||
* 下级用户抽佣记录ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 下级用户ID
|
||||
*/
|
||||
private Long subUserId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -16,7 +16,8 @@ public enum FileUploadBizEnum {
|
|||
|
||||
AVATAR("用户头像", "avatar"),
|
||||
PROJECT("项目", "project"),
|
||||
RICH_TEXT("富文本", "richText");
|
||||
RICH_TEXT("富文本", "richText"),
|
||||
DEFAULT("默认", "default");
|
||||
|
||||
private final String text;
|
||||
private final String value;
|
||||
|
|
|
@ -51,9 +51,9 @@ public class FileInfoVO implements Serializable {
|
|||
private String fileView;
|
||||
|
||||
/**
|
||||
* 文件业务类型(头像,项目,富文本,默认)
|
||||
* 文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]
|
||||
*/
|
||||
@Schema(description = "文件业务类型(头像,项目,富文本,默认)", example = "user_avatar")
|
||||
@Schema(description = "文件业务类型[头像(avatar)|项目(project)|富文本(richText)|默认(default))]", example = "default")
|
||||
private String biz;
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,6 +27,12 @@ public class ProjectVO implements Serializable {
|
|||
@Schema(description = "项目名称", example = "美团省钱包")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 项目价格
|
||||
*/
|
||||
@Schema(description = "项目价格", example = "0.72")
|
||||
private BigDecimal projectPrice;
|
||||
|
||||
/**
|
||||
* 项目图片URL
|
||||
*/
|
||||
|
@ -82,9 +88,9 @@ public class ProjectVO implements Serializable {
|
|||
private Integer maxPromoterCount;
|
||||
|
||||
/**
|
||||
* 项目状态(项目运行|人数已满|项目暂停)
|
||||
* 项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]
|
||||
*/
|
||||
@Schema(description = "项目状态", example = "项目运行")
|
||||
@Schema(description = "项目状态[项目运行(running)|人数已满(full)|项目暂停(paused)]", example = "running")
|
||||
private String projectStatus;
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
package com.greenorange.promotion.model.vo.projectCommission;
|
||||
|
||||
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 ProjectCommissionVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 项目明细抽佣ID
|
||||
*/
|
||||
@Schema(description = "项目明细抽佣ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Schema(description = "项目明细ID", example = "${field.example}")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "${field.example}")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "${field.example}")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Schema(description = "项目ID", example = "${field.example}")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Schema(description = "用户ID", example = "${field.example}")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -23,26 +23,26 @@ public class PromoCodeVO implements Serializable {
|
|||
/**
|
||||
* 推广码信息key
|
||||
*/
|
||||
@Schema(description = "推广码信息key", example = "${field.example}")
|
||||
@Schema(description = "推广码信息key", example = "ykxy227")
|
||||
private String promoCodeInfoKey;
|
||||
|
||||
/**
|
||||
* 推广码链接
|
||||
*/
|
||||
@Schema(description = "推广码链接", example = "${field.example}")
|
||||
@Schema(description = "推广码链接", example = "mp://y04CZgGkCBmIaZd")
|
||||
private String promoCodeLink;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Schema(description = "项目ID", example = "${field.example}")
|
||||
@Schema(description = "项目ID", example = "1")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 推广码状态
|
||||
* 推广码状态(true:占用,false:空闲)
|
||||
*/
|
||||
@Schema(description = "推广码状态", example = "${field.example}")
|
||||
private String promoCodeStatus;
|
||||
@Schema(description = "推广码状态(true:占用,false:空闲)", example = "false")
|
||||
private Boolean promoCodeStatus;
|
||||
|
||||
|
||||
@Serial
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package com.greenorange.promotion.model.vo.subUserProjectCommission;
|
||||
|
||||
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 SubUserProjectCommissionVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 下级用户项目明细抽佣ID
|
||||
*/
|
||||
@Schema(description = "下级用户项目明细抽佣ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目明细ID
|
||||
*/
|
||||
@Schema(description = "项目明细ID", example = "${field.example}")
|
||||
private Long projectDetailId;
|
||||
|
||||
/**
|
||||
* 我的单价
|
||||
*/
|
||||
@Schema(description = "我的单价", example = "${field.example}")
|
||||
private BigDecimal myUnitPrice;
|
||||
|
||||
/**
|
||||
* 当前抽佣比例
|
||||
*/
|
||||
@Schema(description = "当前抽佣比例", example = "${field.example}")
|
||||
private BigDecimal currentCommissionRate;
|
||||
|
||||
/**
|
||||
* 下级用户ID
|
||||
*/
|
||||
@Schema(description = "下级用户ID", example = "${field.example}")
|
||||
private Long subUserId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@Schema(description = "项目ID", example = "${field.example}")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Schema(description = "用户ID", example = "${field.example}")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.greenorange.promotion.service.project;
|
||||
|
||||
import com.greenorange.promotion.model.entity.ProjectCommission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【project_commission(项目明细抽佣表)】的数据库操作Service
|
||||
* @createDate 2025-05-09 18:42:17
|
||||
*/
|
||||
public interface ProjectCommissionService extends IService<ProjectCommission> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.greenorange.promotion.service.project;
|
||||
|
||||
import com.greenorange.promotion.model.entity.SubUserProjectCommission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【sub_user_project_commission(下级用户项目明细抽佣表)】的数据库操作Service
|
||||
* @createDate 2025-05-09 19:06:19
|
||||
*/
|
||||
public interface SubUserProjectCommissionService extends IService<SubUserProjectCommission> {
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.greenorange.promotion.service.project.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.greenorange.promotion.model.entity.ProjectCommission;
|
||||
import com.greenorange.promotion.service.project.ProjectCommissionService;
|
||||
import com.greenorange.promotion.mapper.ProjectCommissionMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【project_commission(项目明细抽佣表)】的数据库操作Service实现
|
||||
* @createDate 2025-05-09 18:42:17
|
||||
*/
|
||||
@Service
|
||||
public class ProjectCommissionServiceImpl extends ServiceImpl<ProjectCommissionMapper, ProjectCommission>
|
||||
implements ProjectCommissionService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.greenorange.promotion.service.project.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.greenorange.promotion.model.entity.SubUserProjectCommission;
|
||||
import com.greenorange.promotion.service.project.SubUserProjectCommissionService;
|
||||
import com.greenorange.promotion.mapper.SubUserProjectCommissionMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 35880
|
||||
* @description 针对表【sub_user_project_commission(下级用户项目明细抽佣表)】的数据库操作Service实现
|
||||
* @createDate 2025-05-09 19:06:19
|
||||
*/
|
||||
@Service
|
||||
public class SubUserProjectCommissionServiceImpl extends ServiceImpl<SubUserProjectCommissionMapper, SubUserProjectCommission>
|
||||
implements SubUserProjectCommissionService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
24
src/main/resources/mapper/ProjectCommissionMapper.xml
Normal file
24
src/main/resources/mapper/ProjectCommissionMapper.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?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.ProjectCommissionMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.greenorange.promotion.model.entity.ProjectCommission">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="projectDetailId" column="projectDetailId" jdbcType="BIGINT"/>
|
||||
<result property="myUnitPrice" column="myUnitPrice" jdbcType="DECIMAL"/>
|
||||
<result property="currentCommissionRate" column="currentCommissionRate" jdbcType="DECIMAL"/>
|
||||
<result property="projectId" column="projectId" jdbcType="BIGINT"/>
|
||||
<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,projectDetailId,myUnitPrice,
|
||||
currentCommissionRate,projectId,userId,
|
||||
isDelete,createTime,updateTime
|
||||
</sql>
|
||||
</mapper>
|
|
@ -8,6 +8,7 @@
|
|||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="projectName" column="projectName" jdbcType="VARCHAR"/>
|
||||
<result property="projectImage" column="projectImage" jdbcType="VARCHAR"/>
|
||||
<result property="projectPrice" column="projectPrice" jdbcType="DECIMAL"/>
|
||||
<result property="projectDescription" column="projectDescription" jdbcType="VARCHAR"/>
|
||||
<result property="settlementDesc" column="settlementDesc" jdbcType="VARCHAR"/>
|
||||
<result property="projectDesc" column="projectDesc" jdbcType="VARCHAR"/>
|
||||
|
|
26
src/main/resources/mapper/SubUserProjectCommissionMapper.xml
Normal file
26
src/main/resources/mapper/SubUserProjectCommissionMapper.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?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.SubUserProjectCommissionMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.greenorange.promotion.model.entity.SubUserProjectCommission">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="projectDetailId" column="projectDetailId" jdbcType="BIGINT"/>
|
||||
<result property="myUnitPrice" column="myUnitPrice" jdbcType="DECIMAL"/>
|
||||
<result property="currentCommissionRate" column="currentCommissionRate" jdbcType="DECIMAL"/>
|
||||
<result property="subUserId" column="subUserId" jdbcType="BIGINT"/>
|
||||
<result property="projectId" column="projectId" jdbcType="BIGINT"/>
|
||||
<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,projectDetailId,myUnitPrice,
|
||||
currentCommissionRate,subUserId,projectId,
|
||||
userId,isDelete,createTime,
|
||||
updateTime
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user