修改gitignore文件,添加忽略热部署文件
修改token时间为600 添加javaBean验证依赖 增加slf4j日志debug 搭好租户查询用户列表框架
This commit is contained in:
parent
654806d1be
commit
8dca6064aa
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,6 +24,7 @@ target/
|
|||||||
*.iws
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
rebel.xml
|
||||||
|
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
nbproject/private/
|
nbproject/private/
|
||||||
|
|||||||
7
pom.xml
7
pom.xml
@ -45,6 +45,13 @@
|
|||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!--JavaBean验证依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>2.0.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud 微服务 -->
|
<!-- SpringCloud 微服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
|
|||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
|
private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
|
||||||
|
|
||||||
private final static long EXPIRE_TIME = Constants.TOKEN_EXPIRE * 60;
|
private final static long EXPIRE_TIME = Constants.TOKEN_EXPIRE * 600;
|
||||||
|
|
||||||
// 排除过滤的 uri 地址,nacos自行添加
|
// 排除过滤的 uri 地址,nacos自行添加
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package com.xhpc;
|
package com.xhpc;
|
||||||
|
|
||||||
import com.xhpc.common.security.annotation.EnableCustomConfig;
|
import com.xhpc.common.security.annotation.EnableCustomConfig;
|
||||||
import com.xhpc.common.security.annotation.EnableRyFeignClients;
|
|
||||||
import com.xhpc.common.swagger.annotation.EnableCustomSwagger2;
|
import com.xhpc.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author WH
|
* @author WH
|
||||||
@ -14,7 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
*/
|
*/
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableRyFeignClients
|
@EnableFeignClients
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan("com.xhpc.board.mapper")
|
@MapperScan("com.xhpc.board.mapper")
|
||||||
public class XhpcMessageBoardApplication {
|
public class XhpcMessageBoardApplication {
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package com.xhpc.board.controller;
|
package com.xhpc.board.controller;
|
||||||
|
|
||||||
import com.xhpc.board.domain.PlatformSendMessageToUserRequest;
|
import com.xhpc.board.domain.PlatformSendMessageToUserRequest;
|
||||||
|
import com.xhpc.board.domain.QueryUserListRequest;
|
||||||
|
import com.xhpc.board.domain.QueryUserListResponse;
|
||||||
import com.xhpc.board.service.XhpcMessageBoardService;
|
import com.xhpc.board.service.XhpcMessageBoardService;
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/board")
|
@RequestMapping("/board")
|
||||||
|
@Slf4j
|
||||||
public class XhpcMessageBoardController {
|
public class XhpcMessageBoardController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -39,4 +40,20 @@ public class XhpcMessageBoardController {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户查询给它发送信息的用户的列表
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/14 10:26
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@GetMapping("/user/list")
|
||||||
|
public AjaxResult queryUserList(QueryUserListRequest param) {
|
||||||
|
|
||||||
|
QueryUserListResponse queryUserListResponse = xhpcMessageBoardService.queryUserList(param);
|
||||||
|
|
||||||
|
return AjaxResult.success(queryUserListResponse);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.xhpc.board.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询给租户发信息的用户的列表
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/14 11:17
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class QueryUserListRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* senderAccount
|
||||||
|
*/
|
||||||
|
@JsonProperty("senderAccount")
|
||||||
|
private String senderAccount;
|
||||||
|
/**
|
||||||
|
* userType
|
||||||
|
*/
|
||||||
|
@JsonProperty("userType")
|
||||||
|
private Integer userType;
|
||||||
|
/**
|
||||||
|
* currentPage
|
||||||
|
*/
|
||||||
|
@JsonProperty("currentPage")
|
||||||
|
@NotNull(message = "currentPage的参数名不正确或者currentPage的值为空,检查传入参数")
|
||||||
|
@NotBlank(message = "currentPage的参数为''字符串,请检查传入参数")
|
||||||
|
private Integer currentPage;
|
||||||
|
/**
|
||||||
|
* items
|
||||||
|
*/
|
||||||
|
@JsonProperty("items")
|
||||||
|
@NotNull(message = "items的参数名不正确或者items的值为空,检查传入参数")
|
||||||
|
@NotBlank(message = "items的参数为''字符串,请检查传入参数")
|
||||||
|
private Integer items;
|
||||||
|
/**
|
||||||
|
* tenantId
|
||||||
|
*/
|
||||||
|
@JsonProperty("tenantId")
|
||||||
|
@NotNull(message = "tenantId的参数名不正确或者tenantId的值为空,检查传入参数")
|
||||||
|
@NotBlank(message = "tenantId的参数为''字符串,请检查传入参数")
|
||||||
|
private String tenantId;
|
||||||
|
/**
|
||||||
|
* tenantType
|
||||||
|
*/
|
||||||
|
@JsonProperty("tenantType")
|
||||||
|
@NotNull(message = "tenantType的参数名不正确或者tenantType的值为空,检查传入参数")
|
||||||
|
@NotBlank(message = "tenantType的参数为''字符串,请检查传入参数")
|
||||||
|
private Integer tenantType;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.xhpc.board.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封装查询用户列表的包装类对象
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/14 11:23
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class QueryUserListResponse {
|
||||||
|
|
||||||
|
@JsonProperty("totalItems")
|
||||||
|
private Long totalItems;
|
||||||
|
@JsonProperty("data")
|
||||||
|
private List<DataDTO> data;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public static class DataDTO {
|
||||||
|
|
||||||
|
@JsonProperty("userIcon")
|
||||||
|
private String userIcon;
|
||||||
|
@JsonProperty("userAccount")
|
||||||
|
private String userAccount;
|
||||||
|
@JsonProperty("userType")
|
||||||
|
private Integer userType;
|
||||||
|
@JsonProperty("haveNewInfo")
|
||||||
|
private Integer haveNewInfo;
|
||||||
|
@JsonProperty("tenantId")
|
||||||
|
private String tenantId;
|
||||||
|
@JsonProperty("tenantType")
|
||||||
|
private Integer tenantType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +1,6 @@
|
|||||||
package com.xhpc.board.service;
|
package com.xhpc.board.service;
|
||||||
|
|
||||||
import com.xhpc.board.domain.PlatformSendMessageToUserRequest;
|
import com.xhpc.board.domain.*;
|
||||||
import com.xhpc.board.domain.QueryUserMassageResponse;
|
|
||||||
import com.xhpc.board.domain.SendMessageToPlatformRequest;
|
|
||||||
import com.xhpc.board.domain.UserQueryCondition;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 留言板服务的Service
|
* 留言板服务的Service
|
||||||
@ -57,4 +54,16 @@ public interface XhpcMessageBoardService {
|
|||||||
*/
|
*/
|
||||||
String returnPlatformAvatar(String tenantId, Integer tenantType);
|
String returnPlatformAvatar(String tenantId, Integer tenantType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台用户查询哪些用户发留言了的列表
|
||||||
|
*
|
||||||
|
* @param param query list condition
|
||||||
|
* @return 发了信息的用户列表
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/14 11:25
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
QueryUserListResponse queryUserList(QueryUserListRequest param);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
package com.xhpc.board.service.impl;
|
package com.xhpc.board.service.impl;
|
||||||
|
|
||||||
import com.xhpc.board.domain.PlatformSendMessageToUserRequest;
|
import com.xhpc.board.domain.*;
|
||||||
import com.xhpc.board.domain.QueryUserMassageResponse;
|
|
||||||
import com.xhpc.board.domain.SendMessageToPlatformRequest;
|
|
||||||
import com.xhpc.board.domain.UserQueryCondition;
|
|
||||||
import com.xhpc.board.mapper.XhpcMessageBoardMapper;
|
import com.xhpc.board.mapper.XhpcMessageBoardMapper;
|
||||||
import com.xhpc.board.mapper.XhpcMessageBoardReceiveUserMapper;
|
import com.xhpc.board.mapper.XhpcMessageBoardReceiveUserMapper;
|
||||||
import com.xhpc.board.pojo.XhpcMessageBoard;
|
import com.xhpc.board.pojo.XhpcMessageBoard;
|
||||||
@ -244,4 +241,19 @@ public class XhpcMessageBoardServiceImpl implements XhpcMessageBoardService {
|
|||||||
return "https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/avatar/logo.png";
|
return "https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/avatar/logo.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台用户查询哪些用户发留言了的列表
|
||||||
|
*
|
||||||
|
* @param param query list condition
|
||||||
|
* @return 发了信息的用户列表
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/14 11:25
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QueryUserListResponse queryUserList(QueryUserListRequest param) {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user