diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java index 64be759..11f67c8 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/bugx/controller/BugxController.java @@ -26,7 +26,6 @@ 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; @@ -93,7 +92,7 @@ public class BugxController extends JeecgController { queryWrapper.orderByDesc("bug_level"); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); List role = functionxMapper.findRole(user.getId()); - if (role.contains(RoleConstant.managementId) || role.contains(RoleConstant.adminId)) { + if (role.contains("1645284981182980098") || role.contains("f6817f48af4fb3af11b9e8bf182f618b")) { } else { //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到 queryWrapper.like("manager_users", user.getId()); @@ -197,8 +196,8 @@ public class BugxController extends JeecgController { 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); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java index 25fc9a2..bd1862f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functiontemplate/controller/FunctionTemplateController.java @@ -1,13 +1,18 @@ 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; @@ -18,12 +23,18 @@ 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; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java index 2edec78..3a47e8f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/controller/FunctionxController.java @@ -16,7 +16,6 @@ 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; @@ -79,7 +78,7 @@ public class FunctionxController extends JeecgController queryWrapper=new QueryWrapper<>(); LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); List role = functionxService.findRole(user.getId()); - if(role.contains(RoleConstant.managementId)||role.contains(RoleConstant.adminId)){ + if(role.contains("1645284981182980098")||role.contains("f6817f48af4fb3af11b9e8bf182f618b")){ }else{ //因为开发者是以id,id,id的方式存储,理论上可以用模糊查询到 queryWrapper.like("manager_users",user.getId()); @@ -220,11 +219,11 @@ public class FunctionxController extends JeecgController loginrole(@RequestParam(name="id",required=true) String id) { List list=functionxService.findRole(id); //如果角色是项目管理员或管理员 就返回1 其他的返回 2 - if(list.contains(RoleConstant.managementId)||list.contains(RoleConstant.adminId)){//是项目负责人,管理员也可以 - return Result.OK("1");} - else { - return Result.OK("2"); - } } + if(list.contains("1645284981182980098")||list.contains("f6817f48af4fb3af11b9e8bf182f618b"))//是项目负责人,管理员也可以 + 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); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java deleted file mode 100644 index 7aae808..0000000 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/entity/RoleConstant.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.jeecg.modules.demo.functionx.entity; - -public interface RoleConstant { - public final String adminId="f6817f48af4fb3af11b9e8bf182f618b"; - public final String managementId="1645284981182980098"; -} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java index 7532766..25b8fd0 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/controller/RulexController.java @@ -71,6 +71,7 @@ public class RulexController extends JeecgController { @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { +// QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(rulex, req.getParameterMap()); QueryWrapper queryWrapper=new QueryWrapper<>(); queryWrapper.eq("function_id",rulex.getFunctionId()); queryWrapper.orderByDesc("work_level");