项目明细调整

This commit is contained in:
2025-05-09 11:20:10 +08:00
parent 093c8332e6
commit a607eff4d8
12 changed files with 86 additions and 109 deletions

View File

@ -1,6 +1,8 @@
package com.greenorange.promotion.controller.project;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.greenorange.promotion.annotation.RequiresPermission;
import com.greenorange.promotion.annotation.SysLog;
@ -8,6 +10,7 @@ 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.BusinessException;
import com.greenorange.promotion.exception.ThrowUtils;
import com.greenorange.promotion.model.dto.CommonBatchRequest;
import com.greenorange.promotion.model.dto.CommonRequest;
@ -146,5 +149,25 @@ 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);
// }
}