# Conflicts: # pmapi/pom.xmltags/24080901
@@ -66,14 +66,6 @@ | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-validation</artifactId> | <artifactId>spring-boot-starter-validation</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>nl.basjes.parse.useragent</groupId> | |||||
<artifactId>yauaa</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>jakarta.persistence</groupId> | |||||
<artifactId>jakarta.persistence-api</artifactId> | |||||
</dependency> | |||||
<!-- <dependency>--> | <!-- <dependency>--> | ||||
<!-- <groupId>org.springframework.data</groupId>--> | <!-- <groupId>org.springframework.data</groupId>--> | ||||
<!-- <artifactId>spring-data-jpa</artifactId>--> | <!-- <artifactId>spring-data-jpa</artifactId>--> | ||||
@@ -115,10 +107,6 @@ | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-aop</artifactId> | <artifactId>spring-boot-starter-aop</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>org.springframework</groupId> | |||||
<artifactId>spring-test</artifactId> | |||||
</dependency> | |||||
<!--cache--> | <!--cache--> | ||||
<dependency> | <dependency> | ||||
<groupId>com.github.ben-manes.caffeine</groupId> | <groupId>com.github.ben-manes.caffeine</groupId> | ||||
@@ -148,12 +136,10 @@ | |||||
<artifactId>jjwt-jackson</artifactId> | <artifactId>jjwt-jackson</artifactId> | ||||
<version>${jjwt.version}</version> | <version>${jjwt.version}</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.apache.poi</groupId> | <groupId>org.apache.poi</groupId> | ||||
<artifactId>poi</artifactId> | <artifactId>poi</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.apache.poi</groupId> | <groupId>org.apache.poi</groupId> | ||||
<artifactId>poi-ooxml</artifactId> | <artifactId>poi-ooxml</artifactId> | ||||
@@ -173,28 +159,6 @@ | |||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectjweaver</artifactId> | <artifactId>aspectjweaver</artifactId> | ||||
</dependency> | </dependency> | ||||
<!--pdf工具依赖 start--> | |||||
<dependency> | |||||
<groupId>com.itextpdf</groupId> | |||||
<artifactId>itextpdf</artifactId> | |||||
<version>5.5.13</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.itextpdf</groupId> | |||||
<artifactId>itext-asian</artifactId> | |||||
<version>5.2.0</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.apache.pdfbox</groupId> | |||||
<artifactId>pdfbox</artifactId> | |||||
<version>2.0.4</version> | |||||
</dependency> | |||||
<!--pdf工具依赖 end--> | |||||
<dependency> | |||||
<groupId>org.jxls</groupId> | |||||
<artifactId>jxls-jexcel</artifactId> | |||||
<version>1.0.6</version> | |||||
</dependency> | |||||
<!--Spring boot 测试--> | <!--Spring boot 测试--> | ||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
@@ -202,18 +166,14 @@ | |||||
<scope>test</scope> | <scope>test</scope> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-starter-freemarker</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.mapstruct</groupId> | <groupId>org.mapstruct</groupId> | ||||
<artifactId>mapstruct</artifactId> | <artifactId>mapstruct</artifactId> | ||||
<version>1.4.2.Final</version> | |||||
<version>1.5.3.Final</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.mapstruct</groupId> | <groupId>org.mapstruct</groupId> | ||||
<artifactId>mapstruct-processor</artifactId> | <artifactId>mapstruct-processor</artifactId> | ||||
<version>1.4.2.Final</version> | |||||
<version>1.5.3.Final</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
@@ -347,6 +307,7 @@ | |||||
<groupId>org.apache.maven.plugins</groupId> | <groupId>org.apache.maven.plugins</groupId> | ||||
<artifactId>maven-surefire-plugin</artifactId> | <artifactId>maven-surefire-plugin</artifactId> | ||||
<configuration> | <configuration> | ||||
<skipTests>true</skipTests> | <skipTests>true</skipTests> | ||||
</configuration> | </configuration> | ||||
</plugin> | </plugin> | ||||
@@ -1,4 +1,4 @@ | |||||
package com.ningdatech.pmapi.common.constants; | |||||
package com.ningdatech.pmapi.common.constant; | |||||
import com.ningdatech.basic.model.ApiResponse; | import com.ningdatech.basic.model.ApiResponse; | ||||
@@ -81,16 +81,6 @@ public interface BizConst { | |||||
*/ | */ | ||||
String REGEX_PASS = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,20}$"; | String REGEX_PASS = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,20}$"; | ||||
/** | |||||
* 租车费率 | |||||
*/ | |||||
BigDecimal RATE_CAR_RENTAL = new BigDecimal("1.13"); | |||||
/** | |||||
* 服务费率 | |||||
*/ | |||||
BigDecimal RATE_SERVICE = new BigDecimal("0.0442"); | |||||
ApiResponse<Void> UNAUTHENTICATED = ApiResponse.of(401, "用户未登录", null); | ApiResponse<Void> UNAUTHENTICATED = ApiResponse.of(401, "用户未登录", null); | ||||
int MAX_EXPORT_COUNT = 5000; | int MAX_EXPORT_COUNT = 5000; |
@@ -0,0 +1,13 @@ | |||||
package com.ningdatech.pmapi.organization.manage; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/1/13 下午2:55 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class OrganizationManage { | |||||
} |
@@ -3,10 +3,12 @@ package com.ningdatech.pmapi.user.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -16,6 +18,7 @@ import io.swagger.annotations.ApiModelProperty; | |||||
* @author Liuxinxin | * @author Liuxinxin | ||||
* @since 2023-01-05 | * @since 2023-01-05 | ||||
*/ | */ | ||||
@Data | |||||
@TableName("nd_role_info") | @TableName("nd_role_info") | ||||
@ApiModel(value = "RoleInfo对象", description = "角色表") | @ApiModel(value = "RoleInfo对象", description = "角色表") | ||||
public class RoleInfo implements Serializable { | public class RoleInfo implements Serializable { | ||||
@@ -35,50 +38,4 @@ public class RoleInfo implements Serializable { | |||||
private LocalDateTime updateOn; | private LocalDateTime updateOn; | ||||
public Long getId() { | |||||
return id; | |||||
} | |||||
public void setId(Long id) { | |||||
this.id = id; | |||||
} | |||||
public String getName() { | |||||
return name; | |||||
} | |||||
public void setName(String name) { | |||||
this.name = name; | |||||
} | |||||
public String getDescription() { | |||||
return description; | |||||
} | |||||
public void setDescription(String description) { | |||||
this.description = description; | |||||
} | |||||
public LocalDateTime getCreateOn() { | |||||
return createOn; | |||||
} | |||||
public void setCreateOn(LocalDateTime createOn) { | |||||
this.createOn = createOn; | |||||
} | |||||
public LocalDateTime getUpdateOn() { | |||||
return updateOn; | |||||
} | |||||
public void setUpdateOn(LocalDateTime updateOn) { | |||||
this.updateOn = updateOn; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return "RoleInfo{" + | |||||
"id=" + id + | |||||
", name=" + name + | |||||
", description=" + description + | |||||
", createOn=" + createOn + | |||||
", updateOn=" + updateOn + | |||||
"}"; | |||||
} | |||||
} | } |
@@ -3,10 +3,11 @@ package com.ningdatech.pmapi.user.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -16,6 +17,7 @@ import io.swagger.annotations.ApiModelProperty; | |||||
* @author Liuxinxin | * @author Liuxinxin | ||||
* @since 2023-01-04 | * @since 2023-01-04 | ||||
*/ | */ | ||||
@Data | |||||
@TableName("nd_user_auth") | @TableName("nd_user_auth") | ||||
@ApiModel(value = "UserAuth对象", description = "用户鉴权表") | @ApiModel(value = "UserAuth对象", description = "用户鉴权表") | ||||
public class UserAuth implements Serializable { | public class UserAuth implements Serializable { | ||||
@@ -37,66 +39,4 @@ public class UserAuth implements Serializable { | |||||
private String credential; | private String credential; | ||||
public Long getId() { | |||||
return id; | |||||
} | |||||
public void setId(Long id) { | |||||
this.id = id; | |||||
} | |||||
public LocalDateTime getCreateOn() { | |||||
return createOn; | |||||
} | |||||
public void setCreateOn(LocalDateTime createOn) { | |||||
this.createOn = createOn; | |||||
} | |||||
public LocalDateTime getUpdateOn() { | |||||
return updateOn; | |||||
} | |||||
public void setUpdateOn(LocalDateTime updateOn) { | |||||
this.updateOn = updateOn; | |||||
} | |||||
public Long getUserId() { | |||||
return userId; | |||||
} | |||||
public void setUserId(Long userId) { | |||||
this.userId = userId; | |||||
} | |||||
public String getAuthType() { | |||||
return authType; | |||||
} | |||||
public void setAuthType(String authType) { | |||||
this.authType = authType; | |||||
} | |||||
public String getIdentifier() { | |||||
return identifier; | |||||
} | |||||
public void setIdentifier(String identifier) { | |||||
this.identifier = identifier; | |||||
} | |||||
public String getCredential() { | |||||
return credential; | |||||
} | |||||
public void setCredential(String credential) { | |||||
this.credential = credential; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return "UserAuth{" + | |||||
"id=" + id + | |||||
", createOn=" + createOn + | |||||
", updateOn=" + updateOn + | |||||
", userId=" + userId + | |||||
", authType=" + authType + | |||||
", identifier=" + identifier + | |||||
", credential=" + credential + | |||||
"}"; | |||||
} | |||||
} | } |
@@ -3,10 +3,12 @@ package com.ningdatech.pmapi.user.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -16,6 +18,7 @@ import io.swagger.annotations.ApiModelProperty; | |||||
* @author Liuxinxin | * @author Liuxinxin | ||||
* @since 2023-01-04 | * @since 2023-01-04 | ||||
*/ | */ | ||||
@Data | |||||
@TableName("nd_user_info") | @TableName("nd_user_info") | ||||
@ApiModel(value = "UserInfo对象", description = "用户信息表") | @ApiModel(value = "UserInfo对象", description = "用户信息表") | ||||
public class UserInfo implements Serializable { | public class UserInfo implements Serializable { | ||||
@@ -71,138 +74,4 @@ public class UserInfo implements Serializable { | |||||
@ApiModelProperty("身份证号") | @ApiModelProperty("身份证号") | ||||
private String idCard; | private String idCard; | ||||
public Long getId() { | |||||
return id; | |||||
} | |||||
public void setId(Long id) { | |||||
this.id = id; | |||||
} | |||||
public LocalDateTime getCreateOn() { | |||||
return createOn; | |||||
} | |||||
public void setCreateOn(LocalDateTime createOn) { | |||||
this.createOn = createOn; | |||||
} | |||||
public LocalDateTime getUpdateOn() { | |||||
return updateOn; | |||||
} | |||||
public void setUpdateOn(LocalDateTime updateOn) { | |||||
this.updateOn = updateOn; | |||||
} | |||||
public Long getCreateBy() { | |||||
return createBy; | |||||
} | |||||
public void setCreateBy(Long createBy) { | |||||
this.createBy = createBy; | |||||
} | |||||
public Long getUpdateBy() { | |||||
return updateBy; | |||||
} | |||||
public void setUpdateBy(Long updateBy) { | |||||
this.updateBy = updateBy; | |||||
} | |||||
public String getUsername() { | |||||
return username; | |||||
} | |||||
public void setUsername(String username) { | |||||
this.username = username; | |||||
} | |||||
public String getMobile() { | |||||
return mobile; | |||||
} | |||||
public void setMobile(String mobile) { | |||||
this.mobile = mobile; | |||||
} | |||||
public String getRealName() { | |||||
return realName; | |||||
} | |||||
public void setRealName(String realName) { | |||||
this.realName = realName; | |||||
} | |||||
public Long getCompanyId() { | |||||
return companyId; | |||||
} | |||||
public void setCompanyId(Long companyId) { | |||||
this.companyId = companyId; | |||||
} | |||||
public String getCompanyName() { | |||||
return companyName; | |||||
} | |||||
public void setCompanyName(String companyName) { | |||||
this.companyName = companyName; | |||||
} | |||||
public String getRole() { | |||||
return role; | |||||
} | |||||
public void setRole(String role) { | |||||
this.role = role; | |||||
} | |||||
public Long getRegionCode() { | |||||
return regionCode; | |||||
} | |||||
public void setRegionCode(Long regionCode) { | |||||
this.regionCode = regionCode; | |||||
} | |||||
public Long getAvatarFileId() { | |||||
return avatarFileId; | |||||
} | |||||
public void setAvatarFileId(Long avatarFileId) { | |||||
this.avatarFileId = avatarFileId; | |||||
} | |||||
public String getManageCompanyIds() { | |||||
return manageCompanyIds; | |||||
} | |||||
public void setManageCompanyIds(String manageCompanyIds) { | |||||
this.manageCompanyIds = manageCompanyIds; | |||||
} | |||||
public Boolean getDeleted() { | |||||
return deleted; | |||||
} | |||||
public void setDeleted(Boolean deleted) { | |||||
this.deleted = deleted; | |||||
} | |||||
public String getIdCard() { | |||||
return idCard; | |||||
} | |||||
public void setIdCard(String idCard) { | |||||
this.idCard = idCard; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return "UserInfo{" + | |||||
"id=" + id + | |||||
", createOn=" + createOn + | |||||
", updateOn=" + updateOn + | |||||
", createBy=" + createBy + | |||||
", updateBy=" + updateBy + | |||||
", username=" + username + | |||||
", mobile=" + mobile + | |||||
", realName=" + realName + | |||||
", companyId=" + companyId + | |||||
", companyName=" + companyName + | |||||
", role=" + role + | |||||
", regionCode=" + regionCode + | |||||
", avatarFileId=" + avatarFileId + | |||||
", manageCompanyIds=" + manageCompanyIds + | |||||
", deleted=" + deleted + | |||||
", idCard=" + idCard + | |||||
"}"; | |||||
} | |||||
} | } |
@@ -3,9 +3,11 @@ package com.ningdatech.pmapi.user.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import java.io.Serializable; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiModelProperty; | |||||
* @author Liuxinxin | * @author Liuxinxin | ||||
* @since 2023-01-05 | * @since 2023-01-05 | ||||
*/ | */ | ||||
@Data | |||||
@TableName("nd_user_role") | @TableName("nd_user_role") | ||||
@ApiModel(value = "UserRole对象", description = "用户角色表") | @ApiModel(value = "UserRole对象", description = "用户角色表") | ||||
public class UserRole implements Serializable { | public class UserRole implements Serializable { | ||||
@@ -30,34 +33,4 @@ public class UserRole implements Serializable { | |||||
@ApiModelProperty("角色 ID") | @ApiModelProperty("角色 ID") | ||||
private Long roleId; | private Long roleId; | ||||
public Long getId() { | |||||
return id; | |||||
} | |||||
public void setId(Long id) { | |||||
this.id = id; | |||||
} | |||||
public Long getUserId() { | |||||
return userId; | |||||
} | |||||
public void setUserId(Long userId) { | |||||
this.userId = userId; | |||||
} | |||||
public Long getRoleId() { | |||||
return roleId; | |||||
} | |||||
public void setRoleId(Long roleId) { | |||||
this.roleId = roleId; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return "UserRole{" + | |||||
"id=" + id + | |||||
", userId=" + userId + | |||||
", roleId=" + roleId + | |||||
"}"; | |||||
} | |||||
} | } |
@@ -0,0 +1,41 @@ | |||||
package com.ningdatech.pmapi.user.entity.enumeration; | |||||
import lombok.Getter; | |||||
/** | |||||
* <p> | |||||
* 系统角色枚举 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:15 2023/1/13 | |||||
*/ | |||||
@Getter | |||||
public enum RoleEnum { | |||||
/** | |||||
* 系统角色枚举 | |||||
*/ | |||||
ORDINARY_USER("普通用户"), | |||||
EXPERT("专家"), | |||||
ORG_ADMIN("单位管理员"), | |||||
EXPERT_ADMIN("专家管理员"), | |||||
REGION_ADMIN("区域管理员"), | |||||
SUPER_ADMIN("超级管理员"); | |||||
private final String desc; | |||||
RoleEnum(String desc) { | |||||
this.desc = desc; | |||||
} | |||||
public boolean eq(String name) { | |||||
return this.name().equals(name); | |||||
} | |||||
} |
@@ -2,7 +2,7 @@ package com.ningdatech.pmapi.user.security.auth; | |||||
import com.ningdatech.basic.util.NdJsonUtil; | import com.ningdatech.basic.util.NdJsonUtil; | ||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import com.ningdatech.pmapi.common.constants.BizConst; | |||||
import com.ningdatech.pmapi.common.constant.BizConst; | |||||
import com.ningdatech.pmapi.user.security.auth.config.AuthProperties; | import com.ningdatech.pmapi.user.security.auth.config.AuthProperties; | ||||
import com.ningdatech.pmapi.user.security.auth.handler.DefaultExpiredSessionStrategy; | import com.ningdatech.pmapi.user.security.auth.handler.DefaultExpiredSessionStrategy; | ||||
import com.ningdatech.pmapi.user.security.auth.password.UsernamePasswordAuthSecurityConfig; | import com.ningdatech.pmapi.user.security.auth.password.UsernamePasswordAuthSecurityConfig; | ||||