From 91890bac76ab5652fd07f955ebec3564a91f8011 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 13 Jan 2022 08:50:15 +0800
Subject: [PATCH] 1. 公司注册新增注册,审核 2. 公司新增修改
---
src/main/java/org/springblade/modules/information/controller/InformationController.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/controller/InformationController.java b/src/main/java/org/springblade/modules/information/controller/InformationController.java
index 60079b5..dd07305 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -54,6 +54,7 @@
import org.springblade.modules.system.service.IRoleService;
import org.springblade.modules.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -147,6 +148,7 @@
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入information")
+ @Transactional(rollbackFor = Exception.class)
public R save(@Valid @RequestBody Information information){
Dept dept = new Dept();
//自招保安公司
@@ -203,6 +205,7 @@
}
user.setDeptId(information.getDepartmentid());
user.setTenantId("000000");
+ user.setCreateUser(Long.parseLong(information.getCreateUserId()));
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
user.setStatus(1);
@@ -247,23 +250,24 @@
"," + "'" + information.getContactscell() + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getCreateTime()) + "'" +
"," + "'" + information.getCreateUserId() + "'" + ");" +
- "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + ","
+ "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + ","
+ "'" + dept.getTenantId() + "'" +
"," + "'" + information.getEnterprisename() + "'" +
"," + "'" + dept.getAncestors() + "'" +
"," + "'" + dept.getDeptCategory() + "'" +
"," + "'" + isDeleted + "'" + ");" +
- "insert into blade_user(id,tenant_id,account,password,role_id,dept_id,create_time,update_time,status,is_deleted) " +
+ "insert into blade_user(id,tenant_id,account,password,dept_id,create_user,create_time,update_time,status,is_deleted,role_id) " +
"values(" + "'" + user.getId() + "'" +
"," + "'" + user.getTenantId() + "'"
+ "," + "'" + user.getAccount() + "'" +
"," + "'" + user.getPassword() + "'" +
- "," + "'" + user.getRoleId() + "'" +
"," + "'" + user.getDeptId() + "'" +
+ "," + "'" + user.getCreateUser() + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getCreateTime()) + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" +
"," + "'" + user.getStatus() + "'" +
- "," + "'" + user.getIsDeleted() + "'" + ")";
+ "," + "'" + user.getIsDeleted() + "'" +
+ "," + "'" + user.getRoleId() + "'" + ")";
FtpUtil.sqlFileUpload(s);
}
return R.success("成功");
--
Gitblit v1.9.3