|
@@ -20,7 +20,6 @@ import java.time.LocalDate;
|
|
/**
|
|
/**
|
|
* Created by owen on 2023/6/14 0014 11:25
|
|
* Created by owen on 2023/6/14 0014 11:25
|
|
*/
|
|
*/
|
|
-@ApiIgnore
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@Api(tags = "钉钉相关接口")
|
|
@Api(tags = "钉钉相关接口")
|
|
@RestController
|
|
@RestController
|
|
@@ -31,7 +30,6 @@ public class DingTalkController {
|
|
DingClient dingClient;
|
|
DingClient dingClient;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@ApiOperation(value = "获取AccessToken")
|
|
@ApiOperation(value = "获取AccessToken")
|
|
@GetMapping(value = "/accessToken")
|
|
@GetMapping(value = "/accessToken")
|
|
public Result accessToken() {
|
|
public Result accessToken() {
|
|
@@ -48,7 +46,7 @@ public class DingTalkController {
|
|
return Result.success(dingClient.getUserByMobile(access_token, phone));
|
|
return Result.success(dingClient.getUserByMobile(access_token, phone));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @ApiIgnore
|
|
@ApiOperation(value = "发送消息到用户")
|
|
@ApiOperation(value = "发送消息到用户")
|
|
@GetMapping(value = "/sendMsg/{phone}")
|
|
@GetMapping(value = "/sendMsg/{phone}")
|
|
public Result sendMsg(@PathVariable String phone) {
|
|
public Result sendMsg(@PathVariable String phone) {
|
|
@@ -69,6 +67,25 @@ public class DingTalkController {
|
|
return Result.success(dingClient.sendMsg(access_token, dto));
|
|
return Result.success(dingClient.sendMsg(access_token, dto));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 2024-03-06 by owen
|
|
|
|
+ * 提供给钉钉OA使用
|
|
|
|
+ * @param processInstanceId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "获取单个审批实例详情", notes = "processInstanceId:审批实例ID 例如:etoy6f7RRBmUYgTNoFjq0w05391707123720")
|
|
|
|
+ @GetMapping(value = "/getWorkflowInfo/{processInstanceId}")
|
|
|
|
+ public Result getWorkflowInfo(@PathVariable String processInstanceId) {
|
|
|
|
+ JSONObject token = dingClient.getToken(DingTalkConstant.app_key, DingTalkConstant.app_secret);
|
|
|
|
+ String access_token = token.getString("access_token");
|
|
|
|
+ log.info("access_token:{}, processInstanceId:{}", access_token, processInstanceId);
|
|
|
|
+
|
|
|
|
+ return Result.success(dingClient.getWorkflowInfo(access_token, processInstanceId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiIgnore
|
|
@ApiOperation(value = "发送消息到部门", notes = "web部门:65038809")
|
|
@ApiOperation(value = "发送消息到部门", notes = "web部门:65038809")
|
|
@GetMapping(value = "/sendDeptMsg/{deptId}")
|
|
@GetMapping(value = "/sendDeptMsg/{deptId}")
|
|
public Result sendDeptMsg(@PathVariable String deptId) {
|
|
public Result sendDeptMsg(@PathVariable String deptId) {
|