mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56:39 +08:00
v3.21.0 【新增】修改部门名称字段;【新增】修改系统版本version字段;【新增】优化代码生成前端代码;【优化】SQL
This commit is contained in:
parent
3fb4dfad09
commit
8d2d8f2846
@ -230,7 +230,7 @@ public class NoticeService {
|
|||||||
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
|
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
|
||||||
} else {
|
} else {
|
||||||
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
|
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
|
||||||
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getName());
|
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getDepartmentName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);
|
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);
|
||||||
|
@ -31,7 +31,7 @@ public class DepartmentEntity {
|
|||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负责人员工 id
|
* 负责人员工 id
|
||||||
|
@ -20,7 +20,7 @@ public class DepartmentAddForm {
|
|||||||
@Schema(description = "部门名称")
|
@Schema(description = "部门名称")
|
||||||
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
|
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
|
||||||
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
|
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
@NotNull(message = "排序值")
|
@NotNull(message = "排序值")
|
||||||
|
@ -24,7 +24,7 @@ public class DepartmentVO implements Serializable {
|
|||||||
private Long departmentId;
|
private Long departmentId;
|
||||||
|
|
||||||
@Schema(description = "部门名称")
|
@Schema(description = "部门名称")
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
@Schema(description = "部门负责人姓名")
|
@Schema(description = "部门负责人姓名")
|
||||||
private String managerName;
|
private String managerName;
|
||||||
|
@ -97,15 +97,15 @@ public class DepartmentCacheManager {
|
|||||||
*/
|
*/
|
||||||
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
|
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
|
||||||
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
|
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
|
||||||
return departmentVO.getName();
|
return departmentVO.getDepartmentName();
|
||||||
}
|
}
|
||||||
//父节点
|
//父节点
|
||||||
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
|
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
|
||||||
if (parentDepartment == null) {
|
if (parentDepartment == null) {
|
||||||
return departmentVO.getName();
|
return departmentVO.getDepartmentName();
|
||||||
}
|
}
|
||||||
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
|
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
|
||||||
return pathName + "/" + departmentVO.getName();
|
return pathName + "/" + departmentVO.getDepartmentName();
|
||||||
|
|
||||||
}
|
}
|
||||||
// ---------------------- 构造树的一些方法 ------------------------------
|
// ---------------------- 构造树的一些方法 ------------------------------
|
||||||
|
@ -14,10 +14,7 @@ import net.lab1024.sa.base.common.domain.ResponseDTO;
|
|||||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门 service
|
* 部门 service
|
||||||
|
@ -242,8 +242,6 @@ public class EmployeeService {
|
|||||||
/**
|
/**
|
||||||
* 更新登录人头像
|
* 更新登录人头像
|
||||||
*
|
*
|
||||||
* @param employeeUpdateAvatarForm
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
|
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
|
||||||
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
|
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
|
||||||
@ -395,7 +393,7 @@ public class EmployeeService {
|
|||||||
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
|
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
|
||||||
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
|
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
|
||||||
if (department != null) {
|
if (department != null) {
|
||||||
employeeVO.setDepartmentName(department.getName());
|
employeeVO.setDepartmentName(department.getDepartmentName());
|
||||||
}
|
}
|
||||||
return employeeVO;
|
return employeeVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
@ -7,6 +7,8 @@ import net.lab1024.sa.base.common.enumeration.GenderEnum;
|
|||||||
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
||||||
import net.lab1024.sa.base.common.swagger.SchemaEnum;
|
import net.lab1024.sa.base.common.swagger.SchemaEnum;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求员工登录信息
|
* 请求员工登录信息
|
||||||
*
|
*
|
||||||
@ -17,7 +19,7 @@ import net.lab1024.sa.base.common.swagger.SchemaEnum;
|
|||||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RequestEmployee implements RequestUser {
|
public class RequestEmployee implements RequestUser, Serializable {
|
||||||
|
|
||||||
@Schema(description = "员工id")
|
@Schema(description = "员工id")
|
||||||
private Long employeeId;
|
private Long employeeId;
|
||||||
|
@ -88,7 +88,7 @@ public class LoginManager {
|
|||||||
|
|
||||||
// 部门信息
|
// 部门信息
|
||||||
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
|
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
|
||||||
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getName());
|
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getDepartmentName());
|
||||||
|
|
||||||
// 头像信息
|
// 头像信息
|
||||||
String avatar = employeeEntity.getAvatar();
|
String avatar = employeeEntity.getAvatar();
|
||||||
|
@ -15,6 +15,7 @@ import net.lab1024.sa.base.common.code.SystemErrorCode;
|
|||||||
import net.lab1024.sa.base.common.domain.RequestUrlVO;
|
import net.lab1024.sa.base.common.domain.RequestUrlVO;
|
||||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||||
|
import net.lab1024.sa.base.common.util.SmartStringUtil;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@ -134,6 +135,10 @@ public class MenuService {
|
|||||||
* @return true 重复 false 未重复
|
* @return true 重复 false 未重复
|
||||||
*/
|
*/
|
||||||
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
|
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
|
||||||
|
if(SmartStringUtil.isEmpty(menuDTO.getWebPerms())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
|
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
|
||||||
if (menuDTO instanceof MenuAddForm) {
|
if (menuDTO instanceof MenuAddForm) {
|
||||||
return menu != null;
|
return menu != null;
|
||||||
|
@ -5,7 +5,6 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +73,7 @@ public class RoleEmployeeService {
|
|||||||
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
|
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(departmentIdList)) {
|
if (CollectionUtils.isNotEmpty(departmentIdList)) {
|
||||||
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
|
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
|
||||||
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getName));
|
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getDepartmentName));
|
||||||
employeeList.forEach(e -> {
|
employeeList.forEach(e -> {
|
||||||
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
|
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* 网络安全
|
* 网络安全
|
||||||
*
|
*
|
||||||
* @Author 1024创新实验室-主任:卓大
|
* @Author 1024创新实验室-主任:卓大
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<select id="queryPageEmployeeList"
|
<select id="queryPageEmployeeList"
|
||||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
||||||
select
|
select
|
||||||
t_oa_enterprise_employee.*,
|
t_oa_enterprise_employee.enterprise_id,
|
||||||
t_oa_enterprise.enterprise_name,
|
t_oa_enterprise.enterprise_name,
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_employee.actual_name as employeeName
|
t_employee.actual_name as employeeName
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
|
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
|
||||||
select t_notice_view_record.*,
|
select t_notice_view_record.*,
|
||||||
t_employee.actual_name as employeeName,
|
t_employee.actual_name as employeeName,
|
||||||
t_department.name as departmentName
|
t_department.department_name
|
||||||
from t_notice_view_record
|
from t_notice_view_record
|
||||||
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
|
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
|
||||||
left join t_department on t_department.department_id = t_employee.department_id
|
left join t_department on t_department.department_id = t_employee.department_id
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
||||||
SELECT t_department.*,
|
SELECT t_department.*,
|
||||||
t_employee.actual_name as managerName,
|
t_employee.actual_name as managerName,
|
||||||
parent_department.`name` as parentName
|
parent_department.department_name as parentName
|
||||||
FROM t_department
|
FROM t_department
|
||||||
left join t_employee on t_department.manager_id = t_employee.employee_id
|
left join t_employee on t_department.manager_id = t_employee.employee_id
|
||||||
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
||||||
@ -23,7 +23,7 @@
|
|||||||
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
||||||
SELECT t_department.*,
|
SELECT t_department.*,
|
||||||
t_employee.actual_name as managerName,
|
t_employee.actual_name as managerName,
|
||||||
parent_department.`name` as parentName
|
parent_department.department_name as parentName
|
||||||
FROM t_department
|
FROM t_department
|
||||||
left join t_employee on t_department.manager_id = t_employee.employee_id
|
left join t_employee on t_department.manager_id = t_employee.employee_id
|
||||||
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT
|
SELECT
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
<where>
|
<where>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT t_employee.*,
|
SELECT t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
where t_employee.employee_id = #{employeeId}
|
where t_employee.employee_id = #{employeeId}
|
||||||
@ -178,7 +178,7 @@
|
|||||||
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT
|
SELECT
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
<where>
|
<where>
|
||||||
|
@ -3,6 +3,7 @@ package net.lab1024.sa.base.common.controller;
|
|||||||
import net.lab1024.sa.base.constant.SwaggerTagConst;
|
import net.lab1024.sa.base.constant.SwaggerTagConst;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支撑类业务路由基类
|
* 支撑类业务路由基类
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,8 @@ public class CacheConfig {
|
|||||||
return RedisCacheConfiguration.defaultCacheConfig()
|
return RedisCacheConfiguration.defaultCacheConfig()
|
||||||
.disableCachingNullValues()
|
.disableCachingNullValues()
|
||||||
.computePrefixWith(name -> "cache:" + name + ":")
|
.computePrefixWith(name -> "cache:" + name + ":")
|
||||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -28,7 +28,7 @@ public class ChangeLogEntity {
|
|||||||
/**
|
/**
|
||||||
* 版本
|
* 版本
|
||||||
*/
|
*/
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
||||||
|
@ -23,7 +23,7 @@ public class ChangeLogAddForm {
|
|||||||
|
|
||||||
@Schema(description = "版本", required = true)
|
@Schema(description = "版本", required = true)
|
||||||
@NotBlank(message = "版本 不能为空")
|
@NotBlank(message = "版本 不能为空")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
||||||
|
@ -27,7 +27,7 @@ public class ChangeLogUpdateForm {
|
|||||||
|
|
||||||
@Schema(description = "版本", required = true)
|
@Schema(description = "版本", required = true)
|
||||||
@NotBlank(message = "版本 不能为空")
|
@NotBlank(message = "版本 不能为空")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
||||||
|
@ -23,7 +23,7 @@ public class ChangeLogVO {
|
|||||||
private Long changeLogId;
|
private Long changeLogId;
|
||||||
|
|
||||||
@Schema(description = "版本")
|
@Schema(description = "版本")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
@ -44,7 +44,7 @@ public class ChangeLogService {
|
|||||||
* 添加
|
* 添加
|
||||||
*/
|
*/
|
||||||
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
|
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
|
||||||
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getVersion());
|
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getUpdateVersion());
|
||||||
if (existVersion != null) {
|
if (existVersion != null) {
|
||||||
return ResponseDTO.userErrorParam("此版本已经存在");
|
return ResponseDTO.userErrorParam("此版本已经存在");
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ public class ChangeLogService {
|
|||||||
* 更新
|
* 更新
|
||||||
*/
|
*/
|
||||||
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
|
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
|
||||||
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getVersion());
|
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getUpdateVersion());
|
||||||
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
|
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
|
||||||
return ResponseDTO.userErrorParam("此版本已经存在");
|
return ResponseDTO.userErrorParam("此版本已经存在");
|
||||||
}
|
}
|
||||||
|
@ -11,16 +11,6 @@ package net.lab1024.sa.base.module.support.codegenerator.constant;
|
|||||||
*/
|
*/
|
||||||
public class CodeGeneratorConstant {
|
public class CodeGeneratorConstant {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
public final static String PRIMARY_KEY = "PRI";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自增
|
|
||||||
*/
|
|
||||||
public final static String AUTO_INCREMENT = "auto_increment";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认逻辑删除字段名称
|
* 默认逻辑删除字段名称
|
||||||
*/
|
*/
|
||||||
|
@ -23,20 +23,26 @@ public class TableColumnVO {
|
|||||||
@Schema(description = "列描述")
|
@Schema(description = "列描述")
|
||||||
private String columnComment;
|
private String columnComment;
|
||||||
|
|
||||||
@Schema(description = "columnKey")
|
|
||||||
private String columnKey;
|
|
||||||
|
|
||||||
@Schema(description = "extra")
|
|
||||||
private String extra;
|
|
||||||
|
|
||||||
@Schema(description = "是否为空")
|
|
||||||
private String isNullable;
|
|
||||||
|
|
||||||
@Schema(description = "数据类型varchar")
|
@Schema(description = "数据类型varchar")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
@Schema(description = "列类型varchar(50)")
|
@Schema(description = "是否为空")
|
||||||
private String columnType;
|
private Boolean nullableFlag;
|
||||||
|
|
||||||
|
@Schema(description = "是否为主键")
|
||||||
|
private Boolean primaryKeyFlag;
|
||||||
|
|
||||||
|
@Schema(description = "是否递增")
|
||||||
|
private Boolean autoIncreaseFlag;
|
||||||
|
|
||||||
|
// --------------- 临时字段 -------------------
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String columnKey;
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String extra;
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String isNullable;
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,16 @@ public class DataTracerChangeContentService {
|
|||||||
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
|
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析批量bean的内容
|
||||||
|
*
|
||||||
|
* @param objectList 对象列表
|
||||||
|
* @return 单个内容
|
||||||
|
*/
|
||||||
|
public <T> String getChangeContent(List<T> objectList) {
|
||||||
|
return this.getObjectListContent(objectList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取一个对象的内容信息
|
* 获取一个对象的内容信息
|
||||||
*
|
*
|
||||||
|
@ -43,7 +43,6 @@ public class HelpDocCatalogEntity {
|
|||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
@TableField("`sort`")
|
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ public class HelpDocEntity {
|
|||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
@TableField("`sort`")
|
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ import java.util.Map;
|
|||||||
@Component
|
@Component
|
||||||
public class MailService {
|
public class MailService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private JavaMailSender javaMailSender;
|
private JavaMailSender javaMailSender;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import jakarta.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||||
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
|
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
|
||||||
@ -28,17 +29,29 @@ public class Level3ProtectConfigService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启双因子登录,默认:开启
|
* 开启双因子登录,默认:开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 开启双因子登录,默认:开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean twoFactorLoginEnabled = false;
|
private boolean twoFactorLoginEnabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||||
|
* -- GETTER --
|
||||||
|
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int loginFailMaxTimes = -1;
|
private int loginFailMaxTimes = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||||
|
* -- GETTER --
|
||||||
|
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int loginFailLockSeconds = 1800;
|
private int loginFailLockSeconds = 1800;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,61 +61,53 @@ public class Level3ProtectConfigService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码复杂度 是否开启,默认:开启
|
* 密码复杂度 是否开启,默认:开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 密码复杂度 是否开启,默认:开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean passwordComplexityEnabled = true;
|
private boolean passwordComplexityEnabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
||||||
|
* -- GETTER --
|
||||||
|
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int regularChangePasswordDays = 90;
|
private int regularChangePasswordDays = 90;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
||||||
|
* -- GETTER --
|
||||||
|
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int regularChangePasswordNotAllowRepeatTimes = 3;
|
private int regularChangePasswordNotAllowRepeatTimes = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件大小限制,单位 mb ,(默认:50 mb)
|
* 文件大小限制,单位 mb ,(默认:50 mb)
|
||||||
|
* -- GETTER --
|
||||||
|
* 文件大小限制,单位 mb ,(默认:50 mb)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private long maxUploadFileSizeMb = 50;
|
private long maxUploadFileSizeMb = 50;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件检测,默认:不开启
|
* 文件检测,默认:不开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 文件检测,默认:不开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean fileDetectFlag = false;
|
private boolean fileDetectFlag = false;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigService configService;
|
private ConfigService configService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件检测,默认:不开启
|
|
||||||
*/
|
|
||||||
public boolean isFileDetectFlag() {
|
|
||||||
return fileDetectFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小限制,单位 mb ,(默认:50 mb)
|
|
||||||
*/
|
|
||||||
public long getMaxUploadFileSizeMb() {
|
|
||||||
return maxUploadFileSizeMb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
|
||||||
*/
|
|
||||||
public int getLoginFailMaxTimes() {
|
|
||||||
return loginFailMaxTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
|
||||||
*/
|
|
||||||
public int getLoginFailLockSeconds() {
|
|
||||||
return loginFailLockSeconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最低活跃时间(单位:秒),超过此时间没有操作系统就会被冻结,默认-1 代表不限制,永不冻结; 默认 30分钟
|
* 最低活跃时间(单位:秒),超过此时间没有操作系统就会被冻结,默认-1 代表不限制,永不冻结; 默认 30分钟
|
||||||
*/
|
*/
|
||||||
@ -110,34 +115,6 @@ public class Level3ProtectConfigService {
|
|||||||
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
|
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
|
||||||
*/
|
|
||||||
public int getRegularChangePasswordDays() {
|
|
||||||
return regularChangePasswordDays;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开启双因子登录,默认:开启
|
|
||||||
*/
|
|
||||||
public boolean isTwoFactorLoginEnabled() {
|
|
||||||
return twoFactorLoginEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 密码复杂度 是否开启,默认:开启
|
|
||||||
*/
|
|
||||||
public boolean isPasswordComplexityEnabled() {
|
|
||||||
return passwordComplexityEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
|
||||||
*/
|
|
||||||
public int getRegularChangePasswordNotAllowRepeatTimes() {
|
|
||||||
return regularChangePasswordNotAllowRepeatTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
void init() {
|
void init() {
|
||||||
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);
|
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);
|
||||||
|
@ -6,7 +6,6 @@ import net.lab1024.sa.base.common.domain.ResponseDTO;
|
|||||||
import net.lab1024.sa.base.common.util.SmartStringUtil;
|
import net.lab1024.sa.base.common.util.SmartStringUtil;
|
||||||
import net.lab1024.sa.base.module.support.securityprotect.dao.PasswordLogDao;
|
import net.lab1024.sa.base.module.support.securityprotect.dao.PasswordLogDao;
|
||||||
import net.lab1024.sa.base.module.support.securityprotect.domain.PasswordLogEntity;
|
import net.lab1024.sa.base.module.support.securityprotect.domain.PasswordLogEntity;
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.springframework.security.crypto.argon2.Argon2PasswordEncoder;
|
import org.springframework.security.crypto.argon2.Argon2PasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -11,6 +11,8 @@ import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberDao;
|
|||||||
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
|
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
|
||||||
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
|
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
|
||||||
import org.apache.commons.lang3.RandomUtils;
|
import org.apache.commons.lang3.RandomUtils;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -92,6 +94,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
|
|||||||
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
|
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
|
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
|
||||||
List<String> generateList = this.generate(serialNumberIdEnum, 1);
|
List<String> generateList = this.generate(serialNumberIdEnum, 1);
|
||||||
if (generateList == null || generateList.isEmpty()) {
|
if (generateList == null || generateList.isEmpty()) {
|
||||||
@ -101,6 +104,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
|
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
|
||||||
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
|
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
|
||||||
if (serialNumberInfoBO == null) {
|
if (serialNumberInfoBO == null) {
|
||||||
|
@ -60,7 +60,7 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
|
|||||||
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
|
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
|
||||||
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
|
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
|
||||||
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
|
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
|
||||||
try {
|
|
||||||
boolean lock = false;
|
boolean lock = false;
|
||||||
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
|
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
|
||||||
try {
|
try {
|
||||||
@ -76,6 +76,8 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
|
|||||||
if (!lock) {
|
if (!lock) {
|
||||||
throw new BusinessException("SerialNumber 尝试5次,未能生成单号");
|
throw new BusinessException("SerialNumber 尝试5次,未能生成单号");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// 获取上次的生成结果
|
// 获取上次的生成结果
|
||||||
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
|
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
|
||||||
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,
|
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,
|
||||||
|
@ -67,7 +67,7 @@ spring:
|
|||||||
|
|
||||||
# 缓存实现类型
|
# 缓存实现类型
|
||||||
cache:
|
cache:
|
||||||
type: caffeine
|
type: redis
|
||||||
|
|
||||||
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
|
||||||
server:
|
server:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<!--关键字-->
|
<!--关键字-->
|
||||||
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
||||||
AND ( INSTR(t_change_log.version,#{queryForm.keyword})
|
AND ( INSTR(t_change_log.update_version,#{queryForm.keyword})
|
||||||
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
|
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
|
||||||
OR INSTR(t_change_log.content,#{queryForm.keyword})
|
OR INSTR(t_change_log.content,#{queryForm.keyword})
|
||||||
)
|
)
|
||||||
@ -35,12 +35,12 @@
|
|||||||
AND t_change_log.link = #{queryForm.link}
|
AND t_change_log.link = #{queryForm.link}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by t_change_log.version desc
|
order by t_change_log.update_version desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByVersion"
|
<select id="selectByVersion"
|
||||||
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
|
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
|
||||||
select * from t_change_log where `version` = #{version}
|
select * from t_change_log where update_version = #{version}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<if test="query.userType != null">
|
<if test="query.userType != null">
|
||||||
AND user_type = #{query.userType}
|
AND user_type = #{query.userType}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.ip != null">
|
<if test="query.ip != null and query.ip != ''">
|
||||||
AND INSTR(login_ip,#{query.ip})
|
AND INSTR(login_ip,#{query.ip})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.startDate != null and query.startDate != ''">
|
<if test="query.startDate != null and query.startDate != ''">
|
||||||
@ -25,9 +25,6 @@
|
|||||||
<if test="query.userName != null and query.userName != ''">
|
<if test="query.userName != null and query.userName != ''">
|
||||||
AND INSTR(user_name,#{query.userName})
|
AND INSTR(user_name,#{query.userName})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.ip != null">
|
|
||||||
AND INSTR(login_ip,#{query.ip})
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
AND INSTR(operate_user_name,#{query.userName})
|
AND INSTR(operate_user_name,#{query.userName})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.keywords != null and query.keywords != ''">
|
<if test="query.keywords != null and query.keywords != ''">
|
||||||
AND (INSTR(`module`,#{query.keywords}) OR INSTR(content,#{query.keywords}))
|
AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords}))
|
||||||
</if>
|
</if>
|
||||||
<if test="query.requestKeywords != null and query.requestKeywords != ''">
|
<if test="query.requestKeywords != null and query.requestKeywords != ''">
|
||||||
AND (INSTR(`url`,#{query.requestKeywords}) OR INSTR(`method`,#{query.requestKeywords}) OR INSTR(`param`,#{query.requestKeywords}))
|
AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}))
|
||||||
</if>
|
</if>
|
||||||
<if test="query.successFlag != null">
|
<if test="query.successFlag != null">
|
||||||
AND success_flag = #{query.successFlag}
|
AND success_flag = #{query.successFlag}
|
||||||
|
@ -134,7 +134,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bear
|
# token 前缀 例如:Bearer
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -34,6 +34,7 @@ spring:
|
|||||||
min-idle: 10
|
min-idle: 10
|
||||||
max-idle: 50
|
max-idle: 50
|
||||||
max-wait: 30000ms
|
max-wait: 30000ms
|
||||||
|
|
||||||
# 邮件,置以SSL的方式发送, 这个需要使用这种方式并且端口是465
|
# 邮件,置以SSL的方式发送, 这个需要使用这种方式并且端口是465
|
||||||
mail:
|
mail:
|
||||||
host: smtp.163.com
|
host: smtp.163.com
|
||||||
@ -106,7 +107,7 @@ springdoc:
|
|||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
basic:
|
basic:
|
||||||
enable: true
|
enable: false
|
||||||
username: api # Basic认证用户名
|
username: api # Basic认证用户名
|
||||||
password: 1024 # Basic认证密码
|
password: 1024 # Basic认证密码
|
||||||
|
|
||||||
@ -131,7 +132,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bear
|
# token 前缀 例如:Bearer
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -134,7 +134,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bear
|
# token 前缀 例如:Bearer
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -230,7 +230,7 @@ public class NoticeService {
|
|||||||
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
|
noticeVisibleRange.setDataName(employeeEntity == null ? StringConst.EMPTY : employeeEntity.getActualName());
|
||||||
} else {
|
} else {
|
||||||
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
|
DepartmentVO departmentVO = departmentService.getDepartmentById(noticeVisibleRange.getDataId());
|
||||||
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getName());
|
noticeVisibleRange.setDataName(departmentVO == null ? StringConst.EMPTY : departmentVO.getDepartmentName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);
|
updateFormVO.setVisibleRangeList(noticeVisibleRangeList);
|
||||||
|
@ -31,7 +31,7 @@ public class DepartmentEntity {
|
|||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负责人员工 id
|
* 负责人员工 id
|
||||||
|
@ -21,7 +21,7 @@ public class DepartmentAddForm {
|
|||||||
@Schema(description = "部门名称")
|
@Schema(description = "部门名称")
|
||||||
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
|
@Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)")
|
||||||
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
|
@NotNull(message = "请输入正确的部门名称(1-50个字符)")
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
@NotNull(message = "排序值")
|
@NotNull(message = "排序值")
|
||||||
|
@ -24,7 +24,7 @@ public class DepartmentVO implements Serializable {
|
|||||||
private Long departmentId;
|
private Long departmentId;
|
||||||
|
|
||||||
@Schema(description = "部门名称")
|
@Schema(description = "部门名称")
|
||||||
private String name;
|
private String departmentName;
|
||||||
|
|
||||||
@Schema(description = "部门负责人姓名")
|
@Schema(description = "部门负责人姓名")
|
||||||
private String managerName;
|
private String managerName;
|
||||||
|
@ -97,15 +97,15 @@ public class DepartmentCacheManager {
|
|||||||
*/
|
*/
|
||||||
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
|
private String buildDepartmentPath(DepartmentVO departmentVO, Map<Long, DepartmentVO> departmentMap) {
|
||||||
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
|
if (Objects.equals(departmentVO.getParentId(), NumberUtils.LONG_ZERO)) {
|
||||||
return departmentVO.getName();
|
return departmentVO.getDepartmentName();
|
||||||
}
|
}
|
||||||
//父节点
|
//父节点
|
||||||
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
|
DepartmentVO parentDepartment = departmentMap.get(departmentVO.getParentId());
|
||||||
if (parentDepartment == null) {
|
if (parentDepartment == null) {
|
||||||
return departmentVO.getName();
|
return departmentVO.getDepartmentName();
|
||||||
}
|
}
|
||||||
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
|
String pathName = buildDepartmentPath(parentDepartment, departmentMap);
|
||||||
return pathName + "/" + departmentVO.getName();
|
return pathName + "/" + departmentVO.getDepartmentName();
|
||||||
|
|
||||||
}
|
}
|
||||||
// ---------------------- 构造树的一些方法 ------------------------------
|
// ---------------------- 构造树的一些方法 ------------------------------
|
||||||
|
@ -242,8 +242,6 @@ public class EmployeeService {
|
|||||||
/**
|
/**
|
||||||
* 更新登录人头像
|
* 更新登录人头像
|
||||||
*
|
*
|
||||||
* @param employeeUpdateAvatarForm
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
|
public ResponseDTO<String> updateAvatar(EmployeeUpdateAvatarForm employeeUpdateAvatarForm) {
|
||||||
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
|
Long employeeId = employeeUpdateAvatarForm.getEmployeeId();
|
||||||
@ -395,7 +393,7 @@ public class EmployeeService {
|
|||||||
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
|
List<EmployeeVO> voList = employeeEntityList.stream().map(e -> {
|
||||||
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
|
EmployeeVO employeeVO = SmartBeanUtil.copy(e, EmployeeVO.class);
|
||||||
if (department != null) {
|
if (department != null) {
|
||||||
employeeVO.setDepartmentName(department.getName());
|
employeeVO.setDepartmentName(department.getDepartmentName());
|
||||||
}
|
}
|
||||||
return employeeVO;
|
return employeeVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
@ -88,7 +88,7 @@ public class LoginManager {
|
|||||||
|
|
||||||
// 部门信息
|
// 部门信息
|
||||||
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
|
DepartmentVO department = departmentService.getDepartmentById(employeeEntity.getDepartmentId());
|
||||||
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getName());
|
requestEmployee.setDepartmentName(null == department ? StringConst.EMPTY : department.getDepartmentName());
|
||||||
|
|
||||||
// 头像信息
|
// 头像信息
|
||||||
String avatar = employeeEntity.getAvatar();
|
String avatar = employeeEntity.getAvatar();
|
||||||
|
@ -14,6 +14,7 @@ import net.lab1024.sa.base.common.code.SystemErrorCode;
|
|||||||
import net.lab1024.sa.base.common.domain.RequestUrlVO;
|
import net.lab1024.sa.base.common.domain.RequestUrlVO;
|
||||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||||
|
import net.lab1024.sa.base.common.util.SmartStringUtil;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@ -134,6 +135,10 @@ public class MenuService {
|
|||||||
* @return true 重复 false 未重复
|
* @return true 重复 false 未重复
|
||||||
*/
|
*/
|
||||||
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
|
public <T extends MenuBaseForm> Boolean validateWebPerms(T menuDTO) {
|
||||||
|
if(SmartStringUtil.isEmpty(menuDTO.getWebPerms())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
|
MenuEntity menu = menuDao.getByWebPerms(menuDTO.getWebPerms(), Boolean.FALSE);
|
||||||
if (menuDTO instanceof MenuAddForm) {
|
if (menuDTO instanceof MenuAddForm) {
|
||||||
return menu != null;
|
return menu != null;
|
||||||
|
@ -72,7 +72,7 @@ public class RoleEmployeeService {
|
|||||||
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
|
List<Long> departmentIdList = employeeList.stream().filter(e -> e != null && e.getDepartmentId() != null).map(EmployeeVO::getDepartmentId).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(departmentIdList)) {
|
if (CollectionUtils.isNotEmpty(departmentIdList)) {
|
||||||
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
|
List<DepartmentEntity> departmentEntities = departmentDao.selectBatchIds(departmentIdList);
|
||||||
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getName));
|
Map<Long, String> departmentIdNameMap = departmentEntities.stream().collect(Collectors.toMap(DepartmentEntity::getDepartmentId, DepartmentEntity::getDepartmentName));
|
||||||
employeeList.forEach(e -> {
|
employeeList.forEach(e -> {
|
||||||
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
|
e.setDepartmentName(departmentIdNameMap.getOrDefault(e.getDepartmentId(), StringConst.EMPTY));
|
||||||
});
|
});
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<select id="queryPageEmployeeList"
|
<select id="queryPageEmployeeList"
|
||||||
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
resultType="net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO">
|
||||||
select
|
select
|
||||||
t_oa_enterprise_employee.*,
|
t_oa_enterprise_employee.enterprise_id,
|
||||||
t_oa_enterprise.enterprise_name,
|
t_oa_enterprise.enterprise_name,
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_employee.actual_name as employeeName
|
t_employee.actual_name as employeeName
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
|
<select id="queryNoticeViewRecordList" resultType="net.lab1024.sa.admin.module.business.oa.notice.domain.vo.NoticeViewRecordVO">
|
||||||
select t_notice_view_record.*,
|
select t_notice_view_record.*,
|
||||||
t_employee.actual_name as employeeName,
|
t_employee.actual_name as employeeName,
|
||||||
t_department.name as departmentName
|
t_department.department_name
|
||||||
from t_notice_view_record
|
from t_notice_view_record
|
||||||
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
|
left join t_employee on t_employee.employee_id = t_notice_view_record.employee_id
|
||||||
left join t_department on t_department.department_id = t_employee.department_id
|
left join t_department on t_department.department_id = t_employee.department_id
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
<select id="listAll" resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
||||||
SELECT t_department.*,
|
SELECT t_department.*,
|
||||||
t_employee.actual_name as managerName,
|
t_employee.actual_name as managerName,
|
||||||
parent_department.`name` as parentName
|
parent_department.department_name as parentName
|
||||||
FROM t_department
|
FROM t_department
|
||||||
left join t_employee on t_department.manager_id = t_employee.employee_id
|
left join t_employee on t_department.manager_id = t_employee.employee_id
|
||||||
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
||||||
@ -23,7 +23,7 @@
|
|||||||
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
resultType="net.lab1024.sa.admin.module.system.department.domain.vo.DepartmentVO">
|
||||||
SELECT t_department.*,
|
SELECT t_department.*,
|
||||||
t_employee.actual_name as managerName,
|
t_employee.actual_name as managerName,
|
||||||
parent_department.`name` as parentName
|
parent_department.department_name as parentName
|
||||||
FROM t_department
|
FROM t_department
|
||||||
left join t_employee on t_department.manager_id = t_employee.employee_id
|
left join t_employee on t_department.manager_id = t_employee.employee_id
|
||||||
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
left join t_department parent_department on t_department.parent_id = parent_department.department_id
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="queryEmployee" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT
|
SELECT
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
<where>
|
<where>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="getEmployeeById" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT t_employee.*,
|
SELECT t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
where t_employee.employee_id = #{employeeId}
|
where t_employee.employee_id = #{employeeId}
|
||||||
@ -178,7 +178,7 @@
|
|||||||
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
<select id="selectEmployeeByDisabledAndDeleted" resultType="net.lab1024.sa.admin.module.system.employee.domain.vo.EmployeeVO">
|
||||||
SELECT
|
SELECT
|
||||||
t_employee.*,
|
t_employee.*,
|
||||||
t_department.name AS departmentName
|
t_department.department_name
|
||||||
FROM t_employee
|
FROM t_employee
|
||||||
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
LEFT JOIN t_department ON t_department.department_id = t_employee.department_id
|
||||||
<where>
|
<where>
|
||||||
|
@ -35,7 +35,8 @@ public class CacheConfig {
|
|||||||
return RedisCacheConfiguration.defaultCacheConfig()
|
return RedisCacheConfiguration.defaultCacheConfig()
|
||||||
.disableCachingNullValues()
|
.disableCachingNullValues()
|
||||||
.computePrefixWith(name -> "cache:" + name + ":")
|
.computePrefixWith(name -> "cache:" + name + ":")
|
||||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -7,6 +7,7 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mp 插件
|
* mp 插件
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,7 @@ public class ChangeLogEntity {
|
|||||||
/**
|
/**
|
||||||
* 版本
|
* 版本
|
||||||
*/
|
*/
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
* 更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
||||||
|
@ -22,7 +22,7 @@ public class ChangeLogAddForm {
|
|||||||
|
|
||||||
@Schema(description = "版本", required = true)
|
@Schema(description = "版本", required = true)
|
||||||
@NotBlank(message = "版本 不能为空")
|
@NotBlank(message = "版本 不能为空")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
||||||
|
@ -26,7 +26,7 @@ public class ChangeLogUpdateForm {
|
|||||||
|
|
||||||
@Schema(description = "版本", required = true)
|
@Schema(description = "版本", required = true)
|
||||||
@NotBlank(message = "版本 不能为空")
|
@NotBlank(message = "版本 不能为空")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
@CheckEnum(value = ChangeLogTypeEnum.class, message = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 错误", required = true)
|
||||||
|
@ -23,7 +23,7 @@ public class ChangeLogVO {
|
|||||||
private Long changeLogId;
|
private Long changeLogId;
|
||||||
|
|
||||||
@Schema(description = "版本")
|
@Schema(description = "版本")
|
||||||
private String version;
|
private String updateVersion;
|
||||||
|
|
||||||
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
@SchemaEnum(value = ChangeLogTypeEnum.class, desc = "更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
@ -44,7 +44,7 @@ public class ChangeLogService {
|
|||||||
* 添加
|
* 添加
|
||||||
*/
|
*/
|
||||||
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
|
public synchronized ResponseDTO<String> add(ChangeLogAddForm addForm) {
|
||||||
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getVersion());
|
ChangeLogEntity existVersion = changeLogDao.selectByVersion(addForm.getUpdateVersion());
|
||||||
if (existVersion != null) {
|
if (existVersion != null) {
|
||||||
return ResponseDTO.userErrorParam("此版本已经存在");
|
return ResponseDTO.userErrorParam("此版本已经存在");
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ public class ChangeLogService {
|
|||||||
* 更新
|
* 更新
|
||||||
*/
|
*/
|
||||||
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
|
public synchronized ResponseDTO<String> update(ChangeLogUpdateForm updateForm) {
|
||||||
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getVersion());
|
ChangeLogEntity existVersion = changeLogDao.selectByVersion(updateForm.getUpdateVersion());
|
||||||
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
|
if (existVersion != null && !updateForm.getChangeLogId().equals(existVersion.getChangeLogId())) {
|
||||||
return ResponseDTO.userErrorParam("此版本已经存在");
|
return ResponseDTO.userErrorParam("此版本已经存在");
|
||||||
}
|
}
|
||||||
|
@ -11,16 +11,6 @@ package net.lab1024.sa.base.module.support.codegenerator.constant;
|
|||||||
*/
|
*/
|
||||||
public class CodeGeneratorConstant {
|
public class CodeGeneratorConstant {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
public final static String PRIMARY_KEY = "PRI";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自增
|
|
||||||
*/
|
|
||||||
public final static String AUTO_INCREMENT = "auto_increment";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认逻辑删除字段名称
|
* 默认逻辑删除字段名称
|
||||||
*/
|
*/
|
||||||
|
@ -23,20 +23,26 @@ public class TableColumnVO {
|
|||||||
@Schema(description = "列描述")
|
@Schema(description = "列描述")
|
||||||
private String columnComment;
|
private String columnComment;
|
||||||
|
|
||||||
@Schema(description = "columnKey")
|
|
||||||
private String columnKey;
|
|
||||||
|
|
||||||
@Schema(description = "extra")
|
|
||||||
private String extra;
|
|
||||||
|
|
||||||
@Schema(description = "是否为空")
|
|
||||||
private String isNullable;
|
|
||||||
|
|
||||||
@Schema(description = "数据类型varchar")
|
@Schema(description = "数据类型varchar")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
@Schema(description = "列类型varchar(50)")
|
@Schema(description = "是否为空")
|
||||||
private String columnType;
|
private Boolean nullableFlag;
|
||||||
|
|
||||||
|
@Schema(description = "是否为主键")
|
||||||
|
private Boolean primaryKeyFlag;
|
||||||
|
|
||||||
|
@Schema(description = "是否递增")
|
||||||
|
private Boolean autoIncreaseFlag;
|
||||||
|
|
||||||
|
// --------------- 临时字段 -------------------
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String columnKey;
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String extra;
|
||||||
|
|
||||||
|
@Schema(hidden = true)
|
||||||
|
private String isNullable;
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,16 @@ public class DataTracerChangeContentService {
|
|||||||
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
|
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析批量bean的内容
|
||||||
|
*
|
||||||
|
* @param objectList 对象列表
|
||||||
|
* @return 单个内容
|
||||||
|
*/
|
||||||
|
public <T> String getChangeContent(List<T> objectList) {
|
||||||
|
return this.getObjectListContent(objectList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取一个对象的内容信息
|
* 获取一个对象的内容信息
|
||||||
*
|
*
|
||||||
|
@ -43,7 +43,6 @@ public class HelpDocCatalogEntity {
|
|||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
@TableField("`sort`")
|
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ public class HelpDocEntity {
|
|||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
@TableField("`sort`")
|
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ import java.util.Map;
|
|||||||
@Component
|
@Component
|
||||||
public class MailService {
|
public class MailService {
|
||||||
|
|
||||||
@Autowired
|
@Resource
|
||||||
private JavaMailSender javaMailSender;
|
private JavaMailSender javaMailSender;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.securityprotect.service;
|
|||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||||
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
|
import net.lab1024.sa.base.module.support.config.ConfigKeyEnum;
|
||||||
@ -29,17 +30,29 @@ public class Level3ProtectConfigService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启双因子登录,默认:开启
|
* 开启双因子登录,默认:开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 开启双因子登录,默认:开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean twoFactorLoginEnabled = false;
|
private boolean twoFactorLoginEnabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||||
|
* -- GETTER --
|
||||||
|
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int loginFailMaxTimes = -1;
|
private int loginFailMaxTimes = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||||
|
* -- GETTER --
|
||||||
|
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int loginFailLockSeconds = 1800;
|
private int loginFailLockSeconds = 1800;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,61 +62,53 @@ public class Level3ProtectConfigService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码复杂度 是否开启,默认:开启
|
* 密码复杂度 是否开启,默认:开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 密码复杂度 是否开启,默认:开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean passwordComplexityEnabled = true;
|
private boolean passwordComplexityEnabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
||||||
|
* -- GETTER --
|
||||||
|
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int regularChangePasswordDays = 90;
|
private int regularChangePasswordDays = 90;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
||||||
|
* -- GETTER --
|
||||||
|
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private int regularChangePasswordNotAllowRepeatTimes = 3;
|
private int regularChangePasswordNotAllowRepeatTimes = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件大小限制,单位 mb ,(默认:50 mb)
|
* 文件大小限制,单位 mb ,(默认:50 mb)
|
||||||
|
* -- GETTER --
|
||||||
|
* 文件大小限制,单位 mb ,(默认:50 mb)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private long maxUploadFileSizeMb = 50;
|
private long maxUploadFileSizeMb = 50;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件检测,默认:不开启
|
* 文件检测,默认:不开启
|
||||||
|
* -- GETTER --
|
||||||
|
* 文件检测,默认:不开启
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
private boolean fileDetectFlag = false;
|
private boolean fileDetectFlag = false;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ConfigService configService;
|
private ConfigService configService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件检测,默认:不开启
|
|
||||||
*/
|
|
||||||
public boolean isFileDetectFlag() {
|
|
||||||
return fileDetectFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小限制,单位 mb ,(默认:50 mb)
|
|
||||||
*/
|
|
||||||
public long getMaxUploadFileSizeMb() {
|
|
||||||
return maxUploadFileSizeMb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连续登录失败次数则锁定,-1表示不受限制,可以一直尝试登录
|
|
||||||
*/
|
|
||||||
public int getLoginFailMaxTimes() {
|
|
||||||
return loginFailMaxTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连续登录失败锁定时间(单位:秒),-1表示不锁定,建议锁定30分钟
|
|
||||||
*/
|
|
||||||
public int getLoginFailLockSeconds() {
|
|
||||||
return loginFailLockSeconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最低活跃时间(单位:秒),超过此时间没有操作系统就会被冻结,默认-1 代表不限制,永不冻结; 默认 30分钟
|
* 最低活跃时间(单位:秒),超过此时间没有操作系统就会被冻结,默认-1 代表不限制,永不冻结; 默认 30分钟
|
||||||
*/
|
*/
|
||||||
@ -111,34 +116,6 @@ public class Level3ProtectConfigService {
|
|||||||
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
|
return loginActiveTimeoutSeconds > 0 ? loginActiveTimeoutSeconds : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 定期修改密码时间间隔(默认:天),默认:建议90天更换密码
|
|
||||||
*/
|
|
||||||
public int getRegularChangePasswordDays() {
|
|
||||||
return regularChangePasswordDays;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开启双因子登录,默认:开启
|
|
||||||
*/
|
|
||||||
public boolean isTwoFactorLoginEnabled() {
|
|
||||||
return twoFactorLoginEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 密码复杂度 是否开启,默认:开启
|
|
||||||
*/
|
|
||||||
public boolean isPasswordComplexityEnabled() {
|
|
||||||
return passwordComplexityEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定期修改密码不允许相同次数,默认:3次以内密码不能相同
|
|
||||||
*/
|
|
||||||
public int getRegularChangePasswordNotAllowRepeatTimes() {
|
|
||||||
return regularChangePasswordNotAllowRepeatTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
void init() {
|
void init() {
|
||||||
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);
|
String configValue = configService.getConfigValue(ConfigKeyEnum.LEVEL3_PROTECT_CONFIG);
|
||||||
|
@ -9,6 +9,8 @@ import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberDao;
|
|||||||
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
|
import net.lab1024.sa.base.module.support.serialnumber.dao.SerialNumberRecordDao;
|
||||||
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
|
import net.lab1024.sa.base.module.support.serialnumber.domain.*;
|
||||||
import org.apache.commons.lang3.RandomUtils;
|
import org.apache.commons.lang3.RandomUtils;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -92,6 +94,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
|
|||||||
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
|
public abstract void initLastGenerateData(List<SerialNumberEntity> serialNumberEntityList);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
|
public String generate(SerialNumberIdEnum serialNumberIdEnum) {
|
||||||
List<String> generateList = this.generate(serialNumberIdEnum, 1);
|
List<String> generateList = this.generate(serialNumberIdEnum, 1);
|
||||||
if (generateList == null || generateList.isEmpty()) {
|
if (generateList == null || generateList.isEmpty()) {
|
||||||
@ -101,6 +104,7 @@ public abstract class SerialNumberBaseService implements SerialNumberService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
|
public List<String> generate(SerialNumberIdEnum serialNumberIdEnum, int count) {
|
||||||
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
|
SerialNumberInfoBO serialNumberInfoBO = serialNumberMap.get(serialNumberIdEnum.getSerialNumberId());
|
||||||
if (serialNumberInfoBO == null) {
|
if (serialNumberInfoBO == null) {
|
||||||
|
@ -9,7 +9,6 @@ import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberGenera
|
|||||||
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberInfoBO;
|
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberInfoBO;
|
||||||
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberLastGenerateBO;
|
import net.lab1024.sa.base.module.support.serialnumber.domain.SerialNumberLastGenerateBO;
|
||||||
import net.lab1024.sa.base.module.support.serialnumber.service.SerialNumberBaseService;
|
import net.lab1024.sa.base.module.support.serialnumber.service.SerialNumberBaseService;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -61,7 +60,7 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
|
|||||||
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
|
public List<String> generateSerialNumberList(SerialNumberInfoBO serialNumberInfo, int count) {
|
||||||
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
|
SerialNumberGenerateResultBO serialNumberGenerateResult = null;
|
||||||
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
|
String lockKey = RedisKeyConst.Support.SERIAL_NUMBER + serialNumberInfo.getSerialNumberId();
|
||||||
try {
|
|
||||||
boolean lock = false;
|
boolean lock = false;
|
||||||
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
|
for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) {
|
||||||
try {
|
try {
|
||||||
@ -77,6 +76,8 @@ public class SerialNumberRedisService extends SerialNumberBaseService {
|
|||||||
if (!lock) {
|
if (!lock) {
|
||||||
throw new BusinessException("SerialNumber 尝试5次,未能生成单号");
|
throw new BusinessException("SerialNumber 尝试5次,未能生成单号");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// 获取上次的生成结果
|
// 获取上次的生成结果
|
||||||
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
|
SerialNumberLastGenerateBO lastGenerateBO = (SerialNumberLastGenerateBO) redisService.mget(
|
||||||
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,
|
RedisKeyConst.Support.SERIAL_NUMBER_LAST_INFO,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<!--关键字-->
|
<!--关键字-->
|
||||||
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
<if test="queryForm.keyword != null and queryForm.keyword != ''">
|
||||||
AND ( INSTR(t_change_log.version,#{queryForm.keyword})
|
AND ( INSTR(t_change_log.update_version,#{queryForm.keyword})
|
||||||
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
|
OR INSTR(t_change_log.publish_author,#{queryForm.keyword})
|
||||||
OR INSTR(t_change_log.content,#{queryForm.keyword})
|
OR INSTR(t_change_log.content,#{queryForm.keyword})
|
||||||
)
|
)
|
||||||
@ -35,12 +35,12 @@
|
|||||||
AND t_change_log.link = #{queryForm.link}
|
AND t_change_log.link = #{queryForm.link}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by t_change_log.version desc
|
order by t_change_log.update_version desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByVersion"
|
<select id="selectByVersion"
|
||||||
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
|
resultType="net.lab1024.sa.base.module.support.changelog.domain.entity.ChangeLogEntity">
|
||||||
select * from t_change_log where `version` = #{version}
|
select * from t_change_log where update_version = #{version}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<if test="query.userType != null">
|
<if test="query.userType != null">
|
||||||
AND user_type = #{query.userType}
|
AND user_type = #{query.userType}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.ip != null">
|
<if test="query.ip != null and query.ip != ''">
|
||||||
AND INSTR(login_ip,#{query.ip})
|
AND INSTR(login_ip,#{query.ip})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.startDate != null and query.startDate != ''">
|
<if test="query.startDate != null and query.startDate != ''">
|
||||||
@ -25,9 +25,6 @@
|
|||||||
<if test="query.userName != null and query.userName != ''">
|
<if test="query.userName != null and query.userName != ''">
|
||||||
AND INSTR(user_name,#{query.userName})
|
AND INSTR(user_name,#{query.userName})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.ip != null">
|
|
||||||
AND INSTR(login_ip,#{query.ip})
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
AND INSTR(operate_user_name,#{query.userName})
|
AND INSTR(operate_user_name,#{query.userName})
|
||||||
</if>
|
</if>
|
||||||
<if test="query.keywords != null and query.keywords != ''">
|
<if test="query.keywords != null and query.keywords != ''">
|
||||||
AND (INSTR(`module`,#{query.keywords}) OR INSTR(content,#{query.keywords}))
|
AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords}))
|
||||||
</if>
|
</if>
|
||||||
<if test="query.requestKeywords != null and query.requestKeywords != ''">
|
<if test="query.requestKeywords != null and query.requestKeywords != ''">
|
||||||
AND (INSTR(`url`,#{query.requestKeywords}) OR INSTR(`method`,#{query.requestKeywords}) OR INSTR(`param`,#{query.requestKeywords}))
|
AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}))
|
||||||
</if>
|
</if>
|
||||||
<if test="query.successFlag != null">
|
<if test="query.successFlag != null">
|
||||||
AND success_flag = #{query.successFlag}
|
AND success_flag = #{query.successFlag}
|
||||||
|
0
smart-admin-web-javascript/README.en.md
Normal file
0
smart-admin-web-javascript/README.en.md
Normal file
0
smart-admin-web-javascript/README.md
Normal file
0
smart-admin-web-javascript/README.md
Normal file
@ -12,7 +12,7 @@
|
|||||||
<a-tree-select
|
<a-tree-select
|
||||||
:value="props.value"
|
:value="props.value"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
:fieldNames="{ label: 'name', key: 'departmentId', value: 'departmentId' }"
|
:fieldNames="{ label: 'departmentName', key: 'departmentId', value: 'departmentId' }"
|
||||||
show-search
|
show-search
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
|
@ -29,7 +29,7 @@ export const appDefaultConfig = {
|
|||||||
// 标签页
|
// 标签页
|
||||||
pageTagFlag: true,
|
pageTagFlag: true,
|
||||||
// 标签页样式: default、 antd、chrome
|
// 标签页样式: default、 antd、chrome
|
||||||
pageTagStyle: 'default',
|
pageTagStyle: 'chrome',
|
||||||
// 面包屑
|
// 面包屑
|
||||||
breadCrumbFlag: true,
|
breadCrumbFlag: true,
|
||||||
// 页脚
|
// 页脚
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
|
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
|
||||||
<a-form-item label="版本" name="version">
|
<a-form-item label="版本" name="updateVersion">
|
||||||
<a-input style="width: 100%" v-model:value="form.version" placeholder="版本" />
|
<a-input style="width: 100%" v-model:value="form.updateVersion" placeholder="版本" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="更新类型" name="type">
|
<a-form-item label="更新类型" name="type">
|
||||||
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
|
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
const formDefault = {
|
const formDefault = {
|
||||||
changeLogId: undefined,
|
changeLogId: undefined,
|
||||||
version: undefined, //版本
|
updateVersion: undefined, //版本
|
||||||
type: undefined, //更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
type: undefined, //更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
||||||
publishAuthor: undefined, //发布人
|
publishAuthor: undefined, //发布人
|
||||||
publicDate: undefined, //发布日期
|
publicDate: undefined, //发布日期
|
||||||
@ -96,7 +96,7 @@
|
|||||||
let form = reactive({ ...formDefault });
|
let form = reactive({ ...formDefault });
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
version: [{ required: true, message: '版本 必填' }],
|
updateVersion: [{ required: true, message: '版本 必填' }],
|
||||||
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
|
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
|
||||||
publishAuthor: [{ required: true, message: '发布人 必填' }],
|
publishAuthor: [{ required: true, message: '发布人 必填' }],
|
||||||
publicDate: [{ required: true, message: '发布日期 必填' }],
|
publicDate: [{ required: true, message: '发布日期 必填' }],
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ text, record, column }">
|
<template #bodyCell="{ text, record, column }">
|
||||||
<template v-if="column.dataIndex === 'version'">
|
<template v-if="column.dataIndex === 'updateVersion'">
|
||||||
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
|
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'type'">
|
<template v-if="column.dataIndex === 'type'">
|
||||||
@ -135,7 +135,7 @@
|
|||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: '版本',
|
title: '版本',
|
||||||
dataIndex: 'version',
|
dataIndex: 'updateVersion',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -176,9 +176,9 @@
|
|||||||
columnName: column.columnName,
|
columnName: column.columnName,
|
||||||
columnComment: column.columnComment,
|
columnComment: column.columnComment,
|
||||||
dataType: column.dataType,
|
dataType: column.dataType,
|
||||||
nullableFlag: column.isNullable === 'NO',
|
nullableFlag: column.nullableFlag,
|
||||||
primaryKeyFlag: column.columnKey === 'PRI',
|
primaryKeyFlag: column.primaryKeyFlag,
|
||||||
autoIncreaseFlag: column.extra === 'auto_increment',
|
autoIncreaseFlag: column.autoIncreaseFlag,
|
||||||
//表单
|
//表单
|
||||||
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
|
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
|
||||||
label: configField ? configField.label : column.columnComment,
|
label: configField ? configField.label : column.columnComment,
|
||||||
|
@ -216,9 +216,9 @@
|
|||||||
columnName: column.columnName,
|
columnName: column.columnName,
|
||||||
columnComment: column.columnComment,
|
columnComment: column.columnComment,
|
||||||
dataType: column.dataType,
|
dataType: column.dataType,
|
||||||
nullableFlag: column.isNullable === 'NO',
|
nullableFlag: column.nullableFlag,
|
||||||
primaryKeyFlag: column.columnKey === 'PRI',
|
primaryKeyFlag: column.primaryKeyFlag,
|
||||||
autoIncreaseFlag: column.extra === 'auto_increment',
|
autoIncreaseFlag: column.autoIncreaseFlag,
|
||||||
};
|
};
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
|
@ -102,6 +102,7 @@
|
|||||||
const visibleFlag = ref(false);
|
const visibleFlag = ref(false);
|
||||||
function showModal(table) {
|
function showModal(table) {
|
||||||
Object.assign(tableInfo, table);
|
Object.assign(tableInfo, table);
|
||||||
|
tableInfo.createTime = table.createTime ? table.createTime : new Date();
|
||||||
activeKey.value = '1';
|
activeKey.value = '1';
|
||||||
visibleFlag.value = true;
|
visibleFlag.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<DepartmentTreeSelect ref="departmentTreeSelect" v-model:value="formState.parentId" :defaultValueFlag="false"
|
<DepartmentTreeSelect ref="departmentTreeSelect" v-model:value="formState.parentId" :defaultValueFlag="false"
|
||||||
width="100%" />
|
width="100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="部门名称" name="name">
|
<a-form-item label="部门名称" name="departmentName">
|
||||||
<a-input v-model:value.trim="formState.name" placeholder="请输入部门名称" />
|
<a-input v-model:value.trim="formState.departmentName" placeholder="请输入部门名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="部门负责人" name="managerId">
|
<a-form-item label="部门负责人" name="managerId">
|
||||||
<EmployeeSelect ref="employeeSelect" placeholder="请选择部门负责人" width="100%" v-model:value="formState.managerId"
|
<EmployeeSelect ref="employeeSelect" placeholder="请选择部门负责人" width="100%" v-model:value="formState.managerId"
|
||||||
@ -76,7 +76,7 @@ const emits = defineEmits(['refresh']);
|
|||||||
const defaultDepartmentForm = {
|
const defaultDepartmentForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
managerId: undefined, //部门负责人
|
managerId: undefined, //部门负责人
|
||||||
name: undefined,
|
departmentName: undefined,
|
||||||
parentId: undefined,
|
parentId: undefined,
|
||||||
sort: 0,
|
sort: 0,
|
||||||
};
|
};
|
||||||
@ -88,7 +88,7 @@ let formState = reactive({
|
|||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
parentId: [{ required: true, message: '上级部门不能为空' }],
|
parentId: [{ required: true, message: '上级部门不能为空' }],
|
||||||
name: [
|
departmentName: [
|
||||||
{ required: true, message: '部门名称不能为空' },
|
{ required: true, message: '部门名称不能为空' },
|
||||||
{ max: 50, message: '部门名称不能大于20个字符', trigger: 'blur' },
|
{ max: 50, message: '部门名称不能大于20个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
|
@ -95,8 +95,8 @@
|
|||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: '部门名称',
|
title: '部门名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'departmentName',
|
||||||
key: 'name',
|
key: 'departmentName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '负责人',
|
title: '负责人',
|
||||||
@ -189,7 +189,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 筛选出名称符合的部门
|
// 筛选出名称符合的部门
|
||||||
let filterDepartment = originData.filter((e) => e.name.indexOf(keywords.value) > -1);
|
let filterDepartment = originData.filter((e) => e.departmentName.indexOf(keywords.value) > -1);
|
||||||
let filterDepartmentList = [];
|
let filterDepartmentList = [];
|
||||||
// 循环筛选出的部门 构建部门树
|
// 循环筛选出的部门 构建部门树
|
||||||
filterDepartment.forEach((e) => {
|
filterDepartment.forEach((e) => {
|
||||||
@ -220,7 +220,7 @@
|
|||||||
function addDepartment(e) {
|
function addDepartment(e) {
|
||||||
let data = {
|
let data = {
|
||||||
departmentId: 0,
|
departmentId: 0,
|
||||||
name: '',
|
departmentName: '',
|
||||||
parentId: e.departmentId || null,
|
parentId: e.departmentId || null,
|
||||||
};
|
};
|
||||||
departmentFormModal.value.showModal(data);
|
departmentFormModal.value.showModal(data);
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<template #renderItem="{ item }">
|
<template #renderItem="{ item }">
|
||||||
<a-list-item>
|
<a-list-item>
|
||||||
<div class="department-item" @click="selectTree(item.departmentId)">
|
<div class="department-item" @click="selectTree(item.departmentId)">
|
||||||
{{ item.name }}
|
{{ item.departmentName }}
|
||||||
<RightOutlined />
|
<RightOutlined />
|
||||||
</div>
|
</div>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
v-model:checkedKeys="checkedKeys"
|
v-model:checkedKeys="checkedKeys"
|
||||||
class="tree"
|
class="tree"
|
||||||
:treeData="departmentTreeData"
|
:treeData="departmentTreeData"
|
||||||
:fieldNames="{ title: 'name', key: 'departmentId', value: 'departmentId' }"
|
:fieldNames="{ title: 'departmentName', key: 'departmentId', value: 'departmentId' }"
|
||||||
style="width: 100%; overflow-x: auto"
|
style="width: 100%; overflow-x: auto"
|
||||||
:style="[!height ? '' : { height: `${height}px`, overflowY: 'auto' }]"
|
:style="[!height ? '' : { height: `${height}px`, overflowY: 'auto' }]"
|
||||||
:checkable="props.checkable"
|
:checkable="props.checkable"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
@select="treeSelectChange"
|
@select="treeSelectChange"
|
||||||
>
|
>
|
||||||
<template #title="item">
|
<template #title="item">
|
||||||
<div>{{ item.name }}</div>
|
<div>{{ item.departmentName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
<div class="no-data" v-else>暂无结果</div>
|
<div class="no-data" v-else>暂无结果</div>
|
||||||
@ -158,7 +158,7 @@
|
|||||||
selectedDepartmentChildren.value = departmentList.value.filter((e) => e.parentId == id);
|
selectedDepartmentChildren.value = departmentList.value.filter((e) => e.parentId == id);
|
||||||
let filterDepartmentList = [];
|
let filterDepartmentList = [];
|
||||||
recursionFilterDepartment(filterDepartmentList, id, true);
|
recursionFilterDepartment(filterDepartmentList, id, true);
|
||||||
breadcrumb.value = filterDepartmentList.map((e) => e.name);
|
breadcrumb.value = filterDepartmentList.map((e) => e.departmentName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------- 筛选 ---------------------
|
// ----------------------- 筛选 ---------------------
|
||||||
@ -181,7 +181,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 筛选出名称符合的部门
|
// 筛选出名称符合的部门
|
||||||
let filterDepartment = originData.filter((e) => e.name.indexOf(keywords.value) > -1);
|
let filterDepartment = originData.filter((e) => e.departmentName.indexOf(keywords.value) > -1);
|
||||||
let filterDepartmentList = [];
|
let filterDepartmentList = [];
|
||||||
// 循环筛选出的部门 构建部门树
|
// 循环筛选出的部门 构建部门树
|
||||||
filterDepartment.forEach((e) => {
|
filterDepartment.forEach((e) => {
|
||||||
|
0
smart-admin-web-typescript/README.md
Normal file
0
smart-admin-web-typescript/README.md
Normal file
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import {computed, h} from 'vue';
|
import { computed, h, useSlots } from 'vue';
|
||||||
import { messages } from '/@/i18n';
|
import { messages } from '/@/i18n';
|
||||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||||
@ -52,6 +52,7 @@ import {Popover, theme} from 'ant-design-vue';
|
|||||||
import { themeColors } from '/@/theme/color.js';
|
import { themeColors } from '/@/theme/color.js';
|
||||||
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
||||||
|
|
||||||
|
const slots = useSlots();
|
||||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||||
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
||||||
dayjs.locale(dayjsLocale);
|
dayjs.locale(dayjsLocale);
|
||||||
@ -88,7 +89,6 @@ import SmartCopyIcon from '/@/components/framework/smart-copy-icon/index.vue';
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
:deep(.ant-table-column-sorters) {
|
:deep(.ant-table-column-sorters) {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<a-tree-select
|
<a-tree-select
|
||||||
:value="props.value"
|
:value="props.value"
|
||||||
:treeData="treeData"
|
:treeData="treeData"
|
||||||
:fieldNames="{ label: 'name', key: 'departmentId', value: 'departmentId' }"
|
:fieldNames="{ label: 'departmentName', key: 'departmentId', value: 'departmentId' }"
|
||||||
show-search
|
show-search
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
|
@ -29,7 +29,7 @@ export const appDefaultConfig = {
|
|||||||
// 标签页
|
// 标签页
|
||||||
pageTagFlag: true,
|
pageTagFlag: true,
|
||||||
// 标签页样式: default、 antd、chrome
|
// 标签页样式: default、 antd、chrome
|
||||||
pageTagStyle: 'default',
|
pageTagStyle: 'chrome',
|
||||||
// 面包屑
|
// 面包屑
|
||||||
breadCrumbFlag: true,
|
breadCrumbFlag: true,
|
||||||
// 页脚
|
// 页脚
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-button-group>
|
</a-button-group>
|
||||||
|
|
||||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:bank:add')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
</template>
|
</template>
|
||||||
@ -60,8 +60,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'action'">
|
<template v-else-if="column.dataIndex === 'action'">
|
||||||
<div class="smart-table-operate">
|
<div class="smart-table-operate">
|
||||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:bank:update')">编辑</a-button>
|
||||||
<a-button @click="confirmDelete(record.bankId)" danger type="link">删除</a-button>
|
<a-button @click="confirmDelete(record.bankId)" danger type="link" v-if="$privilege('oa:bank:delete')">删除</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||||
<a-form-item label="开户银行" name="bankName">
|
<a-form-item label="开户银行" name="bankName">
|
||||||
<a-input v-model:value="form.bankName" placeholder="请输入开户银行" />
|
<a-input v-model:value="form.bankName" placeholder="请输入开户银行" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -16,12 +16,20 @@
|
|||||||
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
|
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
|
||||||
<a-button class="button-style" type="default" @click="resetQueryEmployee">重置</a-button>
|
<a-button class="button-style" type="default" @click="resetQueryEmployee">重置</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a-button class="button-style" type="primary" @click="addEmployee" v-privilege="'oa:enterprise:addEmployee'"> 添加员工 </a-button>
|
<a-button class="button-style" type="primary" @click="addEmployee" v-privilege="'oa:enterprise:addEmployee'"> 添加员工 </a-button>
|
||||||
<a-button class="button-style" type="primary" danger @click="batchDelete" v-privilege="'oa:enterprise:deleteEmployee'"> 批量移除 </a-button>
|
<a-button class="button-style" type="primary" danger @click="batchDelete" v-privilege="'oa:enterprise:deleteEmployee'"> 批量移除 </a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a-card size="small" :bordered="false" :hoverable="false">
|
||||||
|
<a-row justify="end">
|
||||||
|
<TableOperator
|
||||||
|
class="smart-margin-bottom5"
|
||||||
|
v-model="columns"
|
||||||
|
:tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_EMPLOYEE"
|
||||||
|
:refresh="queryEmployee"
|
||||||
|
/>
|
||||||
|
</a-row>
|
||||||
<a-table
|
<a-table
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
:dataSource="tableData"
|
:dataSource="tableData"
|
||||||
@ -32,7 +40,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
bordered
|
bordered
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ text, record, index, column }">
|
<template #bodyCell="{ text, record, column }">
|
||||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||||
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
||||||
</template>
|
</template>
|
||||||
@ -40,7 +48,7 @@
|
|||||||
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operate'">
|
<template v-if="column.dataIndex === 'operate'">
|
||||||
<a @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a>
|
<a-button type="link" @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -60,6 +68,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
||||||
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -72,6 +81,8 @@
|
|||||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, showTableTotal } from '/@/constants/common-const';
|
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, showTableTotal } from '/@/constants/common-const';
|
||||||
import { smartSentry } from '/@/lib/smart-sentry';
|
import { smartSentry } from '/@/lib/smart-sentry';
|
||||||
|
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||||
|
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
enterpriseId: {
|
enterpriseId: {
|
||||||
@ -112,7 +123,8 @@
|
|||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'operate',
|
dataIndex: 'operate',
|
||||||
width: 60,
|
width: 90,
|
||||||
|
align: 'center',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -271,7 +283,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: 20px 0;
|
padding: 10px 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-style {
|
.button-style {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-button-group>
|
</a-button-group>
|
||||||
|
|
||||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:invoice:add')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
</template>
|
</template>
|
||||||
@ -51,14 +51,14 @@
|
|||||||
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_INVOICE" :refresh="ajaxQuery" />
|
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_INVOICE" :refresh="ajaxQuery" />
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :scroll="{ x: 1300 }" size="small" :dataSource="tableData" :columns="columns" rowKey="invoiceId" :pagination="false" bordered>
|
<a-table :scroll="{ x: 1300 }" size="small" :dataSource="tableData" :columns="columns" rowKey="invoiceId" :pagination="false" bordered>
|
||||||
<template #bodyCell="{ text, record, index, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||||
{{ record.disabledFlag ? '禁用' : '启用' }}
|
{{ record.disabledFlag ? '禁用' : '启用' }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'action'">
|
<template v-else-if="column.dataIndex === 'action'">
|
||||||
<div class="smart-table-operate">
|
<div class="smart-table-operate">
|
||||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:invoice:update')">编辑</a-button>
|
||||||
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger>删除</a-button>
|
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger v-if="$privilege('oa:invoice:delete')">删除</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
|
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||||
<a-form-item label="开票抬头" name="invoiceHeads">
|
<a-form-item label="开票抬头" name="invoiceHeads">
|
||||||
<a-input v-model:value="form.invoiceHeads" placeholder="请输入开票抬头" />
|
<a-input v-model:value="form.invoiceHeads" placeholder="请输入开票抬头" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal :open="visible" title="添加" :width="700" forceRender ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
<a-modal
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 6 }">
|
:open="visible"
|
||||||
|
:title="form.enterpriseId ? '编辑' : '添加'"
|
||||||
|
:width="700"
|
||||||
|
forceRender
|
||||||
|
ok-text="确认"
|
||||||
|
cancel-text="取消"
|
||||||
|
@ok="onSubmit"
|
||||||
|
@cancel="onClose"
|
||||||
|
>
|
||||||
|
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
||||||
<a-form-item label="企业名称" name="enterpriseName">
|
<a-form-item label="企业名称" name="enterpriseName">
|
||||||
<a-input v-model:value="form.enterpriseName" placeholder="请输入企业名称" />
|
<a-input v-model:value="form.enterpriseName" placeholder="请输入企业名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
|
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }">
|
||||||
<a-form-item label="版本" name="version">
|
<a-form-item label="版本" name="updateVersion">
|
||||||
<a-input style="width: 100%" v-model:value="form.version" placeholder="版本" />
|
<a-input style="width: 100%" v-model:value="form.updateVersion" placeholder="版本" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="更新类型" name="type">
|
<a-form-item label="更新类型" name="type">
|
||||||
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
|
<SmartEnumSelect width="100%" v-model:value="form.type" enumName="CHANGE_LOG_TYPE_ENUM" placeholder="更新类型" />
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
const formDefault = {
|
const formDefault = {
|
||||||
changeLogId: undefined,
|
changeLogId: undefined,
|
||||||
version: undefined, //版本
|
updateVersion: undefined, //版本
|
||||||
type: undefined, //更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
type: undefined, //更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复]
|
||||||
publishAuthor: undefined, //发布人
|
publishAuthor: undefined, //发布人
|
||||||
publicDate: undefined, //发布日期
|
publicDate: undefined, //发布日期
|
||||||
@ -96,7 +96,7 @@
|
|||||||
let form = reactive({ ...formDefault });
|
let form = reactive({ ...formDefault });
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
version: [{ required: true, message: '版本 必填' }],
|
updateVersion: [{ required: true, message: '版本 必填' }],
|
||||||
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
|
type: [{ required: true, message: '更新类型:[1:特大版本功能更新;2:功能更新;3:bug修复] 必填' }],
|
||||||
publishAuthor: [{ required: true, message: '发布人 必填' }],
|
publishAuthor: [{ required: true, message: '发布人 必填' }],
|
||||||
publicDate: [{ required: true, message: '发布日期 必填' }],
|
publicDate: [{ required: true, message: '发布日期 必填' }],
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ text, record, column }">
|
<template #bodyCell="{ text, record, column }">
|
||||||
<template v-if="column.dataIndex === 'version'">
|
<template v-if="column.dataIndex === 'updateVersion'">
|
||||||
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
|
<a-button @click="showModal(record)" type="link">{{ text }}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'type'">
|
<template v-if="column.dataIndex === 'type'">
|
||||||
@ -135,7 +135,7 @@
|
|||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: '版本',
|
title: '版本',
|
||||||
dataIndex: 'version',
|
dataIndex: 'updateVersion',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -176,9 +176,9 @@
|
|||||||
columnName: column.columnName,
|
columnName: column.columnName,
|
||||||
columnComment: column.columnComment,
|
columnComment: column.columnComment,
|
||||||
dataType: column.dataType,
|
dataType: column.dataType,
|
||||||
nullableFlag: column.isNullable === 'NO',
|
nullableFlag: column.nullableFlag,
|
||||||
primaryKeyFlag: column.columnKey === 'PRI',
|
primaryKeyFlag: column.primaryKeyFlag,
|
||||||
autoIncreaseFlag: column.extra === 'auto_increment',
|
autoIncreaseFlag: column.autoIncreaseFlag,
|
||||||
//表单
|
//表单
|
||||||
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
|
fieldName: configField ? configField.fieldName : convertLowerCamel(column.columnName),
|
||||||
label: configField ? configField.label : column.columnComment,
|
label: configField ? configField.label : column.columnComment,
|
||||||
|
@ -216,9 +216,9 @@
|
|||||||
columnName: column.columnName,
|
columnName: column.columnName,
|
||||||
columnComment: column.columnComment,
|
columnComment: column.columnComment,
|
||||||
dataType: column.dataType,
|
dataType: column.dataType,
|
||||||
nullableFlag: column.isNullable === 'NO',
|
nullableFlag: column.nullableFlag,
|
||||||
primaryKeyFlag: column.columnKey === 'PRI',
|
primaryKeyFlag: column.primaryKeyFlag,
|
||||||
autoIncreaseFlag: column.extra === 'auto_increment',
|
autoIncreaseFlag: column.autoIncreaseFlag,
|
||||||
};
|
};
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user