diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/controller/IamUserController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/controller/IamUserController.java
index d298320..11db6d6 100644
--- a/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/controller/IamUserController.java
+++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/controller/IamUserController.java
@@ -17,10 +17,10 @@ import java.util.List;
* 参考:IAM系统组织架构同步接口标准.docx
* 提供给IAM的同步人员的接口
* 人员管理接口
- * - 获取人员列表接口
- * - 新增人员接口
- * - 更新人员接口
- * - 删除/停用人员接口
+ * - 获取人员列表接口
+ * - 新增人员接口
+ * - 更新人员接口
+ * - 删除/停用人员接口
*/
@RestController
@Api(tags = "IAM同步人员接口")
@@ -51,35 +51,34 @@ public class IamUserController {
* 请求方式:GET
* 请求地址:
* {url}/users?pageIndex={pageIndex}&pageSize={pageSize}&startTime={startTime}&endTime={endTime}
+ *
* @param userRequestDTO 人员列表请求参数实体
- * 名称 格式 描述
- * url string 合作方应用接口地址,例如 文档样例 本地接口
- * pageIndex number 分页索引(从0开始)
- * pageSize number 分页大小(支持至少300)
- * startTime number 最近变更时间的起始时间(unix毫秒时间戳,用于增量)
- * endTime number 最近变更时间的终止时间(unix毫秒时间戳,用于增量)
+ * 名称 格式 描述
+ * url string 合作方应用接口地址,例如 文档样例 本地接口
+ * pageIndex number 分页索引(从0开始)
+ * pageSize number 分页大小(支持至少300)
+ * startTime number 最近变更时间的起始时间(unix毫秒时间戳,用于增量)
+ * endTime number 最近变更时间的终止时间(unix毫秒时间戳,用于增量)
* @return 人员列表信息 样例:
* {
- * "errorCode": 0, // success
- * "total":1000,//人员总数
- * "data":[
- * {
- * "id":"xxx",
- * "name":"xxx",
- * "email":"xxx",
- * "mobile":"xxx",
- * "departmentId":"xxx"//所在组织架构的 ID
- * "status":"xxx"//标识人员的停启用
- * },
- * ……
- * ]
+ * "errorCode": 0, // success
+ * "total":1000,//人员总数
+ * "data":[
+ * {
+ * "id":"xxx",
+ * "name":"xxx",
+ * "email":"xxx",
+ * "mobile":"xxx",
+ * "departmentId":"xxx"//所在组织架构的 ID
+ * "status":"xxx"//标识人员的停启用
+ * },
+ * ……
+ * ]
* }
*/
@ApiOperation("获取人员列表接口")
- @GetMapping("/users")
- public IamApiResponseDTO getUsers(
- IamApiRequestDTO userRequestDTO,
- @RequestHeader(value = "Authorization", required = false) String authorization) {
+ @PostMapping("/users")
+ public IamApiResponseDTO getUsers(@RequestBody IamApiRequestDTO userRequestDTO) {
// 鉴权校验
// if (authorization == null || !authorization.startsWith("Bearer ")) {
// return IamApiResponseDTO.fail(401, "Missing or invalid Authorization header");
@@ -102,25 +101,26 @@ public class IamUserController {
* 请求方式:POST
* 请求地址:
* {url}/user
+ *
* @param iamApiUser 人员请求参数实体
- * 请求体(Request Body)
- * {
- * "name":"xxx",
- * "email":"xxx",
- * "mobile":"xxx",
- * "departmentId":"xxx"//所在组织架构的ID
- * }
+ * 请求体(Request Body)
+ * {
+ * "name":"xxx",
+ * "email":"xxx",
+ * "mobile":"xxx",
+ * "departmentId":"xxx"//所在组织架构的ID
+ * }
* @return 新增人员ID 样例:
* 请求返回体(Response Body)
* {
- * "errorCode": 0, // success
- * "errorMsg":null,//若errorCode不为0,此处应有错误描述
- * "id":"xxx"//返回新增的人员的id(必须)
+ * "errorCode": 0, // success
+ * "errorMsg":null,//若errorCode不为0,此处应有错误描述
+ * "id":"xxx"//返回新增的人员的id(必须)
* }
*/
@ApiOperation("新增人员接口")
@PostMapping("/user")
- public IamApiResponseDTO saveUser(@RequestBody IamApiUser iamApiUser){
+ public IamApiResponseDTO saveUser(@RequestBody IamApiUser iamApiUser) {
log.debug("saveUser请求参数:{}", iamApiUser);
Boolean saveResult = iamUserService.save(iamApiUser);
log.debug("saveUser返回结果:{}, {}", saveResult, iamApiUser);
@@ -132,18 +132,19 @@ public class IamUserController {
* 请求方式:PUT
* 请求地址:
* {url}/user/{id}
+ *
* @param iamApiUser 人员请求参数实体
- * 请求体(Request Body)
- * {
- * "name":"xxx",
- * "email":"xxx",
- * "mobile":"xxx",
- * "departmentId":"xxx"//所在组织架构的ID
- * }
+ * 请求体(Request Body)
+ * {
+ * "name":"xxx",
+ * "email":"xxx",
+ * "mobile":"xxx",
+ * "departmentId":"xxx"//所在组织架构的ID
+ * }
* @return 更新结果 样例:
* {
- * "errorCode": 0, // success
- * "errorMsg":null,//若errorCode不为0,此处应有错误描述
+ * "errorCode": 0, // success
+ * "errorMsg":null,//若errorCode不为0,此处应有错误描述
* }
*/
@ApiOperation("更新人员接口")
@@ -161,11 +162,12 @@ public class IamUserController {
* 请求方式:DELETE
* 请求地址:
* {url}/user/{id}
+ *
* @param id 人员ID
* @return 删除/停用结果 样例:
* {
- * "errorCode": 0, // success
- * "errorMsg":null//若errorCode不为0,此处应有错误描述
+ * "errorCode": 0, // success
+ * "errorMsg":null//若errorCode不为0,此处应有错误描述
* }
*/
@ApiOperation("删除/停用人员接口")
@@ -178,4 +180,4 @@ public class IamUserController {
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/service/impl/IamUserServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/service/impl/IamUserServiceImpl.java
index 7441596..caee001 100644
--- a/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/service/impl/IamUserServiceImpl.java
+++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/iam/service/impl/IamUserServiceImpl.java
@@ -25,6 +25,7 @@ public class IamUserServiceImpl extends ServiceImpl i
int pageSize = iamUserRequestDTO.getPageSize() != null ? iamUserRequestDTO.getPageSize() : 10;
Page page = new Page<>(pageIndex + 1, pageSize); // MyBatis-Plus页码从1开始,接口从0开始
QueryWrapper queryWrapper = new QueryWrapper<>();
+
// 可根据startTime、endTime等条件添加查询条件
if (iamUserRequestDTO.getStartTime() != null) {
queryWrapper.ge("update_time", iamUserRequestDTO.getStartTime());
@@ -59,4 +60,4 @@ public class IamUserServiceImpl extends ServiceImpl i
// 这里只做演示,假设所有生成的token都有效
return token != null && token.length() == 32;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/controller/MailController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/controller/MailController.java
index e6dcbdd..b9c360c 100644
--- a/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/controller/MailController.java
+++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/controller/MailController.java
@@ -1,7 +1,7 @@
package com.chinaunicom.mall.ebtp.extend.mail.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
-import com.chinaunicom.mall.ebtp.extend.mail.entity.MailRequest;
+import com.chinaunicom.mall.ebtp.common.mail.entity.MailRequest;
import com.chinaunicom.mall.ebtp.extend.mail.service.IMailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/entity/MailRequest.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/entity/MailRequest.java
deleted file mode 100644
index b64f54e..0000000
--- a/src/main/java/com/chinaunicom/mall/ebtp/extend/mail/entity/MailRequest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.chinaunicom.mall.ebtp.extend.mail.entity;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@Data
-@ApiModel("邮件请求参数")
-public class MailRequest {
- @ApiModelProperty(value = "收件人邮箱", required = true, example = "recipient@example.com")
- private String to;
-
- @ApiModelProperty(value = "邮件主题", required = true, example = "测试邮件")
- private String subject;
-
- @ApiModelProperty(value = "邮件内容", required = true,
- example = "这是一封测试邮件")
- private String content;
-}
diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java
index 85cd367..f26c40f 100644
--- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java
+++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java
@@ -25,8 +25,9 @@ public class TimeServiceConstant {
private static TSAClient client;
- @Value("${spring.redis.sentinel.master}")
- private String redis;
+// @Value("${spring.redis.sentinel.master}")
+// private String redis;
+ private String redis = "master";
static {
try {