Skip to content

Commit

Permalink
🏁 v2.5.3.45
Browse files Browse the repository at this point in the history
1. 修复CreateTime、UpdateTime等字段不生成问题
2. 重新生成数据,数据导入脚本
  • Loading branch information
herodotus-ecosystem committed Jul 25, 2021
1 parent eb6185f commit 94f696e
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Column;
import javax.persistence.OrderBy;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
Expand All @@ -40,6 +40,7 @@
* @author : gengwei.zheng
* @date : 2021/7/7 16:32
*/
@MappedSuperclass
public abstract class CommonEntity extends AbstractEntity {

@ApiModelProperty(value = "数据创建时间")
Expand All @@ -56,7 +57,6 @@ public abstract class CommonEntity extends AbstractEntity {

@ApiModelProperty(value = "排序值")
@Column(name = "ranking")
@OrderBy("ranking asc")
private Integer ranking = 0;

public Date getCreateTime() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,10 @@
* Date: 2021/05/07 11:28:07
*/

create extension "uuid-ossp";
-- ----------------------------
-- 初始化用户信息
-- 如果要重新生成权限数据,可以用下面脚本生成角色1 与权限的关系
-- ----------------------------
INSERT INTO sys_user (user_id, create_time, update_time, ranking, is_reserved, status, employee_id, user_name,
nick_name, password)
SELECT uuid_generate_v4() AS user_id,
se.create_time,
se.update_time,
se.ranking,
TRUE AS is_reserved,
se.status,
se.employee_id,
se.employee_name AS user_name,
se.mobile_phone_number AS nick_name,
'$2a$10$fi5ecIcM3hy9RQwE0x78oeyNecPFiUgi0PnhESeENjX3G4CBvYOLO' AS password
FROM "sys_employee" se
INSERT INTO sys_role_authority (role_id, authority_id)
SELECT '1' role_id,
sa.authority_id
FROM "sys_authority" sa
Loading

0 comments on commit 94f696e

Please sign in to comment.