mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-18 02:56:30 +08:00
commit:VO支持以及bug修复
This commit is contained in:
@@ -25,11 +25,5 @@
|
||||
<artifactId>application-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- knife4j 接口文档框架 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.upmsinterface.dto.SysUserDto;
|
||||
import com.orange.demo.upmsinterface.vo.SysUserVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ import java.util.*;
|
||||
name = "upms",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = SysUserClient.SysUserClientFallbackFactory.class)
|
||||
public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
public interface SysUserClient extends BaseClient<SysUserDto, SysUserVo, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
@@ -33,7 +34,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/sysUser/listByIds")
|
||||
ResponseResult<List<SysUserDto>> listByIds(
|
||||
ResponseResult<List<SysUserVo>> listByIds(
|
||||
@RequestParam("userIds") Set<Long> userIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/sysUser/getById")
|
||||
ResponseResult<SysUserDto> getById(
|
||||
ResponseResult<SysUserVo> getById(
|
||||
@RequestParam("userId") Long userId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -98,7 +99,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/sysUser/listBy")
|
||||
ResponseResult<List<SysUserDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<SysUserVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
@@ -108,7 +109,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/sysUser/getBy")
|
||||
ResponseResult<SysUserDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<SysUserVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
@@ -119,7 +120,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/sysUser/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
@@ -144,7 +145,7 @@ public interface SysUserClient extends BaseClient<SysUserDto, Long> {
|
||||
@Component("UpmsSysUserClientFallbackFactory")
|
||||
@Slf4j
|
||||
class SysUserClientFallbackFactory
|
||||
extends BaseFallbackFactory<SysUserDto, Long, SysUserClient> implements SysUserClient {
|
||||
extends BaseFallbackFactory<SysUserDto, SysUserVo, Long, SysUserClient> implements SysUserClient {
|
||||
|
||||
@Override
|
||||
public SysUserClient create(Throwable throwable) {
|
||||
|
||||
@@ -6,14 +6,11 @@ import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.upmsinterface.constant.SysUserType;
|
||||
import com.orange.demo.upmsinterface.constant.SysUserStatus;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SysUserDto对象。
|
||||
@@ -21,42 +18,36 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("SysUserDto实体对象")
|
||||
@Data
|
||||
public class SysUserDto {
|
||||
|
||||
/**
|
||||
* 用户Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户Id", required = true)
|
||||
@NotNull(message = "数据验证失败,用户Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 登录用户名。
|
||||
*/
|
||||
@ApiModelProperty(value = "登录用户名", required = true)
|
||||
@NotBlank(message = "数据验证失败,登录用户名不能为空!")
|
||||
private String loginName;
|
||||
|
||||
/**
|
||||
* 用户密码。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户密码", required = true)
|
||||
@NotBlank(message = "数据验证失败,用户密码不能为空!", groups = {AddGroup.class})
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户显示名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户显示名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,用户显示名称不能为空!")
|
||||
private String showName;
|
||||
|
||||
/**
|
||||
* 用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)", required = true)
|
||||
@NotNull(message = "数据验证失败,用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)不能为空!")
|
||||
@ConstDictRef(constDictClass = SysUserType.class, message = "数据验证失败,用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)为无效值!")
|
||||
private Integer userType;
|
||||
@@ -64,13 +55,11 @@ public class SysUserDto {
|
||||
/**
|
||||
* 用户头像的Url。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户头像的Url")
|
||||
private String headImageUrl;
|
||||
|
||||
/**
|
||||
* 用户状态(0: 正常 1: 锁定)。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户状态(0: 正常 1: 锁定)", required = true)
|
||||
@NotNull(message = "数据验证失败,用户状态(0: 正常 1: 锁定)不能为空!")
|
||||
@ConstDictRef(constDictClass = SysUserStatus.class, message = "数据验证失败,用户状态(0: 正常 1: 锁定)为无效值!")
|
||||
private Integer userStatus;
|
||||
@@ -78,48 +67,30 @@ public class SysUserDto {
|
||||
/**
|
||||
* 创建用户Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建用户Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建用户名。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建用户名")
|
||||
private String createUsername;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤起始值(>=)")
|
||||
private String createTimeStart;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤结束值(<=)")
|
||||
private String createTimeEnd;
|
||||
|
||||
/**
|
||||
* userType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> userTypeDictMap;
|
||||
|
||||
/**
|
||||
* userStatus 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> userStatusDictMap;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.orange.demo.upmsinterface.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SysUserVO对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class SysUserVo {
|
||||
|
||||
/**
|
||||
* 用户Id。
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 登录用户名。
|
||||
*/
|
||||
private String loginName;
|
||||
|
||||
/**
|
||||
* 用户密码。
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户显示名称。
|
||||
*/
|
||||
private String showName;
|
||||
|
||||
/**
|
||||
* 用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)。
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 用户头像的Url。
|
||||
*/
|
||||
private String headImageUrl;
|
||||
|
||||
/**
|
||||
* 用户状态(0: 正常 1: 锁定)。
|
||||
*/
|
||||
private Integer userStatus;
|
||||
|
||||
/**
|
||||
* 创建用户Id。
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建用户名。
|
||||
*/
|
||||
private String createUsername;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* userType 常量字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> userTypeDictMap;
|
||||
|
||||
/**
|
||||
* userStatus 常量字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> userStatusDictMap;
|
||||
}
|
||||
@@ -91,24 +91,6 @@
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="module" module-name="application-common" />
|
||||
<orderEntry type="module" module-name="common-swagger" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
@@ -265,7 +247,7 @@
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
|
||||
Reference in New Issue
Block a user