租户体系修改
This commit is contained in:
@@ -28,13 +28,13 @@ public interface FlowMapper {
|
||||
|
||||
List<CapFlowTemplate> getFlowTemplateByName(String name);
|
||||
|
||||
int deprecatedTemplate(@Param("id") long id, @Param("isDeprecated") byte isDeprecated, @Param("name") String name, @Param("targetPath") String targetPath, @Param("imagePath") String imagePath, @Param("updater") String updater);
|
||||
int deprecatedTemplate(@Param("id") long id, @Param("isDeprecated") byte isDeprecated, @Param("name") String name, @Param("targetPath") String targetPath, @Param("imagePath") String imagePath, @Param("updater") Long updater);
|
||||
|
||||
int updatePatentApplication(@Param("id") long id, @Param("isPatentApplication") byte isPatentApplication, @Param("updater") String updater);
|
||||
int updatePatentApplication(@Param("id") long id, @Param("isPatentApplication") byte isPatentApplication, @Param("updater") Long updater);
|
||||
|
||||
int getDeprecatedCount(@Param("name") String name);
|
||||
|
||||
int updateTemplateName(@Param("templateName") String templateName, @Param("oldTemplateName") String oldTemplateName, @Param("updater") String updater);
|
||||
int updateTemplateName(@Param("templateName") String templateName, @Param("oldTemplateName") String oldTemplateName, @Param("updater") Long updater);
|
||||
|
||||
String getFlowTemplateRouteById(Long id);
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ public class FlowServiceImpl implements FlowService {
|
||||
|
||||
@Override
|
||||
public SdmResponse delFlowTemplateByDir(DelFlowTemplateByDirReq req) {
|
||||
log.info(ThreadLocalContext.getJobNumber() + " delFlowTemplateByDir");
|
||||
log.info(ThreadLocalContext.getUserId() + " delFlowTemplateByDir");
|
||||
String path = Tools.getRootPath(rootPath, String.valueOf(ThreadLocalContext.getTenantId())) + req.getPath();
|
||||
File dir = new File(path);
|
||||
if (!dir.exists() || !dir.isDirectory()) {
|
||||
@@ -144,11 +144,11 @@ public class FlowServiceImpl implements FlowService {
|
||||
File sourceFile = new File(sourcePath);
|
||||
File targetFile = new File(targetPath);
|
||||
String imagePath = capFlowTemplateById.getImagePath().replace(sourcePath, targetPath);
|
||||
if(flowMapper.deprecatedTemplate(id, isDeprecated, name, targetPath.replace(companyRootPath, ""), imagePath, ThreadLocalContext.getJobNumber()) <= 0) {
|
||||
if(flowMapper.deprecatedTemplate(id, isDeprecated, name, targetPath.replace(companyRootPath, ""), imagePath, ThreadLocalContext.getUserId()) <= 0) {
|
||||
return SdmResponse.failed("弃用流程模板失败");
|
||||
}
|
||||
sourceFile.renameTo(targetFile);
|
||||
flowMapper.updateTemplateName(name, req.getName(), ThreadLocalContext.getJobNumber());
|
||||
flowMapper.updateTemplateName(name, req.getName(), ThreadLocalContext.getUserId());
|
||||
redisUtil.del(FLOW_TEMPLATE_PATH + String.valueOf(ThreadLocalContext.getTenantId()));
|
||||
return SdmResponse.success(new DeprecatedTemplateRsp(id, name));
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class FlowServiceImpl implements FlowService {
|
||||
public SdmResponse updatePatentApplication(UpdatePatentApplicationReq req) {
|
||||
long id = req.getId();
|
||||
Byte isPatentApplication = req.getIsPatentApplication();
|
||||
if(flowMapper.updatePatentApplication(id, isPatentApplication, ThreadLocalContext.getJobNumber()) <= 0) {
|
||||
if(flowMapper.updatePatentApplication(id, isPatentApplication, ThreadLocalContext.getUserId()) <= 0) {
|
||||
return SdmResponse.failed("更新专利失败");
|
||||
}
|
||||
redisUtil.del(FLOW_TEMPLATE_PATH + String.valueOf(ThreadLocalContext.getTenantId()));
|
||||
|
||||
Reference in New Issue
Block a user