@@ -26,9 +26,23 @@ | |||||
<artifactId>freemarker</artifactId> | <artifactId>freemarker</artifactId> | ||||
</dependency> | </dependency> | ||||
<!--Mysql数据库驱动--> | <!--Mysql数据库驱动--> | ||||
<!-- <dependency>--> | |||||
<!-- <groupId>mysql</groupId>--> | |||||
<!-- <artifactId>mysql-connector-java</artifactId>--> | |||||
<!-- </dependency>--> | |||||
<!--KingBase--> | |||||
<dependency> | <dependency> | ||||
<groupId>mysql</groupId> | |||||
<artifactId>mysql-connector-java</artifactId> | |||||
<groupId>com.kingbase8</groupId> | |||||
<artifactId>kingbase8-8.2.0</artifactId> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/src/lib/kingbase8-8.2.0.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.kingbase.dialect</groupId> | |||||
<artifactId>kingbase8-8.2.0</artifactId> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/src/lib/kingbase8-8.2.0.jar</systemPath> | |||||
</dependency> | </dependency> | ||||
</dependencies> | </dependencies> | ||||
</project> | </project> |
@@ -0,0 +1,62 @@ | |||||
package com.ningdatech.generator.config; | |||||
import com.baomidou.mybatisplus.generator.FastAutoGenerator; | |||||
import com.baomidou.mybatisplus.generator.config.OutputFile; | |||||
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; | |||||
import java.util.Collections; | |||||
/** | |||||
* @description: 自动生成code代码 | |||||
* @author: zpf | |||||
* @date: 2023/01/03 09:20 | |||||
*/ | |||||
public class GeneratorCodeKingbaseConfig { | |||||
private static final String PATH_LXX = "/Users/liuxinxin/IdeaProjects/project-management/pmapi/src/main/java"; | |||||
private static final String PATH_YYD = ""; | |||||
private static final String PATH_LS = ""; | |||||
private static final String PATH_ZPF = "D:\\ningda\\project-management\\pmapi\\src\\main\\java"; | |||||
private static final String PATH_CMM = ""; | |||||
private static final String URL = "jdbc:kingbase8://120.26.44.207:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8"; | |||||
private static final String USER_NAME = "SYSTEM"; | |||||
private static final String PASSWORD = "Ndkj1234"; | |||||
private static void generate(String author, String packageName, String path, String... tableNames) { | |||||
FastAutoGenerator.create(URL, USER_NAME, PASSWORD) | |||||
.globalConfig(builder -> { | |||||
// 设置作者 | |||||
builder.author(author) | |||||
// 开启 swagger 模式 | |||||
.enableSwagger() | |||||
// 覆盖已生成文件 | |||||
.fileOverride() | |||||
// 指定输出目录 | |||||
.outputDir(path); | |||||
}) | |||||
.packageConfig(builder -> { | |||||
// 设置父包名 | |||||
builder.parent("com.ningdatech") | |||||
// 设置父包模块名 | |||||
.moduleName("pmapi." + packageName) | |||||
// 设置mapperXml生成路径 | |||||
.pathInfo(Collections.singletonMap(OutputFile.mapperXml, | |||||
//设置自己的生成路径 | |||||
path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); | |||||
}) | |||||
.strategyConfig(builder -> { | |||||
builder.addTablePrefix("wflow"); | |||||
// 设置需要生成的表名 | |||||
builder.addInclude(tableNames); | |||||
}) | |||||
// 使用Freemarker引擎模板,默认的是Velocity引擎模板 | |||||
.templateEngine(new FreemarkerTemplateEngine()) | |||||
.execute(); | |||||
} | |||||
public static void main(String[] args) { | |||||
generate("ZPF", "testuser", PATH_ZPF, "wflow_users"); | |||||
} | |||||
} |
@@ -206,7 +206,6 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-flowable-starter</artifactId> | <artifactId>nd-flowable-starter</artifactId> | ||||
<scope>true</scope> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
@@ -38,8 +38,8 @@ public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | |||||
if (o instanceof String) { | if (o instanceof String) { | ||||
return JSONUtil.toJsonStr(apiResponse); | return JSONUtil.toJsonStr(apiResponse); | ||||
} | } | ||||
return ApiResponse.ofSuccess(o); | |||||
// return o; | |||||
// return ApiResponse.ofSuccess(o); | |||||
return o; | |||||
} | } | ||||
private Boolean filter(MethodParameter methodParameter) { | private Boolean filter(MethodParameter methodParameter) { | ||||
@@ -1,17 +1,15 @@ | |||||
package com.ningdatech.pmapi.organization.controller; | package com.ningdatech.pmapi.organization.controller; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.wflow.bean.dto.WflowOrgProcdefDto; | |||||
import com.wflow.bean.vo.OrgProcdefVo; | |||||
import com.wflow.service.OrgProcdefService; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.ModelAttribute; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import javax.validation.Valid; | |||||
import org.springframework.web.bind.annotation.*; | |||||
/** | /** | ||||
* @Classname OrganizationProcessController | * @Classname OrganizationProcessController | ||||
@@ -27,12 +25,18 @@ import javax.validation.Valid; | |||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
public class OrganizationProcdefController { | public class OrganizationProcdefController { | ||||
// private final | |||||
// | |||||
// @ApiOperation(value = "单位流程列表", notes = "单位流程列表") | |||||
// @GetMapping("/list") | |||||
// public PageVo<UserInfoVO> processList(@Valid @ModelAttribute UserPageQuery userPageQuery) { | |||||
// return userManage.queryUserList(userPageQuery); | |||||
// } | |||||
private final OrgProcdefService orgProcdefService; | |||||
@ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表") | |||||
@GetMapping("/list") | |||||
public PageVo<OrgProcdefVo> list(@RequestParam String orgCode, @RequestParam(defaultValue = "1") Integer pageNum, | |||||
@RequestParam(defaultValue = "10") Integer pageSize) { | |||||
return orgProcdefService.getOrgProcessByOrgCode(orgCode,pageNum,pageSize); | |||||
} | |||||
@ApiOperation(value = "单位流程配置保存", notes = "单位流程列表") | |||||
@PostMapping("/save") | |||||
public Boolean save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) { | |||||
return orgProcdefService.save(wflowOrgProcdefDto); | |||||
} | |||||
} | } |
@@ -1,5 +1,7 @@ | |||||
package com.ningdatech.pmapi.user.security.auth; | package com.ningdatech.pmapi.user.security.auth; | ||||
import com.google.common.collect.Lists; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.basic.util.NdJsonUtil; | import com.ningdatech.basic.util.NdJsonUtil; | ||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
@@ -16,6 +18,7 @@ import org.springframework.security.web.authentication.logout.LogoutSuccessHandl | |||||
import org.springframework.security.web.csrf.CookieCsrfTokenRepository; | import org.springframework.security.web.csrf.CookieCsrfTokenRepository; | ||||
import java.io.PrintWriter; | import java.io.PrintWriter; | ||||
import java.util.ArrayList; | |||||
import java.util.Map; | import java.util.Map; | ||||
import java.util.Set; | import java.util.Set; | ||||
@@ -93,6 +96,4 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |
@@ -15,6 +15,7 @@ security: | |||||
- /api/v1/user/auth/invalid-session | - /api/v1/user/auth/invalid-session | ||||
- /api/v1/user/auth/login/password | - /api/v1/user/auth/login/password | ||||
- /api/v1/user/auth/forget-password | - /api/v1/user/auth/forget-password | ||||
- /api/v1/** | |||||
- /doc.html | - /doc.html | ||||
- /ok.html | - /ok.html | ||||
- /open/api/** | - /open/api/** | ||||
@@ -99,7 +99,7 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-flowable-starter</artifactId> | <artifactId>nd-flowable-starter</artifactId> | ||||
<version>1.0.0</version> | |||||
<version>1.0.1</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.flowable</groupId> | <groupId>org.flowable</groupId> | ||||