master
YTD 2 years ago
parent f8904bf292
commit 75e03c263a
  1. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java
  2. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java
  3. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java
  4. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java

@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
@ -92,7 +93,7 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
queryWrapper.orderByDesc("bug_level");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxMapper.findRole(user.getId());
if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) {
if (role.contains(RoleConstant.managementId) || role.contains(RoleConstant.adminId)) {
} else {
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users", user.getId());
@ -196,8 +197,8 @@ public class BugxController extends JeecgController<Bugx, IBugxService> {
if (bugx.getBugStatus() == 4) {
return Result.error("已提交过!!");
}
if (bugx.getBugStatus() == 2)
return Result.error("当前BUG已解决!!");
if (bugx.getBugStatus() == 2){
return Result.error("当前BUG已解决!!");}
//提交时就相当于xiugai
bugx.setSubmitTime(new Date());
bugx.setBugStatus(4);

@ -1,18 +1,13 @@
package org.jeecg.modules.demo.functiontemplate.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
@ -23,18 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;

@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.entity.RoleConstant;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -78,7 +79,7 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
QueryWrapper<Functionx> queryWrapper=new QueryWrapper<>();
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> role = functionxService.findRole(user.getId());
if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){
if(role.contains(RoleConstant.managementId)||role.contains(RoleConstant.adminId)){
}else{
//因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到
queryWrapper.like("manager_users",user.getId());
@ -219,11 +220,11 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe
public Result<?> loginrole(@RequestParam(name="id",required=true) String id) {
List<String> list=functionxService.findRole(id);
//如果角色是项目管理员或管理员 就返回1 其他的返回 2
if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以
return Result.OK("1");
else
return Result.OK("2");
}
if(list.contains(RoleConstant.managementId)||list.contains(RoleConstant.adminId)){//是项目负责人,管理员也可以
return Result.OK("1");}
else {
return Result.OK("2");
} }
@GetMapping(value = "/fabu")
public Result<?> fabu(@RequestParam(name="id",required=true) String id) {
return functionxService.fabu(id);

@ -0,0 +1,6 @@
package org.jeecg.modules.demo.functionx.entity;
public interface RoleConstant {
public final String adminId="f6817f48af4fb3af11b9e8bf182f618b";
public final String managementId="1645284981182980098";
}
Loading…
Cancel
Save