|
|
|
@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
|
|
import org.jeecg.modules.modulex.entity.Modulex; |
|
|
|
|
import org.jeecg.modules.modulex.service.IModulexService; |
|
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
|
@ -52,6 +54,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
public class FunctionxController extends JeecgController<Functionx, IFunctionxService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IFunctionxService functionxService; |
|
|
|
|
@Autowired |
|
|
|
|
private IModulexService modulexService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
@ -108,6 +112,14 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe |
|
|
|
|
@ApiOperation(value="功能管理-添加", notes="功能管理-添加") |
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<?> add(@RequestBody Functionx functionx) { |
|
|
|
|
QueryWrapper<Modulex> queryWrapper=new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("id",functionx.getModuleId()); |
|
|
|
|
Modulex one = modulexService.getOne(queryWrapper); |
|
|
|
|
if(one.getRelatedBean()==null){ |
|
|
|
|
return Result.error("请先为对应模块关联实体!!!"); |
|
|
|
|
} |
|
|
|
|
//感觉不符合逻辑,上级模块如果是已发布,然后新增也是已发布状态,那样发布按钮还有什么用??
|
|
|
|
|
// functionx.setWorkStatus(one.getWorkStatus());
|
|
|
|
|
functionxService.save(functionx); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
@ -198,9 +210,9 @@ public class FunctionxController extends JeecgController<Functionx, IFunctionxSe |
|
|
|
|
@GetMapping(value = "/bianma") |
|
|
|
|
public Result<?> moduleCode(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
String s=functionxService.findModuleCode(id); |
|
|
|
|
//后期放入返回值中,当前为返回信息
|
|
|
|
|
System.out.println(s); |
|
|
|
|
return Result.OK("编码"); |
|
|
|
|
// //后期放入返回值中,当前为返回信息
|
|
|
|
|
// System.out.println(s);
|
|
|
|
|
return Result.OK(s); |
|
|
|
|
} |
|
|
|
|
//在主界面判断一下登录角色,对操作栏进行替换
|
|
|
|
|
@GetMapping(value = "/loginrole") |
|
|
|
|